constant framerate

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

constant framerate

Jonathan
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
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: constant framerate

Matt Pekar
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 <[hidden email]> 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
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

RE: constant framerate

Jonathan
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=[hidden email] [mailto:gstreamer-devel-bounces+jonathan.demeyer=[hidden email]] 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 <[hidden email]> 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
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: constant framerate

Matt Pekar
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 <[hidden email]> 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=[hidden email] [mailto:[hidden email]=[hidden email]] 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 <[hidden email]> 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
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

RE : constant framerate

Jonathan
It works !

Thanks a lot.

However, it leaves me with a misunderstanding.
Is this pipeline pull-based ?
I thought that normal pipelines were push-based.
How can we know (even after launch).

Jonathan


De : gstreamer-devel-bounces+jonathan.demeyer=[hidden email] [gstreamer-devel-bounces+jonathan.demeyer=[hidden email]] de la part de Matt Pekar [[hidden email]]
Date d'envoi : vendredi 27 juillet 2012 18:09
À : Discussion of the development of and with GStreamer
Objet : Re: constant framerate

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 <[hidden email]> 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=[hidden email] [mailto:[hidden email]=[hidden email]] 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 <[hidden email]> 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
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: RE : constant framerate

Matt Pekar
I just discovered gstdebugutils, which has a great function for dumping out a graph of the entire pipeline.  I call it and have it output to chrome directly:

void display_pipeline_in_chrome() {
const char* temp_filename = "gst_bin_graph_tmp";

char dot_command[1024];
char chrome_command[1024];

const char* DIR = getenv("GST_DEBUG_DUMP_DOT_DIR");
GstDebugGraphDetails output_flags = GstDebugGraphDetails(GST_DEBUG_GRAPH_SHOW_MEDIA_TYPE | GST_DEBUG_GRAPH_SHOW_STATES | GST_DEBUG_GRAPH_SHOW_NON_DEFAULT_PARAMS);
GST_DEBUG_BIN_TO_DOT_FILE(GST_BIN(PIPELINE), output_flags, temp_filename);

snprintf(dot_command, sizeof(dot_command), "dot -Tpng %s/%s.dot -o %s/%s.png", DIR, temp_filename, DIR, temp_filename);
snprintf(chrome_command, sizeof(chrome_command), "google-chrome %s/%s.png", DIR, temp_filename);

system(dot_command);
system(chrome_command);
}

The mode of the pads will be marked with one of "-><" to represent none, push, or pull.

On Sat, Jul 28, 2012 at 2:14 PM, Demeyer Jonathan <[hidden email]> wrote:
It works !

Thanks a lot.

However, it leaves me with a misunderstanding.
Is this pipeline pull-based ?
I thought that normal pipelines were push-based.
How can we know (even after launch).

Jonathan


De : gstreamer-devel-bounces+jonathan.demeyer=[hidden email] [gstreamer-devel-bounces+jonathan.demeyer=[hidden email]] de la part de Matt Pekar [[hidden email]]
Date d'envoi : vendredi 27 juillet 2012 18:09
À : Discussion of the development of and with GStreamer
Objet : Re: constant framerate

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 <[hidden email]> 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=[hidden email] [mailto:[hidden email]=[hidden email]] 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 <[hidden email]> 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
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel