How to control the frame rate in a gstreamer pipeline?

c, decode, frame-rate, gstreamer

Solution

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.

Problem

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 ?

Original source