[FFmpeg-user] tinterlace broken - SAR & DAR wrong

Mark Filipak (ffmpeg) markfilipak at bog.us
Mon Jan 4 23:22:41 EET 2021


I've made some mistakes because of so many moving parts: SAR, DAR, 720x240, 720x480. I will slow 
down my responses and will endeavor to be accurate. Kindly disregard the prior 2 responses. The 
problem is with tinterlace (and apparently with weave, also), and I'll prove it. Kindly stand by.


On 01/04/2021 04:11 PM, Mark Filipak (ffmpeg) wrote:
> Sorry, I made a typo...
> 
> On 01/04/2021 03:52 PM, pdr0 wrote:
>> Mark Filipak (ffmpeg) wrote
>>>>
>>>> You can't interleave images with different dimensions
>>>>
>>>> Aout has separated fields, to 720x240 , but Bout is 720x480
>>>
>>> [Bout] is 720x240: I'm using 'mode=send_field' in 'bwdif=mode=send_field',
>>> and the following
>>> 'decimate' doesn't change that. The problem is that 'tinterleave' is
>>> marking the output as "SAR =
>>> 16:9" instead of "8:9" (which is what it should be and should never be
>>> changed).
>>
>> No, [Bout] is 720x480
>>
>> bwdif in send_field mode means double rate deinterlacing. 720x480 59.94
>> fields per second interlaced input becomes 720x480 59.94 progressive images
>>
>> Test it out yourself on the the Bout branch
>> ffmpeg -i "INPUT.VOB" -filter_complex "separatefields, shuffleframes=0 1 2 4
>> 3 6 5 7 8 9,
>> select=eq(mod(n\,10)\,2)+eq(mod(n\,10)\,3)+eq(mod(n\,10)\,6)+eq(mod(n\,10)\,7),
>> tinterlace, setsar=sar=8/9, bwdif=mode=send_field:deint=all,
>> decimate=cycle=2" -an -c:v libx264 -crf 18 -t 00:00:10 bout.mkv -y
> 
> Yes, I knew all that, and bwdif is doing that right thing given what it's told to do. What's wrong 
> is with tinterlace. tinterlace is changing SAR from 8:9 to 16:9 before bwdif gets the stream. Adding 
> setsar ahead of bwdif can change SAR back to 8:9, but it also changes DAR from 4:3 (which it should 
> be) to 8:3 [note 1].
> 
> [note 1] setsar has no choice. For a 720x240 picture (i.e. PAR = 8:3), if it changes SAR from 16:9 
> (which is wrong) to 8:9 (which is right), then it has to change DAR from 4:3 (which is right) to 8:3 
> (which is wrong). The problem is with tinterlace.
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
> 
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


-- 
17 Dec 2020 -- early in the 2nd wave of pandemic.
Pfizer's 2nd dose in 21 days. Moderna's 2nd dose in 28 days.
Yesterday's new cases, China: 12, S.Korea: 1,075, U.S.: 246,996.
Yesterday's new deaths, China: 0, S.Korea: 12, U.S.: 3,486.
Today, U.S.: 4% of world population, 23% of cases, 19% of deaths.
Today, U.S. mortality: Of 10,485,312 resolved cases, 3% are dead.
Today, U.S. dead, pandemic: 314,577 (11 mo.), WWII: 419,000 (47 mo.).
22 Jan: U.S. & S.Korea report 1st cases on the same day.
  6 Mar, testing to date, S.Korea: 140,000, U.S.: 2000.
  6 Mar, test results, S.Korea: 4 hours, U.S.: 1 to 2 weeks.
  1 Jun, total care-home deaths, S.Korea: 0, U.S.: 33,000 +/- 7,000.
  5 Aug, U.S. testing: only 1/4 of number needed; 4 day results.
  1 Sep, Nursing Assoc report: Over 60% of U.S. nurses lack PPE.
18 Sep, U.S. doctors & nurses still acutely lack PPE; 1200 dead.
15 Oct, projected GDP, China: up 1.9%, U.S.: down 3.6%.
19 Oct, CDC report: U.S. test results still take 3 days, average.
12 Nov, National Nurses United: Over 80% of U.S. nurses lack PPE.


More information about the ffmpeg-user mailing list