[FFmpeg-trac] #11514(avcodec:new): Cuvid decoder problem with deinterlacing
FFmpeg
trac at avcodec.org
Wed May 21 01:12:20 EEST 2025
#11514: Cuvid decoder problem with deinterlacing
------------------------------------+-----------------------------------
Reporter: ua0lnj | Owner: (none)
Type: defect | Status: new
Priority: important | Component: avcodec
Version: git-master | Resolution:
Keywords: cuvid | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
------------------------------------+-----------------------------------
Comment (by Timo R.):
Multiplying that value by 2 makes no sense, it undoes the shift right
before it, and will cause it to basically always signal the buffer to be
full immediately, severely hurting performance.
I can't immediately reproduce any issues here.
You have to keep in mind that when using the ffmpeg CLI tool, you need to
manually provide it with the doubled framerate, since ffmpeg.c does not
have any provisions to account for a decoder changing the framerate. It
trusts what the demuxer reports.
So if you have 1080i50 content for example, ffmpeg recognizes it as 25
fps.
To then deinterlace it with cuvid:
./ffmpeg_g -c:v h264_cuvid -deint adaptive -r 50 -i yourfile.mp4 [...]
out.mp4
This produces perfectly smooth output for me. Without it, it looks quite
juddery.
Alternatively, you can add -drop_second_field 1, to just get 1080p25 back.
But that obviously looks bad as well, by nature of being only 25 fps.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/11514#comment:5>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list