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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
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 > [hidden email] > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel Edward Hervey Lead Platforms Engineer / Director (+34) 666 350 320 Collabora Multimedia ------------------------------------------------------------------------- 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Edward, thanks for the quick reply. I removed the videorate element and
added a caps filter per your last message: gnomevfssrc ! image/jpeg,framerate=2/1 ! jpegdec ! theoraenc ! ... I'm still producing video at half speed. Any thoughts on what I'm messing up? Aaron > 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 >> [hidden email] >> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel > -- > Edward Hervey > Lead Platforms Engineer / Director > (+34) 666 350 320 > Collabora Multimedia > > ------------------------------------------------------------------------- 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Aaron Lindsey
With the help from Edward and quite a bit of searching on my own I was
able to solve my problem. The frame rates seemed to be ignored and 1/1 was always assumed until I used the multipartdemux element. Here is the pipeline that finally worked: gnomevfssrc location=http://url?resolution=320x240\&fps=2 ! multipartdemux ! image/jpeg,framerate=2/1 ! jpegdec ! theoraenc ! oggmux ! filesink location=test.ogg After looking at the docs for multipartdemux, I'm not sure why I got any video at all before. I guess jpegdec was figuring out some way to parse the multipart stream into jpegs with the side effect that the frame rate from the caps filter was ignored....or something. Haven't dug deep enough into gstreamer to really know. Can anyone shed some light? Aaron > Hi, > > Add a capsfilter informing the content is jpeg data at Xfps. > > Ex : gnomevfssrc ! image/jpeg,framerate=2/1 ! jpegdec .... > > Edward > ------------------------------------------------------------------------- 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Hi All
I am experiencing the same problem in a similar situation. On this case the MJPEG source is at 25 fps. Here is the example: gnomevfssrc location=$CAMERA ! typefind ! multipartdemux ! image/jpeg, framerate=25/1 ! jpegdec ! ffmpegcolorspace ! theoraenc ! oggmux ! filesink = location=test0.ogg The first problem here is that past the jpegdec element, the framerate is ignored and falls back to 0/1. The second problem is that If I try to force the framerate, say, right before ffmpegcolorspace, then the pipeline will not construct. The third problem occurs if I use the videorate element. The video accumulates frames, but totem only displays a still picture instead of a video. Can anyone advice? Regards. Noe Nieto.
2007/12/19 Aaron Lindsey <[hidden email]> With the help from Edward and quite a bit of searching on my own I was ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |