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

Reduce delay while stream the webcam #134

Open
neumartin opened this issue Jul 29, 2019 · 1 comment
Open

Reduce delay while stream the webcam #134

neumartin opened this issue Jul 29, 2019 · 1 comment

Comments

@neumartin
Copy link

neumartin commented Jul 29, 2019

Hi!,
I'm streaming the webcam with this command:

ffmpeg -re -i /dev/video0 -c:v libx264 -preset fast -c:a libfdk_aac -ab 128k -ar 44100 -f rtsp rtsp://localhost:7373/live/STREAM_NAME

In console I get:

  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: h264 (libx264), yuv422p, 640x480, q=-1--1, 20 fps, 90k tbn, 20 tbc
    Metadata:
      encoder         : Lavc58.35.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame= 2047 fps= 20 q=-1.0 Lsize=N/A time=00:01:42.20 bitrate=N/A dup=364 drop=0 speed=0.997x

But when test with VLC or other video player I can see 3 or 4 second of delay.
Can I improve some parameter to get no more than 0.5 seconds of video delay?
I want to build a videoconference software.
Thanks!

@iizukanao
Copy link
Owner

Try reducing network buffer on client side. However, I'm not sure if <0.5 seconds of delay is possible. Also, I think WebRTC is more suitable technology for video conferencing.

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