[gst-devel] Help setting frame rate with videorate
Edward Hervey
edward.hervey at collabora.co.uk
Wed Dec 19 11:20:05 CET 2007
Hi,
Add a capsfilter informing the content is jpeg data at Xfps.
Ex : gnomevfssrc ! image/jpeg,framerate=2/1 ! jpegdec ....
Edward
On Wed, 2007-12-19 at 03:02 -0500, Aaron Lindsey wrote:
> 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
>
>
>
> -------------------------------------------------------------------------
> SF.Net email is sponsored by:
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services
> for just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
--
Edward Hervey
Lead Platforms Engineer / Director
(+34) 666 350 320
Collabora Multimedia
More information about the gstreamer-devel
mailing list