[FFmpeg-user] tinterlace broken - SAR & DAR wrong
Mark Filipak (ffmpeg)
markfilipak at bog.us
Mon Jan 4 07:28:47 EET 2021
UPDATE
I tested all possible combinations based on my filter complex. I renamed 2 particular outputs of
interest:
separatefields+shuffleframes+select.mkv
separatefields+shuffleframes+select+tinterlace.mkv
to indicate the result of ffprobe:
separatefields+shuffleframes+select 720x240 [SAR 8x9 DAR 8x3] 59.94 fps.mkv
separatefields+shuffleframes+select+tinterlace 720x480 [SAR 16x9 DAR 8x3] 29.97 fps.mkv
If SAR had not been doubled, then, according to theory,
DAR = PAR * SAR = 720:480 * 8:9 = 3:2 * 8:9 = 4:3. That is ordinary i30. That is what it should be
at that point: separatefields ... tinterlace.
Paul, why does tinterlace change SAR to 16:9?
On 01/03/2021 03:22 PM, Mark Filipak (ffmpeg) wrote:
> On 01/03/2021 10:24 AM, Paul B Mahol wrote:
>> On Sun, Jan 3, 2021 at 11:45 AM Mark Filipak (ffmpeg) <markfilipak at bog.us>
>> wrote:
>>
>>> Version N-100546-g2c6f532e0a (latest git build)
>>>
>>> Summary of the bug:
>>> tinterlace works but sets SAR & DAR to bogus values.
>>>
>>> The package is here:
>>> https://www.dropbox.com/t/0WABzvetTF1eT7E4
>>>
>>> Everything needed to reproduce and source video and my result and log are
>>> in the package.
>>>
>>>
>> The change of sar is intended behavior.
>
> Okay.
> Given this:
> ffmpeg -report -i source.mkv -vf "tinterlace=mode=merge" -c:a copy -c:s copy -dn tinterlace.mkv
> where source.mpv is this:
> "Input #0, matroska,webm, from 'source.mkv':
> " Metadata:
> " ENCODER : Lavf58.65.100
> " Duration: 00:00:01.00, start: 0.000000, bitrate: 857 kb/s
> " Stream #0:0, 4, 1/1000: Video: h264 (High), yuv420p(tv, smpte170m, progressive), 720x240 [SAR
> 8:9 DAR 8:3], 59.94 fps, 59.94 tbr, 1k tbn, 119.88 tbc (default)"
>
> tinterlace.mkv should be this: 720x480 [SAR 8:9 DAR 4:3]
> but instead is this:
> "Output #0, matroska, to 'tinterlace.mkv':
> " Metadata:
> " encoder : Lavf58.65.100
> " Stream #0:0, 0, 1/1000: Video: h264 (H264 / 0x34363248), yuv420p(tv, smpte170m, top coded first
> (swapped)), 720x480 [SAR 16:9 DAR 8:3], q=2-31, 29.97 fps, 1k tbn (default)"
>
> The discrepancy appears to be causing problems with succeeding filters:
> "[Parsed_interleave_7 @ 00000170340dc000] Parameters for input link input1 (size 720x480, SAR 16:9)
> do not match the corresponding output link parameters (720x240, SAR 8:9)
> "[Parsed_interleave_7 @ 00000170340dc000] Failed to configure output pad on Parsed_interleave_7
> "Error reinitializing filters!
> "Failed to inject frame into filter network: Invalid argument
> "Error while processing the decoded data for stream #0:0
> "Conversion failed!"
>
> The succeeding filters are shuffleframes, split, select, tinterlace, bwdif, decimate, interleave,
> tinterlace, and bwdif. The problem appears to be provoked by interleave.
>
> I promise to follow this message with the full command line and full report if you promise not to
> ask me why I'm doing such seemingly crazy processing. :-)
>
> Honestly, I'm not trying to be coy. I'm simply trying to keep this use-case simple and prevent this
> thread from getting off topic. The problem appears to be with tinterlace's SAR.
More information about the ffmpeg-user
mailing list