Issue replacing jpegenc with x264 enc in a pipeline

Severin Kacianka severin.kacianka at aau.at
Mon Dec 2 04:16:30 PST 2013


Hello,

I use a Logitech C920 and want to save the 1080p version of a stream to 
a file and at the same time stream a lower quality version.
Currently I use tee to split the output: One part gets written to a file 
and the other part is then streamed. This version using mjpeg works as 
expected:
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 ! 
fakesink src.vidsrc ! queue ! 
video/x-h264,width=1920,height=1080,framerate=30/1,profile=constrained-baseline 
! tee name=foo ! queue ! h264parse ! mp4mux ! filesink location=bla.mp4 
foo. ! h264parse !  avdec_h264 ! videorate ! video/x-raw,framerate=5/1 ! 
videoscale ! video/x-raw,width=320,height=180 !  jpegenc quality=10 ! 
rtpjpegpay  ! udpsink host=example.com port=1234


However when I try to replace jpecenc with x264enc the pipeline does not 
work (without any error message):
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 ! 
fakesink src.vidsrc ! queue ! 
video/x-h264,width=1920,height=1080,framerate=30/1,profile=constrained-baseline 
! tee name=foo ! queue ! h264parse ! mp4mux ! filesink location=bla.mp4 
foo. ! h264parse !  avdec_h264 ! videorate ! video/x-raw,framerate=5/1 ! 
videoscale ! video/x-raw,width=320,height=180 ! x264enc ! rtph264pay  ! 
udpsink host=example.com port=1234


What could be the reason for this? In my mind I have a raw 'intermedite' 
form of the stream after avdec_h264. This I should then be able to 
manipulate freely as I need it (e.g. change framerate, size, etc) and 
then I should be able to encode it with any encoder I want. Is this 
assumption correct or is there something completely different going on?

Thank you for your time,
Severin


More information about the gstreamer-devel mailing list