How to reduce the lag in WebM/VP8 stream

1,502 views
Skip to first unread message

Tiến Nguyễn

unread,
Dec 19, 2013, 1:17:41 PM12/19/13
to webm-d...@webmproject.org
Hi there,
Forgive me if this newbie question has been asked already, in that case please give me a ref link to the answer :).
I have a video server set up (I could use either GStreamer or ffmeg)  to send out a live camera feed in HTTP WebM/VP8 on an HTML5 page using <video> tag. It's all working great except for the lag is huge; about 5 to 6 seconds. What would be the best encoding parameters and receiver parameters (if there is any) to achieve a less than 500ms lag?

Thanks, 

bryand...@gmail.com

unread,
Dec 19, 2013, 2:40:55 PM12/19/13
to webm-d...@webmproject.org
There is no way to limit the buffering done by the VIDEO and AUDIO tags when streaming over HTTP.

If you make your server a WebRTC MCU you could get the results that you want by playing back the WebRTC media stream in the video element.


--
You received this message because you are subscribed to the Google Groups "WebM Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webm-discuss...@webmproject.org.
To post to this group, send email to webm-d...@webmproject.org.
Visit this group at http://groups.google.com/a/webmproject.org/group/webm-discuss/.
For more options, visit https://groups.google.com/a/webmproject.org/groups/opt_out.

Silvia Pfeiffer

unread,
Dec 19, 2013, 3:54:25 PM12/19/13
to WebM Discussion

Do you know if your delay is introduced server or client side? I suspect much of it is server side, so you should optimise that first.

Best Regards,
Silvia.

--

Tiến Nguyễn

unread,
Dec 19, 2013, 4:35:14 PM12/19/13
to webm-d...@webmproject.org
I have a suspicion that it could be (some) on the server side because I also use the VLC command line with a very small amount of network caching as a client to display the stream as http://IP:PORT/ and the VLC also show a lag.
I have search all over and there is no tutorial or example of any real time set up for VP8/WebM so I hope this group could give me some pointer of where to start.
Here is a options that I set for my Gstreamer vp8enc plugin:

vp8enc end-usage=cbr cpu-used=5 threads=4 qc-level=30 target-bitrate=2048 max-quantizer=40 min-quantizer=10

My understanding is by default, the encoder will do single pass compression.

Silvia Pfeiffer

unread,
Dec 19, 2013, 7:07:10 PM12/19/13
to WebM Discussion
The best way to get the delay down is - as Bryan says - to get a
WebRTC component on the server to stream your video to a WebRTC client
e.g. in your (Chrome or Firefox) Web browser.
I was looking for an open source WebRTC MCU that could help you do
this and found this: http://sourceforge.net/projects/mcumediaserver/ .
I have not tried it nor am I related to it in any way, but it might be
worthwhile to play with it.

HTH,
Silvia.
Reply all
Reply to author
Forward
0 new messages