Low latency video streaming

January 10, 2024, 19:55

andersson4003

Hey! I have being at this for a while, I am trying to stream the video captured on my pi camera on my raspberry pi to my PC live via the network. Although I have done so successful the latency has been high, the lowest I have gotten is 5 seconds which is way to much for my project. Anyone who knows this kind of stuff willing to help? Thanks!

_krazy.

Include your process so we can help reduce latency.

_krazy.

Also are you using some third party to send it to your computer?

jannik44

you probably doing something wrong, latency over local network shouldnt be more than a few ms

_krazy.

And do you need it only to be locally transmitted?

andersson4003

Yes I know but I have tried so many methods but I end up having high latency or no video at all.

_krazy.

And if possible make it wired, it'll be much faster

andersson4003

I have no process.

andersson4003

I have had it on ethernet, still 5 seconds of latency

jannik44

probably your cam or your software is doing some post-processing?

_krazy.

That's abnormal, how heavy is the output of the video? And is the issue from transmitting or receiving?

andersson4003

It is the raspberry pi camera v2, probably not the camera ig.

andersson4003

The transmitting has always been very low latency whichever method i have used. Recieving is the problem.

andersson4003

I have used all kinds of methods, ffmpeg, v4linux or smth like that

andersson4003

some c scripts

andersson4003

whatever youtube has told me

andersson4003

How do you recommend I do it?

_krazy.

Inspect the cable, and check whether it can handle the load, nothing else I can help with.

_krazy.

And a goodnight sleep sometimes fixes issues, seriously it does.

andersson4003

Tried it via network too, either way it should not be 5 seconds of latency. It is insanely high.

andersson4003

I have had 10 good nights sleep (jk i have been frustrated out of my mind haha) so yeah. I have now turned to the professionals

_krazy.

At least me I'm no professional. How large the output is?

andersson4003

Dont really remember, I have the figure 1200kb in my head but idk if its per frame or per second.

_krazy.

Maybe the RPi is processing the data into bulks?

andersson4003

Probably per frame since it didnt change when i changed fps

andersson4003

Maybe it has a buffer? Idk. I have tried everything twice, I really just want to have someone who knows the stuff to talk to

_krazy.

Idk nothing, just thinking of possible problems. If you figured it out inform us, it's a really interesting thing lol.

andersson4003

Yeah keep an eye out on the post 😄

andersson4003

I'll try to remember to ping you if we do any progress