ffmpeg architecture question #2

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

ffmpeg architecture question #2

Mark Filipak
Hello,

I've been told that, for soft telecined video

|<--------------------------1/6s-------------------------->|
[A/a__________][B/b__________][C/c__________][D/d__________] source

  the decoder is fully compliant and therefore outputs 30fps

|<--------------------------1/6s-------------------------->|
[A/a__________][B/b__________][C/c__________][D/d__________] source
[A/a_______][B/b_______][B/c_______][C/d_______][D/d_______] hard telecine

I've also been told that the 30fps is interlaced (which I found surprising)

|<--------------------------1/6s-------------------------->|
[A/a__________][B/b__________][C/c__________][D/d__________] source
[A/a_______][B/b_______][B/c_______][C/d_______][D/d_______] hard telecine
[A/-_][-/a_][B/-_][-/b_][B/-_][-/c_][C/-_][-/d_][D/-_][-/d_] i30, TFF

Is this correct so far?

Thanks,
Mark.
--
COVID-19 facts:
The United States is 4% of world population, 32% of cases, 25% of deaths.
The U.S. & S.Korea reported 1st cases on the same day.
In March, week 2, S.Korea did 10,000 tests per day, 4 hour results.
In March, week 2, The U.S. did 400 tests per day, 7 day results.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffmpeg architecture question #2

Mark Filipak
On 04/24/2020 05:10 AM, Mark Filipak wrote:

> Hello,
>
> I've been told that, for soft telecined video
>
> |<--------------------------1/6s-------------------------->|
> [A/a__________][B/b__________][C/c__________][D/d__________] source
>
>  the decoder is fully compliant and therefore outputs 30fps
>
> |<--------------------------1/6s-------------------------->|
> [A/a__________][B/b__________][C/c__________][D/d__________] source
> [A/a_______][B/b_______][B/c_______][C/d_______][D/d_______] hard telecine
>
> I've also been told that the 30fps is interlaced (which I found surprising)
>
> |<--------------------------1/6s-------------------------->|
> [A/a__________][B/b__________][C/c__________][D/d__________] source
> [A/a_______][B/b_______][B/c_______][C/d_______][D/d_______] hard telecine
> [A/-_][-/a_][B/-_][-/b_][B/-_][-/c_][C/-_][-/d_][D/-_][-/d_] i30-TFF
>
> Is this correct so far?

(No response, so continuing.)

When I do 'telecine=pattern=5', I wind up with this

|<--------------------------1/6s-------------------------->|
[A/a_][A/a_][A/b_][B/b_][B/b_][C/c_][C/c_][C/d_][D/d_][D/d_] 55-telecine

I have confirmed it by single-frame stepping through test videos.

So, if the 'i30, TFF' from the decoder is correct, the following must be the full picture:

|<--------------------------1/6s-------------------------->|
[A/a__________][B/b__________][C/c__________][D/d__________] source
[A/a_______][B/b_______][B/c_______][C/d_______][D/d_______] hard telecine
[A/-_][-/a_][B/-_][-/b_][B/-_][-/c_][C/-_][-/d_][D/-_][-/d_] i30, TFF
[A/a_______][B/b_______][B/c_______][C/d_______][D/d_______] deinterlace
[A/a__________][B/b__________][C/c__________][D/d__________] detelecine
[A/a_][A/a_][A/b_][B/b_][B/b_][C/c_][C/c_][C/d_][D/d_][D/d_] 55-telecine

Now, I'm not telling ffmpeg to do the deinterlace or the detelecine. If it indeed is doing
deinterlace & detelecine -- I don't know how to get from i30-TFF to 55-telecine any other way -- it
must be doing it on its own.

Is this correct?

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffmpeg architecture question #2

kumowoon1025
In reply to this post by Mark Filipak
Hi,

I don't know if the decoder outputs 30fps as is from 24fps soft telecine, but if it does, it must include the flags that you need to reconstruct the original 24 format or set it as metadata because frame stepping in ffplay (using the "s" key on the keyboard) goes over 1/24 s progressive frames, even though the stream info says 29.97fps.

Regards,
Ted Park

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffmpeg architecture question #2

Carl Eugen Hoyos-2
In reply to this post by Mark Filipak


> Am 24.04.2020 um 11:10 schrieb Mark Filipak <[hidden email]>:
>
> I've been told that, for soft telecined video the decoder is fully compliant and therefore outputs 30fps

(“fps” is highly ambiguous in this sentence.)

This is not correct.
I believe I told you some time ago that this is not how the decoder behaves. I believe such a behaviour would not make sense for FFmpeg (because you cannot connect FFmpeg’s output to an NTSC CRT). The telecine filter would not work at all if above were the case.
Or in other words: FFmpeg outputs approximately 24 frames per second for typical soft-telecined program streams.

The only thing FFmpeg does to be “compliant” is to forward the correct time base.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffmpeg architecture question #2

pdr0
In reply to this post by Mark Filipak
Mark Filipak wrote
>> I've been told that, for soft telecined video
>>  the decoder is fully compliant and therefore outputs 30fps
>> I've also been told that the 30fps is interlaced (which I found
>> surprising)
>> Is this correct so far?

Yes

If you take a soft telecine input, encode it directly to rawvideo or
lossless output, you can confirm this.
The output is 29.97 (interlaced content) .



> When I do 'telecine=pattern=5', I wind up with this
>
> |<--------------------------1/6s-------------------------->|
> [A/a_][A/a_][A/b_][B/b_][B/b_][C/c_][C/c_][C/d_][D/d_][D/d_] 55-telecine
>
> I have confirmed it by single-frame stepping through test videos.

No.

Pattern looks correct, but unless you are doing something differently , your
timescale is not correct

When input is vob, mpeg2-ps or mpeg-es using soft telecine in my test, using
telecine=pattern=5 the output frame rate is 74.925 as expected  (2.5 * 29.97
= 74.925). This mean RF flags are used, 29.97i output from decoder. Since
its 74.925fps, the scale in your diagram for 1/6s is wrong for
telecine=pattern=5


Both ffplay and mpv look like they ignore the repeat field flags, the
preview is progressive 23.976p



--
Sent from: http://www.ffmpeg-archive.org/
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffmpeg architecture question #2

pdr0
In reply to this post by Carl Eugen Hoyos-2
Carl Eugen Hoyos-2 wrote
>> Am 24.04.2020 um 11:10 schrieb Mark Filipak &lt;

> markfilipak.windows+ffmpeg@

> &gt;:
>>
>> I've been told that, for soft telecined video the decoder is fully
>> compliant and therefore outputs 30fps
>
> (“fps” is highly ambiguous in this sentence.)
>
> This is not correct.
> I believe I told you some time ago that this is not how the decoder
> behaves. I believe such a behaviour would not make sense for FFmpeg
> (because you cannot connect FFmpeg’s output to an NTSC CRT). The telecine
> filter would not work at all if above were the case.
> Or in other words: FFmpeg outputs approximately 24 frames per second for
> typical soft-telecined program streams.
>
> The only thing FFmpeg does to be “compliant” is to forward the correct
> time base.


If you use direct encode, no filters, no switches, the output from soft
telecine input video is 29.97p, where every 5th frame is a duplicate

e.g
ffmpeg -i input.mpeg -c:v rawvideo -an output.yuv

But you can "force" it to output 23.976p by using -vf fps

Is this what you mean by "forward the correct time base" ?



--
Sent from: http://www.ffmpeg-archive.org/
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffmpeg architecture question #2

pdr0
In reply to this post by pdr0
pdr0 wrote
> If you take a soft telecine input, encode it directly to rawvideo or
> lossless output, you can confirm this.
> The output is 29.97 (interlaced content) .


So my earlier post is  incorrect

Output is actually 29.97p with 5th frame duplicates . The repeat field flags
are not taken into account.





--
Sent from: http://www.ffmpeg-archive.org/
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffmpeg architecture question #2

kumowoon1025
In reply to this post by pdr0
Hi,

> Output is actually 29.97p with 5th frame duplicates . The repeat field flags
> are not taken into account.

> If you use direct encode, no filters, no switches, the output from soft
> telecine input video is 29.97p, where every 5th frame is a duplicate
>
> e.g
> ffmpeg -i input.mpeg -c:v rawvideo -an output.yuv
>
> But you can "force" it to output 23.976p by using -vf fps
>
> Is this what you mean by "forward the correct time base" ?

I think 5th frame duplicated is only accurate for shorter durations, I think you will see if you look at the timestamps of each frame over a longer period. They advance by 2 60fps 'ticks', 3 ticks, etc as if the duration was determined using rf and tff flags.

Regards,
Ted Park

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffmpeg architecture question #2

Carl Eugen Hoyos-2
In reply to this post by pdr0


> Am 24.04.2020 um 19:34 schrieb pdr0 <[hidden email]>:
>
> Carl Eugen Hoyos-2 wrote
>>> Am 24.04.2020 um 11:10 schrieb Mark Filipak &lt;
>
>> markfilipak.windows+ffmpeg@
>
>> &gt;:
>>>
>>> I've been told that, for soft telecined video the decoder is fully
>>> compliant and therefore outputs 30fps
>>
>> (“fps” is highly ambiguous in this sentence.)
>>
>> This is not correct.
>> I believe I told you some time ago that this is not how the decoder
>> behaves. I believe such a behaviour would not make sense for FFmpeg
>> (because you cannot connect FFmpeg’s output to an NTSC CRT). The telecine
>> filter would not work at all if above were the case.
>> Or in other words: FFmpeg outputs approximately 24 frames per second for
>> typical soft-telecined program streams.
>>
>> The only thing FFmpeg does to be “compliant” is to forward the correct
>> time base.
>
>
> If you use direct encode, no filters, no switches, the output from soft
> telecine input video is 29.97p, where every 5th frame is a duplicate

No

> e.g
> ffmpeg -i input.mpeg -c:v rawvideo -an output.yuv

(Consider to test with other output formats.)

> But you can "force" it to output 23.976p by using -vf fps
>
> Is this what you mean by "forward the correct time base" ?

No.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffmpeg architecture question #2

pdr0
Carl Eugen Hoyos-2 wrote
>> e.g
>> ffmpeg -i input.mpeg -c:v rawvideo -an output.yuv
>
> (Consider to test with other output formats.)

What did you have in mind?
e.g.

ffmpeg -i input.mpeg -c:v utvideo -an output.avi

The output is 29.97, according to ffmpeg and double check using official
utvideo VFW decoder, duplicate frames . Missing 3 frames if duplicates abide
by RF flags

e.g.

ffmpeg -i input.mpeg -c:v utvideo -an output.mkv

Output is 29.97, but no duplicate frames.  Missing 1 frame

eg.

ffmpeg -i input.mpeg -c:v libx264 -crf 18 -an output.mp4

Output is 29.97 with duplicates . Elementary stream analysis confirms
finding.  But missing  3 frames if duplicates abide by RF flags


ffmpeg -i input.mpeg -c:v libx264 -crf 18 -an output.mkv

Output is 23.976 no duplicates . Missing 1 frame



eg.

ffmpeg -i input.mpeg -c:v ffv1 -an output_ffv1.mkv

Output is 29.97, no duplicates.  Missing 1 frame


Looks like some container differences too.






--
Sent from: http://www.ffmpeg-archive.org/
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffmpeg architecture question #2

Mark Filipak
In reply to this post by kumowoon1025
On 04/24/2020 11:30 AM, Edward Park wrote:
> Hi,
>
> I don't know if the decoder outputs 30fps as is from 24fps soft telecine, but if it does, it must include the flags that you need to reconstruct the original 24 format or set it as metadata because frame stepping in ffplay (using the "s" key on the keyboard) goes over 1/24 s progressive frames, even though the stream info says 29.97fps.

I've seen the same operation frame-stepping via MPV. That fact, and assertions by the HandBrake
folks that (at least from their perspective), the ffmpeg libraries (decoders?) work solely on frames
-- at least, that's my interpretation of what they said.

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffmpeg architecture question #2

Mark Filipak
In reply to this post by Carl Eugen Hoyos-2
On 04/24/2020 01:22 PM, Carl Eugen Hoyos wrote:

>
>
>> Am 24.04.2020 um 11:10 schrieb Mark Filipak <[hidden email]>:
>>
>> I've been told that, for soft telecined video the decoder is fully compliant and therefore outputs 30fps
>
> (“fps” is highly ambiguous in this sentence.)
>
> This is not correct.
> I believe I told you some time ago that this is not how the decoder behaves.

I beg your pardon, Carl Eugen. I thought you said that the decoders are fully compliant and
therefore produce interlaced fields.

> I believe such a behaviour would not make sense for FFmpeg (because you cannot connect FFmpeg’s output to an NTSC CRT). The telecine filter would not work at all if above were the case.
> Or in other words: FFmpeg outputs approximately 24 frames per second for typical soft-telecined program streams.
>
> The only thing FFmpeg does to be “compliant” is to forward the correct time base.

By "correct time base" you mean 24/1.001, correct?
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffmpeg architecture question #2

Mark Filipak
In reply to this post by pdr0
On 04/24/2020 01:28 PM, pdr0 wrote:

> Mark Filipak wrote
>>> I've been told that, for soft telecined video
>>>   the decoder is fully compliant and therefore outputs 30fps
>>> I've also been told that the 30fps is interlaced (which I found
>>> surprising)
>>> Is this correct so far?
>
> Yes
>
> If you take a soft telecine input, encode it directly to rawvideo or
> lossless output, you can confirm this.
> The output is 29.97 (interlaced content) .
>
>> When I do 'telecine=pattern=5', I wind up with this
>>
>> |<--------------------------1/6s-------------------------->|
>> [A/a_][A/a_][A/b_][B/b_][B/b_][C/c_][C/c_][C/d_][D/d_][D/d_] 55-telecine
>>
>> I have confirmed it by single-frame stepping through test videos.
>
> No.

The above timing is for an MKV of the 55-telecine transcode, not for the decoder's output.

> Pattern looks correct, but unless you are doing something differently , your
> timescale is not correct
>
> When input is vob, mpeg2-ps or mpeg-es using soft telecine in my test, using
> telecine=pattern=5 the output frame rate is 74.925 as expected  (2.5 * 29.97
> = 74.925).

Not for me. I've seen 74.925 FPS just one time. Since I considered it a failure, I didn't save the
video and its log, so I don't know how I got it.

> This mean RF flags are used, 29.97i output from decoder. Since
> its 74.925fps, the scale in your diagram for 1/6s is wrong for
> telecine=pattern=5

For this command line:

ffmpeg -report -i "00001.018.m2ts" -filter_complex
"telecine=pattern=5,split=5[A][B][C][D][E],[A]select='eq(mod(n+1\,5)\,1)'[F],[B]select='eq(mod(n+1\,5)\,2)'[G],[C]select='eq(mod(n+1\,5)\,3)'[H],[D]select='eq(mod(n+1\,5)\,4)'[I],[E]select='eq(mod(n+1\,5)\,0)'[J],[F][G][H][I][J]interleave=nb_inputs=5"
-map 0 -c:v libx264 -crf 20 -codec:a copy -codec:s copy "C:\AVOut\00001.018.4.MKV"

MPV playback of '00001.018.4.MKV' says "FPS: 59.940 (estimated)" (not 74.925fps).

> Both ffplay and mpv look like they ignore the repeat field flags, the
> preview is progressive 23.976p

I use MPV. I'm unsure what you mean by "preview". ...and "preview" of what? The decoder output or
the MKV output video?

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffmpeg architecture question #2

pdr0
Mark Filipak wrote

>
>>
>> If you take a soft telecine input, encode it directly to rawvideo or
>> lossless output, you can confirm this.
>> The output is 29.97 (interlaced content) .
>>
>>> When I do 'telecine=pattern=5', I wind up with this
>>>
>>> |<--------------------------1/6s-------------------------->|
>>> [A/a_][A/a_][A/b_][B/b_][B/b_][C/c_][C/c_][C/d_][D/d_][D/d_] 55-telecine
>>>
>>> I have confirmed it by single-frame stepping through test videos.
>>
>> No.
>
> The above timing is for an MKV of the 55-telecine transcode, not for the
> decoder's output.

That's telecine=pattern=5 on a 23.976p native progressive source

I thought this thread was about using a soft telecine source , and how
ffmpeg handles that

because you were making assumptions "So, if the 'i30, TFF' from the decoder
is correct, the following must be the full picture: "

Obviously i30 does not refer to a 23.976p native progressive source...



>> Pattern looks correct, but unless you are doing something differently ,
>> your
>> timescale is not correct
>>
>> When input is vob, mpeg2-ps or mpeg-es using soft telecine in my test,
>> using
>> telecine=pattern=5 the output frame rate is 74.925 as expected  (2.5 *
>> 29.97
>> = 74.925).
>
> Not for me. I've seen 74.925 FPS just one time. Since I considered it a
> failure, I didn't save the
> video and its log, so I don't know how I got it.
>
>> This mean RF flags are used, 29.97i output from decoder. Since
>> its 74.925fps, the scale in your diagram for 1/6s is wrong for
>> telecine=pattern=5
>
> For this command line:
>
> ffmpeg -report -i "00001.018.m2ts" -filter_complex
> "telecine=pattern=5,split=5[A][B][C][D][E],[A]select='eq(mod(n+1\,5)\,1)'[F],[B]select='eq(mod(n+1\,5)\,2)'[G],[C]select='eq(mod(n+1\,5)\,3)'[H],[D]select='eq(mod(n+1\,5)\,4)'[I],[E]select='eq(mod(n+1\,5)\,0)'[J],[F][G][H][I][J]interleave=nb_inputs=5"
> -map 0 -c:v libx264 -crf 20 -codec:a copy -codec:s copy
> "C:\AVOut\00001.018.4.MKV"
>
> MPV playback of '00001.018.4.MKV' says "FPS: 59.940 (estimated)" (not
> 74.925fps).

Is that m2ts a soft telecine BD's ? This thread was about soft telecine...

Most film BD's are native progressive 23.976




>> Both ffplay and mpv look like they ignore the repeat field flags, the
>> preview is progressive 23.976p
>
> I use MPV. I'm unsure what you mean by "preview". ...and "preview" of
> what? The decoder output or
> the MKV output video?

The "preview" of the video is what you see when ffplay window opens or mpv
opens. It's a RGB converted representation what you are using as input to
mpv or ffplay . So I'm referring to a soft telecine source, because that's
what you were talking about





--
Sent from: http://www.ffmpeg-archive.org/
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffmpeg architecture question #2

Mark Filipak
On 04/24/2020 11:06 PM, pdr0 wrote:

> Mark Filipak wrote
>>
>>>
>>> If you take a soft telecine input, encode it directly to rawvideo or
>>> lossless output, you can confirm this.
>>> The output is 29.97 (interlaced content) .
>>>
>>>> When I do 'telecine=pattern=5', I wind up with this
>>>>
>>>> |<--------------------------1/6s-------------------------->|
>>>> [A/a_][A/a_][A/b_][B/b_][B/b_][C/c_][C/c_][C/d_][D/d_][D/d_] 55-telecine
>>>>
>>>> I have confirmed it by single-frame stepping through test videos.
>>>
>>> No.
>>
>> The above timing is for an MKV of the 55-telecine transcode, not for the
>> decoder's output.
>
> That's telecine=pattern=5 on a 23.976p native progressive source
>
> I thought this thread was about using a soft telecine source , and how
> ffmpeg handles that
>
> because you were making assumptions "So, if the 'i30, TFF' from the decoder
> is correct, the following must be the full picture: "
>
> Obviously i30 does not refer to a 23.976p native progressive source...
>
>
>
>>> Pattern looks correct, but unless you are doing something differently ,
>>> your
>>> timescale is not correct
>>>
>>> When input is vob, mpeg2-ps or mpeg-es using soft telecine in my test,
>>> using
>>> telecine=pattern=5 the output frame rate is 74.925 as expected  (2.5 *
>>> 29.97
>>> = 74.925).
>>
>> Not for me. I've seen 74.925 FPS just one time. Since I considered it a
>> failure, I didn't save the
>> video and its log, so I don't know how I got it.
>>
>>> This mean RF flags are used, 29.97i output from decoder. Since
>>> its 74.925fps, the scale in your diagram for 1/6s is wrong for
>>> telecine=pattern=5
>>
>> For this command line:
>>
>> ffmpeg -report -i "00001.018.m2ts" -filter_complex
>> "telecine=pattern=5,split=5[A][B][C][D][E],[A]select='eq(mod(n+1\,5)\,1)'[F],[B]select='eq(mod(n+1\,5)\,2)'[G],[C]select='eq(mod(n+1\,5)\,3)'[H],[D]select='eq(mod(n+1\,5)\,4)'[I],[E]select='eq(mod(n+1\,5)\,0)'[J],[F][G][H][I][J]interleave=nb_inputs=5"
>> -map 0 -c:v libx264 -crf 20 -codec:a copy -codec:s copy
>> "C:\AVOut\00001.018.4.MKV"
>>
>> MPV playback of '00001.018.4.MKV' says "FPS: 59.940 (estimated)" (not
>> 74.925fps).
>
> Is that m2ts a soft telecine BD's ? This thread was about soft telecine...

I see your misunderstanding. Here's my original diagram:


|<--------------------------1/6s-------------------------->|
[A/a__________][B/b__________][C/c__________][D/d__________] source
[A/a_______][B/b_______][B/c_______][C/d_______][D/d_______] hard telecine
[A/-_][-/a_][B/-_][-/b_][B/-_][-/c_][C/-_][-/d_][D/-_][-/d_] i30-TFF
[A/a_______][B/b_______][B/c_______][C/d_______][D/d_______] deinterlace
[A/a__________][B/b__________][C/c__________][D/d__________] detelecine
[A/a_][A/a_][A/b_][B/b_][B/b_][C/c_][C/c_][C/d_][D/d_][D/d_] 55-telecine

So, you see, the source is p24. "i30-TFF" is what I thought came out of the decoder -- that is based
on the latest info (and it is what took me by surprise as I'd always thought that ffmpeg decoders
always output frames).

Soft telecine is nowhere in that diagram. Sorry for the confusion.

> Most film BD's are native progressive 23.976

Yes, that is the "source" in the diagram.

>>> Both ffplay and mpv look like they ignore the repeat field flags, the
>>> preview is progressive 23.976p
>>
>> I use MPV. I'm unsure what you mean by "preview". ...and "preview" of
>> what? The decoder output or
>> the MKV output video?
>
> The "preview" of the video is what you see when ffplay window opens or mpv
> opens. It's a RGB converted representation what you are using as input to
> mpv or ffplay .

Oh, I didn't know there was a distinction. I thought it was just the playback.

> So I'm referring to a soft telecine source, because that's
> what you were talking about

I hope that confusion is resolved.


_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffmpeg architecture question #2

Mark Filipak
In reply to this post by pdr0
Sorry, the p24 "source" *is* soft telecine.

On 04/24/2020 11:06 PM, pdr0 wrote:

> Mark Filipak wrote
>>
>>>
>>> If you take a soft telecine input, encode it directly to rawvideo or
>>> lossless output, you can confirm this.
>>> The output is 29.97 (interlaced content) .
>>>
>>>> When I do 'telecine=pattern=5', I wind up with this
>>>>
>>>> |<--------------------------1/6s-------------------------->|
>>>> [A/a_][A/a_][A/b_][B/b_][B/b_][C/c_][C/c_][C/d_][D/d_][D/d_] 55-telecine
>>>>
>>>> I have confirmed it by single-frame stepping through test videos.
>>>
>>> No.
>>
>> The above timing is for an MKV of the 55-telecine transcode, not for the
>> decoder's output.
>
> That's telecine=pattern=5 on a 23.976p native progressive source
>
> I thought this thread was about using a soft telecine source , and how
> ffmpeg handles that
>
> because you were making assumptions "So, if the 'i30, TFF' from the decoder
> is correct, the following must be the full picture: "
>
> Obviously i30 does not refer to a 23.976p native progressive source...
>
>
>
>>> Pattern looks correct, but unless you are doing something differently ,
>>> your
>>> timescale is not correct
>>>
>>> When input is vob, mpeg2-ps or mpeg-es using soft telecine in my test,
>>> using
>>> telecine=pattern=5 the output frame rate is 74.925 as expected  (2.5 *
>>> 29.97
>>> = 74.925).
>>
>> Not for me. I've seen 74.925 FPS just one time. Since I considered it a
>> failure, I didn't save the
>> video and its log, so I don't know how I got it.
>>
>>> This mean RF flags are used, 29.97i output from decoder. Since
>>> its 74.925fps, the scale in your diagram for 1/6s is wrong for
>>> telecine=pattern=5
>>
>> For this command line:
>>
>> ffmpeg -report -i "00001.018.m2ts" -filter_complex
>> "telecine=pattern=5,split=5[A][B][C][D][E],[A]select='eq(mod(n+1\,5)\,1)'[F],[B]select='eq(mod(n+1\,5)\,2)'[G],[C]select='eq(mod(n+1\,5)\,3)'[H],[D]select='eq(mod(n+1\,5)\,4)'[I],[E]select='eq(mod(n+1\,5)\,0)'[J],[F][G][H][I][J]interleave=nb_inputs=5"
>> -map 0 -c:v libx264 -crf 20 -codec:a copy -codec:s copy
>> "C:\AVOut\00001.018.4.MKV"
>>
>> MPV playback of '00001.018.4.MKV' says "FPS: 59.940 (estimated)" (not
>> 74.925fps).
>
> Is that m2ts a soft telecine BD's ? This thread was about soft telecine...

I see your misunderstanding. Here's my original diagram:


|<--------------------------1/6s-------------------------->|
[A/a__________][B/b__________][C/c__________][D/d__________] source
[A/a_______][B/b_______][B/c_______][C/d_______][D/d_______] hard telecine
[A/-_][-/a_][B/-_][-/b_][B/-_][-/c_][C/-_][-/d_][D/-_][-/d_] i30-TFF
[A/a_______][B/b_______][B/c_______][C/d_______][D/d_______] deinterlace
[A/a__________][B/b__________][C/c__________][D/d__________] detelecine
[A/a_][A/a_][A/b_][B/b_][B/b_][C/c_][C/c_][C/d_][D/d_][D/d_] 55-telecine

So, you see, the source is p24. "i30-TFF" is what I thought came out of the decoder -- that is based
on the latest info (and it is what took me by surprise as I'd always thought that ffmpeg decoders
always output frames).

Soft telecine is nowhere in that diagram. Sorry for the confusion.

CORRECTION: The p24 "source" *is* soft telecine. I'm working on BDs and DVDs in parallel and
momentarily got my wires crossed.

Of course, it is soft telecined. Otherwise, i30-TFF wouldn't be there at all. The p24 source would
go directly to 55-telecine.

> Most film BD's are native progressive 23.976

Yes, that is the "source" in the diagram.

>>> Both ffplay and mpv look like they ignore the repeat field flags, the
>>> preview is progressive 23.976p
>>
>> I use MPV. I'm unsure what you mean by "preview". ...and "preview" of
>> what? The decoder output or
>> the MKV output video?
>
> The "preview" of the video is what you see when ffplay window opens or mpv
> opens. It's a RGB converted representation what you are using as input to
> mpv or ffplay .

Oh, I didn't know there was a distinction. I thought it was just the playback.

> So I'm referring to a soft telecine source, because that's
> what you were talking about

I hope that confusion is resolved.


_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffmpeg architecture question #2

Carl Eugen Hoyos-2
In reply to this post by Mark Filipak
Am Sa., 25. Apr. 2020 um 04:20 Uhr schrieb Mark Filipak
<[hidden email]>:

>
> On 04/24/2020 01:22 PM, Carl Eugen Hoyos wrote:
> >
> >
> >> Am 24.04.2020 um 11:10 schrieb Mark Filipak <[hidden email]>:
> >>
> >> I've been told that, for soft telecined video the decoder is fully compliant
> >> and therefore outputs 30fps
> >
> > (“fps” is highly ambiguous in this sentence.)

The decoder is "compliant" in the sense that the stream it outputs for
soft-telecined
input has a time base of 30000/1001, the output has 24000/1001 "frames per
second" though.

> > This is not correct.
> > I believe I told you some time ago that this is not how the decoder behaves.
>
> I beg your pardon, Carl Eugen. I thought you said that the decoders are
> fully compliant and therefore produce interlaced fields.

I am quite sure I wrote the opposite several times as replies to your mails.
Note that FFmpeg cannot produce "fields" because it cannot deal with devices
that know what a "field" is.
(Just as there are "interlacing" filters that you would call differently if it
were your decision, we also decided to name some of the filters that
deal with frames "field"-filters because this allows understanding the filters'
purpose for everybody except broadcast and video engineers like you.)

> > I believe such a behaviour would not make sense for FFmpeg (because
> > you cannot connect FFmpeg’s output to an NTSC CRT). The telecine filter
> > would not work at all if above were the case.
> > Or in other words: FFmpeg outputs approximately 24 frames per second for
> > typical soft-telecined program streams.

> > The only thing FFmpeg does to be “compliant” is to forward the correct time base.
>
> By "correct time base" you mean 24/1.001, correct?

lol, no

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".