Pascal
Pascal

Reputation: 2174

gstreamer webcam vp9enc lagging

I have build a litte go webrtc project with a websocket signaling server and the webrtc part with pion.

But creating a vp8 or vp9 stream with gstreamer fails -> high latency

This is the pipeline

gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=320,framerate=10/1 ! videoconvert ! vp9enc ! decodebin ! autovideosink

but the video is very laggy and there are some errors printed from gst

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
WARNING: from element /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstXvImageSink:autovideosink0-actual-sink-xvimage: A lot of buffers are being dropped.
Additional debug info:
../gstreamer/libs/gst/base/gstbasesink.c(3003): gst_base_sink_is_too_late (): /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstXvImageSink:autovideosink0-actual-sink-xvimage:
There may be a timestamping problem, or this computer is too slow.
ERROR: from element /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstXvImageSink:autovideosink0-actual-sink-xvimage: Output window was closed
Additional debug info:
../gst-plugins-base/sys/xvimage/xvimagesink.c(554): gst_xv_image_sink_handle_xevents (): /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstXvImageSink:autovideosink0-actual-sink-xvimage
Execution ended after 0:00:13.282962300
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

My computer is an i5 with 16G RAM ... there must be something else

Upvotes: 0

Views: 1154

Answers (1)

Sean DuBois
Sean DuBois

Reputation: 4252

I don't know the equivalent for vp9enc, but check out these settings for vp8enc

By default most encoders don't run at realtime speeds, so you have to set a few options. If you figure out the right vp9 options a PR would be great!

Upvotes: 1

Related Questions