Opened 7 years ago

Last modified 4 years ago

#6633 open defect

NVENC produces interlaced content that plays incorrectly in Windows Media Player and is read as 59.94fps in MediaInfo

Reported by: alexpigment Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: nvenc
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: yes

Description

Summary of the bug:

When creating 1080i content with h264_nvenc, the resultant file will not play smoothly in Windows Media Player. VLC plays the files particularly bad on the systems I've tested when using both Yadif2x and Bob deinterlace modes. Kodi plays the files back without issue.

Secondly, Mediainfo shows the frame rate as being 59.94fps rather than 29.97fps, although the reported frame rate seems to vary from application to application.

Files produced with libx264 play back correctly in all players test and are read as 29.97fps in Mediainfo. Additionally, 1080i files created with NVENC in Staxrip do not exhibit a problem.

How to reproduce:

% ffmpeg -i interlacedsample.mp4 -c:v h264_nvenc -b:v 8000000 -pix_fmt nv12 -flags +ilme+ildct -profile:v high -level 41 interlacedoutput.mp4

Play the output file in Windows Media Player; see that the output file is not played smoothly but the input file is. Next, open the file in Mediainfo and see that the frame rate is being reported as 59.94fps.

ffmpeg version 3.3.3 static (Zeranoe)
Nvidia 1050 GPU, driver version 384.76.

Attachments (1)

interlacedsample.mp4 (2.1 MB ) - added by alexpigment 7 years ago.
Input file used to test and confirm the issue.

Change History (7)

by alexpigment, 7 years ago

Attachment: interlacedsample.mp4 added

Input file used to test and confirm the issue.

comment:1 by Carl Eugen Hoyos, 7 years ago

Keywords: interlace frame rate 59.94 1080i choppy playback removed
Priority: importantnormal
Reproduced by developer: unset

comment:2 by Timo R., 7 years ago

Analyzed by developer: set
Component: undeterminedavcodec
Reproduced by developer: set

This is caused by nvenc using field encoding mode for interlaced encoding.
For each input frame, it outputs two pictures, which end up in the same packet.
Thus, they both have the same timestamp, which causes the halved frame rate.

There is no fix for this at this time, as the old encode API, as used by nvenc, does not offer a way to output multiple packets at once.

comment:3 by Balling, 4 years ago

Well, now it says that "Interlaced encoding is not supported. Supported level: 0"

Last edited 4 years ago by Balling (previous) (diff)

comment:4 by hydra3333, 4 years ago

Hello @oromit
I wonder: has "the old encode API, as used by nvenc" changed (I guess not) or does nvenc now use a newer API since 2 years ago ? i.e. is it fixed ?

comment:5 by Balling, 4 years ago

Status: newopen

well now it says "Interlaced encoding is not supported. Supported level: 0" (interlaced is not supported for turing, only pascal).
After this commit ba6b20df3f74a6092dc01023b07760da58188d82 it is now AV_LOG_WARNING (not VERBOSE), so...

Anyway https://devtalk.nvidia.com/default/topic/1058517/drivers/nvidia-geforce-gtx-1660-bug-with-nvenc-on-ffmpeg-interlace-flag-flags-v-ildct/post/5371757/#5371757

comment:6 by hydra3333, 4 years ago

eek.
they didn't tell me that and/or it wasn't advertised, before i bought a 2060Super :( :( :( :(
b*st*rds.
is it driver or hardware ?

Note: See TracTickets for help on using tickets.