Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to control the frame rate in a gstreamer pipeline?

I have astream encoded in 60fps, but my gstreamer pipeline is playing it in fps, so the video appears to be very slow. I have created a gstreamer pipeline as

appsrc name=src ! video/x-h264 ! decodebin ! autovideosink sync=false

The appsrc will push buffers into the decoder. Now I want to force some frame rate for the video that I am playing. I tried inserting a videorate in between decodebin and autovideosink. But it didnt work. Then I inserted framerate=30/1 for forcing the framerate as 30fps.. But that also didnt work; So how to force the framerate for the decoder in gstremer pipeline ?

like image 222
jithin Avatar asked Nov 19 '13 11:11

jithin


1 Answers

Without seeing the other pipelines you have tried, I came up with this:

gst-launch-1.0 filesrc location=movie.avi ! decodebin ! \
videorate ! "video/x-raw,framerate=5/1" ! autovideosink

movie.avi contains a 30fps video which is then fixed to 5fps before being displayed.

like image 156
stylesuxx Avatar answered Sep 29 '22 11:09

stylesuxx