[gst-devel] Is video playback benchmark possible with Gstreamer ?

Arnout Vandecappelle arnout at mind.be
Mon Oct 19 12:19:32 CEST 2009


On Sunday 18 Oct 2009 12:31:57 tapas kundu wrote:
> Hi
>  I want to play video at highest speed without displaying video window. I
> want to see the frame  rate ,CPU usage etc for video.

 If you have your own application, you can easily use a pipeline ending with 
fakesink and do something in the have-buffer callback of the fakesink.  You 
can even play around with QoS by setting qos=true and sync=true on the 
fakesink.  Attached is some code for the have-buffer callback.

 If you're calling gst-launch on the command line and can't be bothered with 
creating an application, and accuracy is not essential, then you can do 
something like this:

BUFFERS=...
LOGFILE=/tmp/log$$
gst-launch uridecodebin uri=... ! fakesink num-buffers=$BUFFERS > $LOGFILE
TIME=$(sed -n 's/Execution ended after \([0-9]*\)[0-9][0-9][0-9] ns./\1/p' \
           $LOGFILE)
echo FPS: $(( $BUFFERS * 1000000 / $TIME ))

 Regards,
 Arnout

-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  31BB CF53 8660 6F88 345D  54CC A836 5879 20D7 CF43
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fps.c
Type: text/x-csrc
Size: 1136 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20091019/4aa1a384/attachment.c>


More information about the gstreamer-devel mailing list