[FFmpeg-user] h264_vaapi missing frames

Mark Thompson sw at jkqxz.net
Tue Mar 20 11:58:41 EET 2018


On 20/03/18 02:30, Kai Hendry wrote:
> Hi there,
> 
> With my brand new Intel 8th gen laptop (Intel Corporation UHD Graphics
> 620 (rev 07) with 8 core Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz on
> Archlinux, I thought I'd experiment with hardware accelerated capture
> as opposed to my normal 2-step approach of
> 1) recording to mkv
> https://github.com/kaihendry/recordmydesktop2.0/blob/master/x11capture
> 2) converting mkv to mp4
> https://github.com/kaihendry/recordmydesktop2.0/blob/master/htmlvideo
> 
> 
> However with -vaapi_device /dev/dri/renderD128 -movflags +faststart
> -vf 'format=nv12|vaapi,hwupload' -c:v h264_vaapi it seems to skip
> frames.
> 
> https://s.natalian.org/2018-03-20/1521512464.mp4.log
> https://s.natalian.org/2018-03-20/1521512464.mp4
> 
> 
> Ffprobe seems to say it's 30fps:
>  Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
> 2560x1440, 722 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc
> (default)
> 
> But during playback, it would appear not!
> 
> Is there a good way to test or know I've dropped frames in my screen capture?
> 
> How can I prevent frame dropping?

Show your command line?  The pts values in that file are quite uniform, suggesting that you've forced the output to be treated as if it is 30/1001 fps even if it isn't.  The status line also says "frame=  529 ... dup=430", which I think means it has captured 100 frames and made 430 duplicates to keep the framerate.

- Mark


More information about the ffmpeg-user mailing list