[gst-devel] Help setting frame rate with videorate
Aaron Lindsey
aaron at 8bh.com
Wed Dec 19 09:02:42 CET 2007
Hi everyone. I'm running into trouble converting a motion jpeg stream
into an ogg theora file with gstreamer. The following creates an ogg
theora file with the correct timing and streams at 1 frame/sec:
gst-launch-0.10 -v gnomevfssrc
location=http://url?resolution=320x240\&fps=1 ! jpegdec ! theoraenc !
oggmux ! filesink location=test.ogg
When I up the framerate on my camera source to 2 frames/sec instead of 1 I
get an ogg theora file running at half speed:
gst-launch-0.10 -v gnomevfssrc
location=http://url?resolution=320x240\&fps=2 ! jpegdec ! theoraenc !
oggmux ! filesink location=test.ogg
So, to attempt to fix this, I add in a videorate element with the correct
framerate:
gst-launch-0.10 -v gnomevfssrc
location=http://url?resolution=320x240\&fps=2 ! jpegdec ! videorate !
video/x-raw-yuv,framerate=2/1 ! theoraenc ! oggmux ! filesink
location=test.ogg
This results in the following output and the pipeline hangs without ever
making it into the PLAYING state:
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/pipeline0/jpegdec0.src: caps = video/x-raw-yuv, format=(fourcc)I420,
width=(int)320, height=(int)240, framerate=(fraction)0/1
/pipeline0/videorate0.sink: caps = video/x-raw-yuv, format=(fourcc)I420,
width=(int)320, height=(int)240, framerate=(fraction)0/1
/pipeline0/videorate0.src: caps = video/x-raw-yuv, format=(fourcc)I420,
framerate=(fraction)2/1, width=(int)320, height=(int)240
/pipeline0/videorate0.sink: caps = video/x-raw-yuv, format=(fourcc)I420,
width=(int)320, height=(int)240, framerate=(fraction)0/1
How should I be setting the frame rate here so that the video encodes to
the proper playing speed? This is using the latest version of gstreamer
provided by Ubuntu. Thanks.
Aaron
More information about the gstreamer-devel
mailing list