constant framerate

Matt Pekar mpekar at raineyelectronics.com
Fri Jul 27 09:09:25 PDT 2012


Try adding sync=true to the fakesink element:

gst-launch -v videotestsrc num-buffers=10 ! videorate force-fps="1/1" !
"video/x-raw-yuv,framerate=1/1" ! fakesink sync=true

On Fri, Jul 27, 2012 at 11:04 AM, Demeyer Jonathan <Jonathan.Demeyer at macq.eu
> wrote:

> **
> Tanks Matt for the reply.
>
> This didn't work for me as you can see :
>
> $ date; gst-launch -v videotestsrc num-buffers=10 ! videorate
> force-fps="1/1" ! "video/x-raw-yuv,framerate=1/1" ! fakesink; date
> Fri Jul 27 17:55:42 CEST 2012
> Setting pipeline to PAUSED ...
> /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps =
> video/x-raw-yuv, framerate=(fraction)1/1, format=(fourcc)YUY2,
> color-matrix=(string)sdtv, chroma-site=(string)mpeg2, width=(int)320,
> height=(int)240
> Pipeline is PREROLLING ...
> /GstPipeline:pipeline0/GstVideoRate:videorate0.GstPad:src: caps =
> video/x-raw-yuv, framerate=(fraction)1/1, format=(fourcc)YUY2,
> color-matrix=(string)sdtv, chroma-site=(string)mpeg2, width=(int)320,
> height=(int)240
> /GstPipeline:pipeline0/GstVideoRate:videorate0.GstPad:sink: caps =
> video/x-raw-yuv, framerate=(fraction)1/1, format=(fourcc)YUY2,
> color-matrix=(string)sdtv, chroma-site=(string)mpeg2, width=(int)320,
> height=(int)240
> /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps =
> video/x-raw-yuv, framerate=(fraction)1/1, format=(fourcc)YUY2,
> color-matrix=(string)sdtv, chroma-site=(string)mpeg2, width=(int)320,
> height=(int)240
> /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps =
> video/x-raw-yuv, framerate=(fraction)1/1, format=(fourcc)YUY2,
> color-matrix=(string)sdtv, chroma-site=(string)mpeg2, width=(int)320,
> height=(int)240
> /GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps =
> video/x-raw-yuv, framerate=(fraction)1/1, format=(fourcc)YUY2,
> color-matrix=(string)sdtv, chroma-site=(string)mpeg2, width=(int)320,
> height=(int)240
> /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "preroll
> ******* "
> Pipeline is PREROLLED ...
> Setting pipeline to PLAYING ...
> /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "event
> ******* (fakesink0:sink) E (type: 102, GstEventNewsegment,
> update=(boolean)false, rate=(double)1, applied-rate=(double)1,
> format=(GstFormat)GST_FORMAT_TIME, start=(gint64)0, stop=(gint64)-1,
> position=(gint64)0;) 0x9173750"
> New clock: GstSystemClock
> /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain
> ******* (fakesink0:sink) (153600 bytes, timestamp: 0:00:00.000000000,
> duration: 0:00:01.000000000, offset: 0, offset_end: 1, flags: 33 ro discont
> ) 0x9180760"
> /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain
> ******* (fakesink0:sink) (153600 bytes, timestamp: 0:00:01.000000000,
> duration: 0:00:01.000000000, offset: 1, offset_end: 2, flags: 1 ro )
> 0xb6c01870"
> /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain
> ******* (fakesink0:sink) (153600 bytes, timestamp: 0:00:02.000000000,
> duration: 0:00:01.000000000, offset: 2, offset_end: 3, flags: 1 ro )
> 0xb6c01930"
> /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain
> ******* (fakesink0:sink) (153600 bytes, timestamp: 0:00:03.000000000,
> duration: 0:00:01.000000000, offset: 3, offset_end: 4, flags: 1 ro )
> 0xb6c019f0"
> /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain
> ******* (fakesink0:sink) (153600 bytes, timestamp: 0:00:04.000000000,
> duration: 0:00:01.000000000, offset: 4, offset_end: 5, flags: 1 ro )
> 0xb6c01ab0"
> /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain
> ******* (fakesink0:sink) (153600 bytes, timestamp: 0:00:05.000000000,
> duration: 0:00:01.000000000, offset: 5, offset_end: 6, flags: 1 ro )
> 0xb6c01b70"
> /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain
> ******* (fakesink0:sink) (153600 bytes, timestamp: 0:00:06.000000000,
> duration: 0:00:01.000000000, offset: 6, offset_end: 7, flags: 1 ro )
> 0xb6c01c78"
> /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain
> ******* (fakesink0:sink) (153600 bytes, timestamp: 0:00:07.000000000,
> duration: 0:00:01.000000000, offset: 7, offset_end: 8, flags: 1 ro )
> 0xb6c01d38"
> /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain
> ******* (fakesink0:sink) (153600 bytes, timestamp: 0:00:08.000000000,
> duration: 0:00:01.000000000, offset: 8, offset_end: 9, flags: 1 ro )
> 0xb6c01b10"
> /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain
> ******* (fakesink0:sink) (153600 bytes, timestamp: 0:00:09.000000000,
> duration: 0:00:01.000000000, offset: 9, offset_end: 10, flags: 1 ro )
> 0xb6c01b70"
> /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "event
> ******* (fakesink0:sink) E (type: 86, ) 0x9173750"
> Got EOS from element "pipeline0".
> Execution ended after 12853781 ns.
> Setting pipeline to PAUSED ...
> Setting pipeline to READY ...
> /GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps = NULL
> /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = NULL
> /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = NULL
> /GstPipeline:pipeline0/GstVideoRate:videorate0.GstPad:src: caps = NULL
> /GstPipeline:pipeline0/GstVideoRate:videorate0.GstPad:sink: caps = NULL
> /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps =
> NULL
> Setting pipeline to NULL ...
> Freeing pipeline ...
> Fri Jul 27 17:55:42 CEST 2012
>
> While :
> $ gst-inspect --gst-version
> GStreamer Core Library version 0.10.36
>
>  Any idea ?
>
> Thanks,
>
>  Jonathan DEMEYER
>
>
>  ------------------------------
> *From:* gstreamer-devel-bounces+jonathan.demeyer=
> macq.eu at lists.freedesktop.org [mailto:
> gstreamer-devel-bounces+jonathan.demeyer=macq.eu at lists.freedesktop.org] *On
> Behalf Of *Matt Pekar
> *Sent:* mercredi 25 juillet 2012 15:08
> *To:* Discussion of the development of and with GStreamer
> *Subject:* Re: constant framerate
>
>  videorate has a "force-fps" attribute:
>
>  videorate force-fps=1
>
>
> http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-plugins/html/gst-plugins-base-plugins-videorate.html
>
> On Wed, Jul 25, 2012 at 5:00 AM, Demeyer Jonathan <
> Jonathan.Demeyer at macq.eu> wrote:
>
>> **
>> Hello,
>>
>> I'm trying to test a pipeline (test performance of an element) and for
>> this I want to have a constant image flow.
>> I've try the videorate element like this :
>> gst-launch -v filesrc location="Pictures/image.jpg" ! jpegdec !
>> imagefreeze ! videorate ! "video/x-raw-yuv,framerate=1/1" ! fakesink
>>
>> But logs tells me that images come when the system is ready instead of
>> each second (but timestamps are OK). Actually I see no difference between
>> using videorate or not.
>> Do I need to use another element or is it a flag that i've missing ?
>>
>> Thanks in advance,
>>
>>  *Jonathan DEMEYER*
>>
>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20120727/0715cfe8/attachment-0001.html>


More information about the gstreamer-devel mailing list