Adjusting the videorate for an mjpeg stream

Severin Kacianka severin.kacianka at aau.at
Wed Nov 13 03:47:53 PST 2013


Hello,

this message is related to my previous post; I try to stream the 
viewfinder stream from an Logitech C920 using gstreamer 1.2.0.

Currently I try to use that pipeline:
gst-launch-1.0 -e uvch264src device=/dev/video1 name=src auto-start=true 
src.vfsrc ! queue ! video/x-raw,width=320,height=240,framerate=30/1 ! \
jpegenc ! rtpjpegpay ! udpsink host=example.com port=1234 src.vidsrc ! 
fakesink

This works fine, but streams at a too high framerate. When I try to 
change the framerate to 30/10 I get an error:
gst-launch-1.0 -e uvch264src device=/dev/video1 name=src auto-start=true 
src.vfsrc ! queue ! video/x-raw,width=320,height=240,framerate=30/10 ! \
jpegenc ! rtpjpegpay ! udpsink host=example.com port=1234 src.vidsrc ! 
fakesink
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
Setting pipeline to NULL ...
Freeing pipeline ...

I tried adding a videorate element:
gst-launch-1.0 -e uvch264src device=/dev/video1 name=src auto-start=true 
src.vfsrc ! queue ! video/x-raw,width=320,height=240 ! \
queue! videorate ! 'video/x-raw,framerate=30/20' ! jpegenc quality=10 ! 
rtpjpegpay ! udpsink host=example.com port=1234 src.vidsrc ! fakesink

and the pipeline seems to start, the webcam lights up, but nothing is 
streamed.

For reference, when streaming from another webcam this line works fine:
gst-launch-1.0 v4l2src device=/dev/video0 ! 
'video/x-raw,width=640,height=480' ! queue ! videorate ! 
'video/x-raw,framerate=30/20' ! \
jpegenc quality=50 ! rtpjpegpay ! udpsink host=example.com port=1234

Does anyone has an idea where the error could be?

Thank you for your time,
Severin





More information about the gstreamer-devel mailing list