Opened 11 months ago

Last modified 5 months ago

#9339 new defect

tff interlaced encode from progressive not working

Reported by: daren Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords: tff interlaced progressive
Cc: daren Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by daren)

Summary of the bug:
tff interlaced encodes of wrongly (progressive) encoded interlaced footage used to work. It now seems to always wrongly encode as bff but label (mediainfo) it as tff no matter if -top 0 or -top 1 is supplied.

How to reproduce:

% ffmpeg -i input -c:v libx264 -flags +ilme+ildct -top 1 output
ffmpeg version n4.4
built with GCC 11.1.0 (Arch Linux repository)

Tried a few ffmpeg-static versions out, it breaks at 4.4-static and works up to 4.2.2-static (4.3.x branches were missing)
It broke fairly recently though, couple weeks/months ago, guessing with ffmpeg 4.4.

Attached a file that works with

ffmpeg -i progressive_interlaced_footage.mkv -pix_fmt yuv420p -c:v libx264 -flags +ilme+ildct -top 1 interlaced.mkv

on 4.2.2-static and lower versions but not with n4.4/4.4-static.

Attachments (3)

progressive_interlaced_footage.mkv (2.2 MB ) - added by daren 11 months ago.
progressive encode of interlaced footage
test_ffmpeg_interlace.sh (491 bytes ) - added by daren 11 months ago.
reproduce_ffmpeg_interlacing_issue.sh (1.8 KB ) - added by daren 5 months ago.

Change History (12)

by daren, 11 months ago

progressive encode of interlaced footage

comment:1 by daren, 11 months ago

Description: modified (diff)

comment:2 by daren, 11 months ago

Keywords: tff added; bff removed
Summary: bff interlaced encode from progressive not workingtff interlaced encode from progressive not working

comment:3 by daren, 11 months ago

Description: modified (diff)

comment:4 by daren, 11 months ago

Description: modified (diff)

comment:5 by daren, 11 months ago

Description: modified (diff)

comment:6 by jeeb, 11 months ago

Can you check with -field_order tb, or any other of the non-progressive field orders?

"progressive",
"tt",
"bb",
"tb",
"bt",

comment:7 by daren, 11 months ago

I tried it just now, it sets the field order for mediainfo to read, but it's still botched for playback.

Attaching another script test_ffmpeg_interlace.sh for reproduction.

ffmpeg 4.4 produces all output with choppy (wrong field order) deinterlaced playback with vlc and mpv while 4.2.2-static deinterlaces properly .

by daren, 11 months ago

Attachment: test_ffmpeg_interlace.sh added

comment:8 by jeeb, 11 months ago

That's interesting since while I have found the issue (auto-detection after override was handled and not the other way around in ffmpeg.c), the "top" option when specified for an output does not do anything else than set that value to either "bb" (0) or "tt" (1).

So if those two do not work... then there's something else at play as well.

comment:9 by daren, 5 months ago

ffmpeg-static released a couple more versions up to the latest one, can somewhat backtrack where this went buggy.

It happened between releases 4.3.2 and 4.4 and is still an issue with 5.0, if someone could try reproduce this with commits that could be the culprit here.

Attaching another script that quickly tries to reproduce this with all the ffmpeg-static versions available.

Note: See TracTickets for help on using tickets.