How to change frame rate of the stream?

Sebastian Dröge sebastian at centricular.com
Mon Jun 6 07:24:13 UTC 2016


On Fr, 2016-06-03 at 19:41 +0300, sonntex wrote:
> Input stream has 30 frames per 1 second fps. I want to discard 29 of
> 30 frames each second. How can I do that?
> 
> Pipe looks like:
> 
> std::string pipeline =
>     "  appsrc name=src0 "
>     "! vaapiparse_h264 "
>     "! vaapidecode name=decoder0 "
>     "! videorate "
>     "!   video/x-raw,framerate=1/1 "
>     "! videoscale "
>     "!   video/x-raw,width=640,height=480 "
>     "! vaapiencode_h264 name=encoder0 bitrate=512 keyframe-period=1 "
>     "!   video/x-h264,profile=high,stream-format=avc,alignment=au "
>     "! vaapiparse_h264 "
>     "!   video/x-h264,alignment=nal "
>     "! appsink name=sink0";
> 
> It makes my video stream slower in 30 times and does not discard
> frames as I want.

If you have a framerate of 30/1 before the videorate (enforce with a
capsfilter to be sure), then after the videorate you should have 1/1
and all other frames should be dropped.

Which version of GStreamer and gstreamer-vaapi is this? Can you try
with the latest? Also please try if the problem still exists when
replacing the vaapi elements with software based ones.


If all that does not help, please try to provide an as simple as
possible testcase for reproducing this problem.

-- 
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160606/6fb5e181/attachment.sig>


More information about the gstreamer-devel mailing list