Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] 600ms latency when streaming MPEGTS/RTP? #740

Open
ben-xD opened this issue Nov 2, 2024 · 1 comment
Open

[Question] 600ms latency when streaming MPEGTS/RTP? #740

ben-xD opened this issue Nov 2, 2024 · 1 comment

Comments

@ben-xD
Copy link

ben-xD commented Nov 2, 2024

Im trying to stream video from a Pi 5 to my mac laptop.

I tried to run the example: rpicam-vid -t 0 --codec libav --libav-format mpegts --libav-audio -o "tcp://<ip-addr>:<port>?listen=1" , but that error'd with libav: cannot open pulse input device default, so I removed the --libav-audio which fixed it.

This command works: rpicam-vid -t 0 --codec libav --libav-format mpegts -o "udp://192.168.1.82:11024"

However, when I play it on my mac with ffplay udp://192.168.1.82:11024 -fflags nobuffer -flags low_delay -framedrop, the latency is more than 600ms.

I've tried with 2 cameras: Raspberry Pi Camera 2.1 NoIR (Sony imx219 sensor) and OV5647

How can I reduce the latency further? I've used gstreamer with other cameras that have given me latencies of 250ms on the same network.

@ben-xD ben-xD changed the title [Question] 600ms latency when streaming RTP? [Question] 600ms latency when streaming MPEGTS/RTP? Nov 2, 2024
@naushir
Copy link
Collaborator

naushir commented Nov 4, 2024

I wonder if this is because of b-frame encoding. Could you try disabling bframes by editing the following out:

codec->max_b_frames = 1;

and see if that helps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants