ffmpeg architecture question

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

ffmpeg architecture question

Mark Filipak
Thanks to pdr0 -at- shaw.ca, My quest for the (nearly perfect) p24-to-p60 transcode has concluded.

But remaining is an ffmpeg behavior that seems (to me) to be key to understanding ffmpeg
architecture, to wit: The characteristics of frame traversal through a filter chain.

 From a prior topic:
-----
Filter graph:

split[A]    select='not(eq(mod(n+1\,5)\,3))'       [C]interleave
      [B]split[D]select='eq(mod(n+1\,5)\,2)'[F]blend[D]
              [E]select='eq(mod(n+1\,5)\,3)'[G]

What I expected/hoped:

split[A]         0 1 _ 3 4         [C]interleave 0 1 B 3 4  //5 frames
      [B]split[D] _ 1 _ _ _ [F]blend[D]               |
              [E] _ _ 2 _ _ [G]                       blend of 1+2

What appears to be happening:

split[A]         0 1 _ 3 4         [C]interleave 0 1 _ 3 4  //4 frames
      [B]split[D] _ _ _ _ _ [F]blend[D]
              [E] _ _ 2 _ _ [G]

The behavior is as though because frame 1 (see Note) can take the [A][C] path, it does take it &
that leaves nothing left to also take the [B][D][F] path, so blend never outputs.
-----
(Note: I originally wrote "frame n+1==1" but that was an error.)

I assume that frame numbers are assigned at the input of the filter chain as frames are encountered,
and that the following actions occur.
Frame 0: Traverses [A][C] and is enqueued at [C].
Frame 1: Traverses [A][C] and is enqueued at [C] (see Proposition).
Frame 2: Traverses [B][E][G] and is enqueued at [G].
Frame 3: Traverses [A][C] and is enqueued at [C].
Frame 4: Traverses [A][C] and is enqueued at [C].

Proposition: Frame 1 could also traverse [B][D][F] and be enqueued at [F] but since it's already
enqueued at [C], it does not do so.

Specifically, it appears that ffmpeg does not recurse the filter chain for frames that are already
enqueued, thus Frame 1 is not enqueued at [F], thus 'blend' doesn't activate when Frame 2 arrives at
[G], thus Frame 2 is never enqueued at [D] and never appears in the output of 'interleave'.

Is what I've written correct? Authoritative confirmation or correction of this architectural detail
is desired.

Regards,
Mark.
_______________________________________________
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

Michael Koch
Am 17.04.2020 um 08:02 schrieb Mark Filipak:

> Thanks to pdr0 -at- shaw.ca, My quest for the (nearly perfect)
> p24-to-p60 transcode has concluded.
>
> But remaining is an ffmpeg behavior that seems (to me) to be key to
> understanding ffmpeg architecture, to wit: The characteristics of
> frame traversal through a filter chain.
>
> From a prior topic:
> -----
> Filter graph:
>
> split[A]    select='not(eq(mod(n+1\,5)\,3))'       [C]interleave
>      [B]split[D]select='eq(mod(n+1\,5)\,2)'[F]blend[D]
>              [E]select='eq(mod(n+1\,5)\,3)'[G]
>
> What I expected/hoped:
>
> split[A]         0 1 _ 3 4         [C]interleave 0 1 B 3 4  //5 frames
>      [B]split[D] _ 1 _ _ _ [F]blend[D]               |
>              [E] _ _ 2 _ _ [G]                       blend of 1+2
>
> What appears to be happening:
>
> split[A]         0 1 _ 3 4         [C]interleave 0 1 _ 3 4  //4 frames
>      [B]split[D] _ _ _ _ _ [F]blend[D]
>              [E] _ _ 2 _ _ [G]
>
> The behavior is as though because frame 1 (see Note) can take the
> [A][C] path, it does take it & that leaves nothing left to also take
> the [B][D][F] path, so blend never outputs.

Only an untested idea, what happens when you change the order of the
inputs of the blend filter, first [G] and then [F]?

Michael

_______________________________________________
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

Mark Filipak
On 04/17/2020 02:41 AM, Michael Koch wrote:

> Am 17.04.2020 um 08:02 schrieb Mark Filipak:
>> Thanks to pdr0 -at- shaw.ca, My quest for the (nearly perfect) p24-to-p60 transcode has concluded.
>>
>> But remaining is an ffmpeg behavior that seems (to me) to be key to understanding ffmpeg
>> architecture, to wit: The characteristics of frame traversal through a filter chain.
>>
>> From a prior topic:
>> -----
>> Filter graph:
>>
>> split[A]    select='not(eq(mod(n+1\,5)\,3))'       [C]interleave
>>      [B]split[D]select='eq(mod(n+1\,5)\,2)'[F]blend[D]
>>              [E]select='eq(mod(n+1\,5)\,3)'[G]
>>
>> What I expected/hoped:
>>
>> split[A]         0 1 _ 3 4         [C]interleave 0 1 B 3 4  //5 frames
>>      [B]split[D] _ 1 _ _ _ [F]blend[D]               |
>>              [E] _ _ 2 _ _ [G]                       blend of 1+2
>>
>> What appears to be happening:
>>
>> split[A]         0 1 _ 3 4         [C]interleave 0 1 _ 3 4  //4 frames
>>      [B]split[D] _ _ _ _ _ [F]blend[D]
>>              [E] _ _ 2 _ _ [G]
>>
>> The behavior is as though because frame 1 (see Note) can take the [A][C] path, it does take it &
>> that leaves nothing left to also take the [B][D][F] path, so blend never outputs.
>
> Only an untested idea, what happens when you change the order of the inputs of the blend filter,
> first [G] and then [F]?

This would be an important topic for someone writing a book, eh?

I assume you mean this, Michael:

split[A]    select='not(eq(mod(n+1\,5)\,3))'       [C]interleave
      [B]split[D]select='eq(mod(n+1\,5)\,2)'[F]blend[D]
              [E]select='eq(mod(n+1\,5)\,3)'[G]

split[A]         0 1 _ 3 4         [C]interleave 0 1 _ 3 4  //4 frames
      [B]split[D] _ _ 2 _ _ [F]blend[D]
              [E] _ _ _ _ _ [G]

Yes, I've done that, not because I thought it would make a difference, but because it just happens
to have been my first configuration.
_______________________________________________
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

Michael Koch
Am 17.04.2020 um 09:44 schrieb Mark Filipak:

> On 04/17/2020 02:41 AM, Michael Koch wrote:
>> Am 17.04.2020 um 08:02 schrieb Mark Filipak:
>>> Thanks to pdr0 -at- shaw.ca, My quest for the (nearly perfect)
>>> p24-to-p60 transcode has concluded.
>>>
>>> But remaining is an ffmpeg behavior that seems (to me) to be key to
>>> understanding ffmpeg architecture, to wit: The characteristics of
>>> frame traversal through a filter chain.
>>>
>>> From a prior topic:
>>> -----
>>> Filter graph:
>>>
>>> split[A]    select='not(eq(mod(n+1\,5)\,3))' [C]interleave
>>>      [B]split[D]select='eq(mod(n+1\,5)\,2)'[F]blend[D]
>>>              [E]select='eq(mod(n+1\,5)\,3)'[G]
>>>
>>> What I expected/hoped:
>>>
>>> split[A]         0 1 _ 3 4         [C]interleave 0 1 B 3 4 //5 frames
>>>      [B]split[D] _ 1 _ _ _ [F]blend[D]               |
>>>              [E] _ _ 2 _ _ [G]                       blend of 1+2
>>>
>>> What appears to be happening:
>>>
>>> split[A]         0 1 _ 3 4         [C]interleave 0 1 _ 3 4 //4 frames
>>>      [B]split[D] _ _ _ _ _ [F]blend[D]
>>>              [E] _ _ 2 _ _ [G]
>>>
>>> The behavior is as though because frame 1 (see Note) can take the
>>> [A][C] path, it does take it & that leaves nothing left to also take
>>> the [B][D][F] path, so blend never outputs.
>>
>> Only an untested idea, what happens when you change the order of the
>> inputs of the blend filter, first [G] and then [F]?
>
> This would be an important topic for someone writing a book, eh?
>
> I assume you mean this, Michael:
>
> split[A]    select='not(eq(mod(n+1\,5)\,3))'       [C]interleave
>      [B]split[D]select='eq(mod(n+1\,5)\,2)'[F]blend[D]
>              [E]select='eq(mod(n+1\,5)\,3)'[G]
>
> split[A]         0 1 _ 3 4         [C]interleave 0 1 _ 3 4  //4 frames
>      [B]split[D] _ _ 2 _ _ [F]blend[D]
>              [E] _ _ _ _ _ [G]
>

no, I meant replace [F][G]blend[D] by [G][F]blend[D] and leave
everything else as it is.

Michael

_______________________________________________
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

kumowoon1025
Hi,

> no, I meant replace [F][G]blend[D] by [G][F]blend[D] and leave everything else as it is.


I thought the latter was the intended order (or maybe it's just the order my brain read it in). The other one results in a ton of duplicate timestamp errors and the correction cancels something out, it looks closer to the original 24/1.001.

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

Paul B Mahol
In reply to this post by Mark Filipak
On 4/17/20, Mark Filipak <[hidden email]> wrote:

> Thanks to pdr0 -at- shaw.ca, My quest for the (nearly perfect) p24-to-p60
> transcode has concluded.
>
> But remaining is an ffmpeg behavior that seems (to me) to be key to
> understanding ffmpeg
> architecture, to wit: The characteristics of frame traversal through a
> filter chain.
>
>  From a prior topic:
> -----
> Filter graph:

That is not filter graph. It is your wrong interpretation of it.
I can not dechiper it at all, because your removed crucial info like ','

>
> split[A]    select='not(eq(mod(n+1\,5)\,3))'       [C]interleave
>       [B]split[D]select='eq(mod(n+1\,5)\,2)'[F]blend[D]
>               [E]select='eq(mod(n+1\,5)\,3)'[G]
>
> What I expected/hoped:
>
> split[A]         0 1 _ 3 4         [C]interleave 0 1 B 3 4  //5 frames
>       [B]split[D] _ 1 _ _ _ [F]blend[D]               |
>               [E] _ _ 2 _ _ [G]                       blend of 1+2
>
> What appears to be happening:
>
> split[A]         0 1 _ 3 4         [C]interleave 0 1 _ 3 4  //4 frames
>       [B]split[D] _ _ _ _ _ [F]blend[D]
>               [E] _ _ 2 _ _ [G]
>
> The behavior is as though because frame 1 (see Note) can take the [A][C]
> path, it does take it &
> that leaves nothing left to also take the [B][D][F] path, so blend never
> outputs.
> -----
> (Note: I originally wrote "frame n+1==1" but that was an error.)
>
> I assume that frame numbers are assigned at the input of the filter chain as
> frames are encountered,
> and that the following actions occur.
> Frame 0: Traverses [A][C] and is enqueued at [C].
> Frame 1: Traverses [A][C] and is enqueued at [C] (see Proposition).
> Frame 2: Traverses [B][E][G] and is enqueued at [G].
> Frame 3: Traverses [A][C] and is enqueued at [C].
> Frame 4: Traverses [A][C] and is enqueued at [C].
>
> Proposition: Frame 1 could also traverse [B][D][F] and be enqueued at [F]
> but since it's already
> enqueued at [C], it does not do so.
>
> Specifically, it appears that ffmpeg does not recurse the filter chain for
> frames that are already
> enqueued, thus Frame 1 is not enqueued at [F], thus 'blend' doesn't activate
> when Frame 2 arrives at
> [G], thus Frame 2 is never enqueued at [D] and never appears in the output
> of 'interleave'.
>
> Is what I've written correct? Authoritative confirmation or correction of
> this architectural detail
> is desired.
>
> Regards,
> Mark.
> _______________________________________________
> 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".
_______________________________________________
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

Mark Filipak
On 04/17/2020 05:03 AM, Paul B Mahol wrote:
-snip-
> That is not filter graph. It is your wrong interpretation of it.
> I can not dechiper it at all, because your removed crucial info like ','

My filtergraph is slightly abbreviated to keep within a 70 character line limit.

The important thing is to portray the logic of the filter chain.

I think you may be the only person who "can not dec_ip[h]er it".
_______________________________________________
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

Paul B Mahol
On 4/17/20, Mark Filipak <[hidden email]> wrote:

> On 04/17/2020 05:03 AM, Paul B Mahol wrote:
> -snip-
>> That is not filter graph. It is your wrong interpretation of it.
>> I can not dechiper it at all, because your removed crucial info like ','
>
> My filtergraph is slightly abbreviated to keep within a 70 character line
> limit.
>
> The important thing is to portray the logic of the filter chain.
>
> I think you may be the only person who "can not dec_ip[h]er it".

Haha, you are kind of person that never admits own mistakes.
_______________________________________________
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

Mark Filipak
On 04/17/2020 05:38 AM, Paul B Mahol wrote:

> On 4/17/20, Mark Filipak <[hidden email]> wrote:
>> On 04/17/2020 05:03 AM, Paul B Mahol wrote:
>> -snip-
>>> That is not filter graph. It is your wrong interpretation of it.
>>> I can not dechiper it at all, because your removed crucial info like ','
>>
>> My filtergraph is slightly abbreviated to keep within a 70 character line
>> limit.
>>
>> The important thing is to portray the logic of the filter chain.
>>
>> I think you may be the only person who "can not dec_ip[h]er it".
>
> Haha, you are kind of person that never admits own mistakes.

You apparently aren't monitoring other threads. Just a couple of minutes ago I acknowledged that I
was wrong about DTS.

The difference between us, Paul, is that you engage in character assassination. If you stopped
trying to assign motives and looked purely at behavior, I think you'd find more joy.

_______________________________________________
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

Paul B Mahol
On 4/17/20, Mark Filipak <[hidden email]> wrote:

> On 04/17/2020 05:38 AM, Paul B Mahol wrote:
>> On 4/17/20, Mark Filipak <[hidden email]> wrote:
>>> On 04/17/2020 05:03 AM, Paul B Mahol wrote:
>>> -snip-
>>>> That is not filter graph. It is your wrong interpretation of it.
>>>> I can not dechiper it at all, because your removed crucial info like ','
>>>
>>> My filtergraph is slightly abbreviated to keep within a 70 character line
>>> limit.
>>>
>>> The important thing is to portray the logic of the filter chain.
>>>
>>> I think you may be the only person who "can not dec_ip[h]er it".
>>
>> Haha, you are kind of person that never admits own mistakes.
>
> You apparently aren't monitoring other threads. Just a couple of minutes ago
> I acknowledged that I
> was wrong about DTS.
>
> The difference between us, Paul, is that you engage in character
> assassination. If you stopped
> trying to assign motives and looked purely at behavior, I think you'd find
> more joy.
>

So when you will admit mistake in this thread?
_______________________________________________
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

Mark Filipak
On 04/17/2020 05:48 AM, Paul B Mahol wrote:

> On 4/17/20, Mark Filipak <[hidden email]> wrote:
>> On 04/17/2020 05:38 AM, Paul B Mahol wrote:
>>> On 4/17/20, Mark Filipak <[hidden email]> wrote:
>>>> On 04/17/2020 05:03 AM, Paul B Mahol wrote:
>>>> -snip-
>>>>> That is not filter graph. It is your wrong interpretation of it.
>>>>> I can not dechiper it at all, because your removed crucial info like ','
>>>>
>>>> My filtergraph is slightly abbreviated to keep within a 70 character line
>>>> limit.
>>>>
>>>> The important thing is to portray the logic of the filter chain.
>>>>
>>>> I think you may be the only person who "can not dec_ip[h]er it".
>>>
>>> Haha, you are kind of person that never admits own mistakes.
>>
>> You apparently aren't monitoring other threads. Just a couple of minutes ago
>> I acknowledged that I
>> was wrong about DTS.
>>
>> The difference between us, Paul, is that you engage in character
>> assassination. If you stopped
>> trying to assign motives and looked purely at behavior, I think you'd find
>> more joy.
>>
>
> So when you will admit mistake in this thread?

When it's pointed out to me. By the way, the filter graph sketch I posted is not even complete. I
left some stuff out that is not germane (again, to stay within 70 characters).
_______________________________________________
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

Mark Filipak
In reply to this post by Michael Koch


On 04/17/2020 03:56 AM, Michael Koch wrote:

> Am 17.04.2020 um 09:44 schrieb Mark Filipak:
>> On 04/17/2020 02:41 AM, Michael Koch wrote:
>>> Am 17.04.2020 um 08:02 schrieb Mark Filipak:
>>>> Thanks to pdr0 -at- shaw.ca, My quest for the (nearly perfect) p24-to-p60 transcode has concluded.
>>>>
>>>> But remaining is an ffmpeg behavior that seems (to me) to be key to understanding ffmpeg
>>>> architecture, to wit: The characteristics of frame traversal through a filter chain.
>>>>
>>>> From a prior topic:
>>>> -----
>>>> Filter graph:
>>>>
>>>> split[A]    select='not(eq(mod(n+1\,5)\,3))' [C]interleave
>>>>      [B]split[D]select='eq(mod(n+1\,5)\,2)'[F]blend[D]
>>>>              [E]select='eq(mod(n+1\,5)\,3)'[G]
>>>>
>>>> What I expected/hoped:
>>>>
>>>> split[A]         0 1 _ 3 4         [C]interleave 0 1 B 3 4 //5 frames
>>>>      [B]split[D] _ 1 _ _ _ [F]blend[D]               |
>>>>              [E] _ _ 2 _ _ [G]                       blend of 1+2
>>>>
>>>> What appears to be happening:
>>>>
>>>> split[A]         0 1 _ 3 4         [C]interleave 0 1 _ 3 4 //4 frames
>>>>      [B]split[D] _ _ _ _ _ [F]blend[D]
>>>>              [E] _ _ 2 _ _ [G]
>>>>
>>>> The behavior is as though because frame 1 (see Note) can take the [A][C] path, it does take it &
>>>> that leaves nothing left to also take the [B][D][F] path, so blend never outputs.
>>>
>>> Only an untested idea, what happens when you change the order of the inputs of the blend filter,
>>> first [G] and then [F]?
>>
>> This would be an important topic for someone writing a book, eh?
>>
>> I assume you mean this, Michael:
>>
>> split[A]    select='not(eq(mod(n+1\,5)\,3))'       [C]interleave
>>      [B]split[D]select='eq(mod(n+1\,5)\,2)'[F]blend[D]
>>              [E]select='eq(mod(n+1\,5)\,3)'[G]
>>
>> split[A]         0 1 _ 3 4         [C]interleave 0 1 _ 3 4  //4 frames
>>      [B]split[D] _ _ 2 _ _ [F]blend[D]
>>              [E] _ _ _ _ _ [G]
>>
>
> no, I meant replace [F][G]blend[D] by [G][F]blend[D] and leave everything else as it is.
>
> Michael

That will have to be an experiment for you to try because I'm no longer using 'blend' and I've found
a filter chain that's not so complex (i.e., not 2 levels of 'select'). For a book writer, reworking
my original filter chain (posted in other topics) and making the change you suggest would be a
worthy experiment. I mean, not recusing the filter chain for alternative paths when a existing path
has succeeded, if that is factual, is a rather important ffmpeg architectural feature.

Let me know if you need me to run experiments. I'll try to reconstruct my original filter chain.

Regards,
Mark.
_______________________________________________
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

Monex
In reply to this post by Mark Filipak
On 17/04/2020 11:52, Mark Filipak wrote:

> On 04/17/2020 05:48 AM, Paul B Mahol wrote:
>> On 4/17/20, Mark Filipak <[hidden email]> wrote:
>>> On 04/17/2020 05:38 AM, Paul B Mahol wrote:
>>>> On 4/17/20, Mark Filipak <[hidden email]> wrote:
>>>>> On 04/17/2020 05:03 AM, Paul B Mahol wrote:
>>>>> -snip-
>>>>>> That is not filter graph. It is your wrong interpretation of it.
>>>>>> I can not dechiper it at all, because your removed crucial info like ','
>>>>>
>>>>> My filtergraph is slightly abbreviated to keep within a 70 character line
>>>>> limit.
>>>>>
>>>>> The important thing is to portray the logic of the filter chain.
>>>>>
>>>>> I think you may be the only person who "can not dec_ip[h]er it".
>>>>
>>>> Haha, you are kind of person that never admits own mistakes.
>>>
>>> You apparently aren't monitoring other threads. Just a couple of minutes ago
>>> I acknowledged that I
>>> was wrong about DTS.
>>>
>>> The difference between us, Paul, is that you engage in character
>>> assassination. If you stopped
>>> trying to assign motives and looked purely at behavior, I think you'd find
>>> more joy.
>>>
>>
>> So when you will admit mistake in this thread?
>
> When it's pointed out to me. By the way, the filter graph sketch I posted is not even complete. I left some stuff out that is not germane (again, to stay within 70 characters).
>
>
It is often requested on this list NOT to cut your command lines and/or console output. Most technical people are capable of following a line that is wrapped after 70 characters. Escape your long lines (backslash) if necessary.

Please do not use complicated phrases or words like "germane" - many ffmpeg-users are not native English speakers and you are causing confusion; it is not necessary on a technical list.

You are too verbose (noisy) in your posts. Verbosity is only useful in commands and console outputs, or when telling someone to stfu.
_______________________________________________
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

Mark Filipak
In reply to this post by Michael Koch
On 04/17/2020 03:56 AM, Michael Koch wrote:

> Am 17.04.2020 um 09:44 schrieb Mark Filipak:
>> On 04/17/2020 02:41 AM, Michael Koch wrote:
>>> Am 17.04.2020 um 08:02 schrieb Mark Filipak:
>>>> Thanks to pdr0 -at- shaw.ca, My quest for the (nearly perfect) p24-to-p60 transcode has concluded.
>>>>
>>>> But remaining is an ffmpeg behavior that seems (to me) to be key to understanding ffmpeg
>>>> architecture, to wit: The characteristics of frame traversal through a filter chain.
>>>>
>>>> From a prior topic:
>>>> -----
>>>> Filter graph:
>>>>
>>>> split[A]    select='not(eq(mod(n+1\,5)\,3))' [C]interleave
>>>>      [B]split[D]select='eq(mod(n+1\,5)\,2)'[F]blend[D]
>>>>              [E]select='eq(mod(n+1\,5)\,3)'[G]
>>>>
>>>> What I expected/hoped:
>>>>
>>>> split[A]         0 1 _ 3 4         [C]interleave 0 1 B 3 4 //5 frames
>>>>      [B]split[D] _ 1 _ _ _ [F]blend[D]               |
>>>>              [E] _ _ 2 _ _ [G]                       blend of 1+2
>>>>
>>>> What appears to be happening:
>>>>
>>>> split[A]         0 1 _ 3 4         [C]interleave 0 1 _ 3 4 //4 frames
>>>>      [B]split[D] _ _ _ _ _ [F]blend[D]
>>>>              [E] _ _ 2 _ _ [G]
>>>>
>>>> The behavior is as though because frame 1 (see Note) can take the [A][C] path, it does take it &
>>>> that leaves nothing left to also take the [B][D][F] path, so blend never outputs.
>>>
>>> Only an untested idea, what happens when you change the order of the inputs of the blend filter,
>>> first [G] and then [F]?
>>
>> This would be an important topic for someone writing a book, eh?
>>
>> I assume you mean this, Michael:
>>
>> split[A]    select='not(eq(mod(n+1\,5)\,3))'       [C]interleave
>>      [B]split[D]select='eq(mod(n+1\,5)\,2)'[F]blend[D]
>>              [E]select='eq(mod(n+1\,5)\,3)'[G]
>>
>> split[A]         0 1 _ 3 4         [C]interleave 0 1 _ 3 4  //4 frames
>>      [B]split[D] _ _ 2 _ _ [F]blend[D]
>>              [E] _ _ _ _ _ [G]
>>
>
> no, I meant replace [F][G]blend[D] by [G][F]blend[D] and leave everything else as it is.
>
> Michael

I found my old command lines in a log file.
=====
: Run original filter chain
SET FFREPORT=file=FOO-HG.LOG:level=32

ffmpeg -i %1 -filter_complex
"telecine=pattern=46,split[A][B],[A]select='not(eq(mod(n+1\,5)\,3))'[C],[B]split[E][F],[E]select='eq(mod(n+1\,5)\,2)'[G],[F]select='eq(mod(n+1\,5)\,3)'[H],[H][G]blend[D],[C][D]interleave"
-map 0 -c:v libx264 -crf 20 -an -sn "C:\AVOut\FOO-HG.MKV"

: Run reversed 'blend' inputs
SET FFREPORT=file=FOO-GH.LOG:level=32

ffmpeg -i %1 -filter_complex
"telecine=pattern=46,split[A][B],[A]select='not(eq(mod(n+1\,5)\,3))'[C],[B]split[E][F],[E]select='eq(mod(n+1\,5)\,2)'[G],[F]select='eq(mod(n+1\,5)\,3)'[H],[G][H]blend[D],[C][D]interleave"
-map 0 -c:v libx264 -crf 20 -an -sn "C:\AVOut\FOO-GH.MKV"
=====
There is a difference. Here are the logs

ffmpeg started on 2020-04-17 at 06:36:11
Report written to "FOO-HG.LOG"
Log level: 32
Command line:
ffmpeg -i "M:\\Test Videos\\23.976p.mkv" -filter_complex
"telecine=pattern=46,split[A][B],[A]select='not(eq(mod(n+1\\,5)\\,3))'[C],[B]split[E][F],[E]select='eq(mod(n+1\\,5)\\,2)'[G],[F]select='eq(mod(n+1\\,5)\\,3)'[H],[H][G]blend[D],[C][D]interleave"
-map 0 -c:v libx264 -crf 20 -an -sn "C:\\AVOut\\FOO-HG.MKV"
ffmpeg version git-2020-04-03-52523b6 Copyright (c) 2000-2020 the FFmpeg developers
   built with gcc 9.3.1 (GCC) 20200328
   configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls
--enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype
--enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt
--enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp
--enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib
--enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc
--enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx
--enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec
--enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
   libavutil      56. 42.102 / 56. 42.102
   libavcodec     58. 77.101 / 58. 77.101
   libavformat    58. 42.100 / 58. 42.100
   libavdevice    58.  9.103 / 58.  9.103
   libavfilter     7. 77.101 /  7. 77.101
   libswscale      5.  6.101 /  5.  6.101
   libswresample   3.  6.100 /  3.  6.100
   libpostproc    55.  6.100 / 55.  6.100
Input #0, matroska,webm, from 'M:\Test Videos\23.976p.mkv':
   Metadata:
     encoder         : libebml v1.3.9 + libmatroska v1.5.2
     creation_time   : 2020-04-04T03:44:24.000000Z
   Duration: 00:00:10.01, start: 0.000000, bitrate: 544 kb/s
     Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9],
23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
     Metadata:
       BPS-eng         : 538378
       DURATION-eng    : 00:00:10.010000000
       NUMBER_OF_FRAMES-eng: 240
       NUMBER_OF_BYTES-eng: 673646
       _STATISTICS_WRITING_APP-eng: mkvmerge v41.0.0 ('Smarra') 64-bit
       _STATISTICS_WRITING_DATE_UTC-eng: 2020-04-04 03:44:24
       _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[Parsed_telecine_0 @ 000001c0aff784c0] Telecine pattern 46 yields up to 3 frames per frame, pts
advance factor: 4/10
Stream mapping:
   Stream #0:0 (h264) -> telecine
   interleave -> Stream #0:0 (libx264)
Press [q] to stop, [?] for help
[Parsed_telecine_0 @ 000001c0afb7bec0] Telecine pattern 46 yields up to 3 frames per frame, pts
advance factor: 4/10
[libx264 @ 000001c0af952d40] using SAR=1/1
[libx264 @ 000001c0af952d40] MB rate (8160000000) > level limit (16711680)
[libx264 @ 000001c0af952d40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 000001c0af952d40] profile High, level 6.2, 4:2:0, 8-bit
[libx264 @ 000001c0af952d40] 264 - core 159 - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 -
http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex
subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0
deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0
decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0
direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0
rc_lookahead=40 rc=crf mbtree=1 crf=20.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, matroska, to 'C:\AVOut\FOO-HG.MKV':
   Metadata:
     encoder         : Lavf58.42.100
     Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9],
q=-1--1, 1k tbn, 1000k tbc (default)
     Metadata:
       encoder         : Lavc58.77.101 libx264
     Side data:
       cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
frame=   36 fps=0.0 q=0.0 size=       1kB time=00:00:00.00 bitrate=N/A speed=   0x
frame=   94 fps= 93 q=28.0 size=       1kB time=00:00:00.58 bitrate=   8.4kbits/s speed=0.58x
frame=  177 fps=117 q=28.0 size=       1kB time=00:00:01.97 bitrate=   2.5kbits/s speed=1.31x
frame=  260 fps=129 q=28.0 size=       1kB time=00:00:03.35 bitrate=   1.5kbits/s speed=1.66x
frame=  328 fps=130 q=28.0 size=     180kB time=00:00:04.48 bitrate= 327.6kbits/s speed=1.78x
frame=  408 fps=135 q=28.0 size=     180kB time=00:00:05.82 bitrate= 252.6kbits/s speed=1.93x
frame=  485 fps=138 q=28.0 size=     180kB time=00:00:07.10 bitrate= 206.9kbits/s speed=2.02x
frame=  568 fps=141 q=28.0 size=     256kB time=00:00:08.49 bitrate= 246.9kbits/s speed=2.11x
frame=  594 fps=131 q=28.0 size=     256kB time=00:00:08.92 bitrate= 234.9kbits/s speed=1.97x
frame=  594 fps= 36 q=-1.0 Lsize=     442kB time=00:00:09.86 bitrate= 366.8kbits/s speed=0.595x
video:437kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.073745%
[libx264 @ 000001c0af952d40] frame I:3     Avg QP: 6.19  size: 11408
[libx264 @ 000001c0af952d40] frame P:186   Avg QP:19.13  size:  1739
[libx264 @ 000001c0af952d40] frame B:405   Avg QP:16.99  size:   220
[libx264 @ 000001c0af952d40] consecutive B-frames:  0.7% 16.2% 27.3% 55.9%
[libx264 @ 000001c0af952d40] mb I  I16..4: 96.1%  0.9%  2.9%
[libx264 @ 000001c0af952d40] mb P  I16..4:  0.6%  0.4%  0.2%  P16..4:  2.2%  0.7%  0.2%  0.0%  0.0%
   skip:95.7%
[libx264 @ 000001c0af952d40] mb B  I16..4:  0.1%  0.0%  0.0%  B16..8:  1.4%  0.1%  0.0%  direct:
0.0%  skip:98.5%  L0:42.8% L1:55.4% BI: 1.8%
[libx264 @ 000001c0af952d40] 8x8 transform intra:14.6% inter:40.6%
[libx264 @ 000001c0af952d40] coded y,uvDC,uvAC intra: 3.9% 14.9% 12.4% inter: 0.1% 0.4% 0.2%
[libx264 @ 000001c0af952d40] i16 v,h,dc,p: 89% 10%  1%  0%
[libx264 @ 000001c0af952d40] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:  6%  4% 90%  0%  0%  0%  0%  0%  0%
[libx264 @ 000001c0af952d40] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 44% 25% 24%  2%  1%  2%  0%  2%  0%
[libx264 @ 000001c0af952d40] i8c dc,h,v,p: 67% 13% 21%  0%
[libx264 @ 000001c0af952d40] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 000001c0af952d40] ref P L0: 75.3%  2.0% 12.2% 10.4%
[libx264 @ 000001c0af952d40] ref B L0: 79.5% 13.9%  6.6%
[libx264 @ 000001c0af952d40] ref B L1: 98.4%  1.6%
[libx264 @ 000001c0af952d40] kb/s:355.76


ffmpeg started on 2020-04-17 at 06:35:28
Report written to "FOO-GH.LOG"
Log level: 32
Command line:
ffmpeg -i "M:\\Test Videos\\23.976p.mkv" -filter_complex
"telecine=pattern=46,split[A][B],[A]select='not(eq(mod(n+1\\,5)\\,3))'[C],[B]split[E][F],[E]select='eq(mod(n+1\\,5)\\,2)'[G],[F]select='eq(mod(n+1\\,5)\\,3)'[H],[G][H]blend[D],[C][D]interleave"
-map 0 -c:v libx264 -crf 20 -an -sn "C:\\AVOut\\FOO-GH.MKV"
ffmpeg version git-2020-04-03-52523b6 Copyright (c) 2000-2020 the FFmpeg developers
   built with gcc 9.3.1 (GCC) 20200328
   configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls
--enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype
--enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt
--enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp
--enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib
--enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc
--enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx
--enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec
--enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
   libavutil      56. 42.102 / 56. 42.102
   libavcodec     58. 77.101 / 58. 77.101
   libavformat    58. 42.100 / 58. 42.100
   libavdevice    58.  9.103 / 58.  9.103
   libavfilter     7. 77.101 /  7. 77.101
   libswscale      5.  6.101 /  5.  6.101
   libswresample   3.  6.100 /  3.  6.100
   libpostproc    55.  6.100 / 55.  6.100
Input #0, matroska,webm, from 'M:\Test Videos\23.976p.mkv':
   Metadata:
     encoder         : libebml v1.3.9 + libmatroska v1.5.2
     creation_time   : 2020-04-04T03:44:24.000000Z
   Duration: 00:00:10.01, start: 0.000000, bitrate: 544 kb/s
     Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9],
23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
     Metadata:
       BPS-eng         : 538378
       DURATION-eng    : 00:00:10.010000000
       NUMBER_OF_FRAMES-eng: 240
       NUMBER_OF_BYTES-eng: 673646
       _STATISTICS_WRITING_APP-eng: mkvmerge v41.0.0 ('Smarra') 64-bit
       _STATISTICS_WRITING_DATE_UTC-eng: 2020-04-04 03:44:24
       _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[Parsed_telecine_0 @ 000001aa1b2384c0] Telecine pattern 46 yields up to 3 frames per frame, pts
advance factor: 4/10
Stream mapping:
   Stream #0:0 (h264) -> telecine
   interleave -> Stream #0:0 (libx264)
Press [q] to stop, [?] for help
[Parsed_telecine_0 @ 000001aa18f0e700] Telecine pattern 46 yields up to 3 frames per frame, pts
advance factor: 4/10
[libx264 @ 000001aa18ee2d40] using SAR=1/1
[libx264 @ 000001aa18ee2d40] MB rate (8160000000) > level limit (16711680)
[libx264 @ 000001aa18ee2d40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 000001aa18ee2d40] profile High, level 6.2, 4:2:0, 8-bit
[libx264 @ 000001aa18ee2d40] 264 - core 159 - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 -
http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex
subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0
deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0
decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0
direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0
rc_lookahead=40 rc=crf mbtree=1 crf=20.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, matroska, to 'C:\AVOut\FOO-GH.MKV':
   Metadata:
     encoder         : Lavf58.42.100
     Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9],
q=-1--1, 1k tbn, 1000k tbc (default)
     Metadata:
       encoder         : Lavc58.77.101 libx264
     Side data:
       cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
frame=   46 fps=0.0 q=0.0 size=       1kB time=00:00:00.00 bitrate=N/A dup=0 drop=11 speed=   0x
frame=  116 fps=111 q=28.0 size=       1kB time=00:00:01.18 bitrate=   4.1kbits/s dup=0 drop=29
speed=1.14x
frame=  195 fps=126 q=26.0 size=       1kB time=00:00:02.83 bitrate=   1.7kbits/s dup=0 drop=49
speed=1.83x
frame=  262 fps=128 q=28.0 size=       1kB time=00:00:04.23 bitrate=   1.2kbits/s dup=0 drop=65
speed=2.07x
frame=  333 fps=131 q=27.0 size=     211kB time=00:00:05.72 bitrate= 302.5kbits/s dup=0 drop=83
speed=2.25x
frame=  408 fps=133 q=28.0 size=     211kB time=00:00:07.27 bitrate= 238.0kbits/s dup=0 drop=102
speed=2.38x
frame=  479 fps=135 q=27.0 size=     211kB time=00:00:08.76 bitrate= 197.6kbits/s dup=0 drop=120
speed=2.46x
frame=  479 fps=118 q=27.0 size=     211kB time=00:00:08.76 bitrate= 197.6kbits/s dup=0 drop=120
speed=2.15x
video:401kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.988793%
[libx264 @ 000001aa18ee2d40] frame I:2     Avg QP: 8.81  size: 10038
[libx264 @ 000001aa18ee2d40] frame P:178   Avg QP:18.73  size:  1750
[libx264 @ 000001aa18ee2d40] frame B:299   Avg QP:18.46  size:   261
[libx264 @ 000001aa18ee2d40] consecutive B-frames:  0.4% 48.4%  1.9% 49.3%
[libx264 @ 000001aa18ee2d40] mb I  I16..4: 79.3% 18.2%  2.5%
[libx264 @ 000001aa18ee2d40] mb P  I16..4:  0.7%  0.4%  0.2%  P16..4:  2.3%  0.7%  0.2%  0.0%  0.0%
   skip:95.7%
[libx264 @ 000001aa18ee2d40] mb B  I16..4:  0.1%  0.0%  0.0%  B16..8:  1.6%  0.1%  0.0%  direct:
0.0%  skip:98.2%  L0:26.8% L1:71.3% BI: 2.0%
[libx264 @ 000001aa18ee2d40] 8x8 transform intra:24.7% inter:40.6%
[libx264 @ 000001aa18ee2d40] coded y,uvDC,uvAC intra: 4.3% 16.3% 13.6% inter: 0.1% 0.4% 0.3%
[libx264 @ 000001aa18ee2d40] i16 v,h,dc,p: 85% 14%  1%  0%
[libx264 @ 000001aa18ee2d40] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 34%  3% 63%  0%  0%  0%  0%  0%  0%
[libx264 @ 000001aa18ee2d40] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 46% 25% 24%  1%  1%  1%  0%  1%  0%
[libx264 @ 000001aa18ee2d40] i8c dc,h,v,p: 61% 14% 24%  0%
[libx264 @ 000001aa18ee2d40] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 000001aa18ee2d40] ref P L0: 69.3%  1.7% 16.8% 12.1%
[libx264 @ 000001aa18ee2d40] ref B L0: 69.3% 13.6% 17.1%
[libx264 @ 000001aa18ee2d40] ref B L1: 98.4%  1.6%
[libx264 @ 000001aa18ee2d40] kb/s:328.46
_______________________________________________
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

Mark Filipak
In reply to this post by Michael Koch
Argh! I keep making mistakes. I'm working too quickly. You see, I had 2 differing versions: one
using 'telecine=pattern=5' and one using 'telecine=pattern=46'. They tried to do the same thing, but
by differing methods (differing filter graphs). It's really easy to get them mixed up.

Here is a sketch of the original graph:

split[A]    select='not(eq(mod(n+1\,5)\,3))'       [C]interleave
      [B]split[E]select='eq(mod(n+1\,5)\,2)'[G]blend[D]
              [F]select='eq(mod(n+1\,5)\,3)'[H]


Here is a sketch of the graph with 'blend' inputs reversed:

split[A]    select='not(eq(mod(n+1\,5)\,3))'       [C]interleave
      [B]split[E]select='eq(mod(n+1\,5)\,2)'[H]blend[D]
              [F]select='eq(mod(n+1\,5)\,3)'[G]

Here are the command lines (as a unified script):

: Run original filter chain
SET FFREPORT=file=FOO-GH.LOG:level=32

ffmpeg -i %1 -filter_complex
"telecine=pattern=46,split[A][B],[A]select='not(eq(mod(n+1\,5)\,3))'[C],[B]split[E][F],[E]select='eq(mod(n+1\,5)\,2)'[G],[F]select='eq(mod(n+1\,5)\,3)'[H],[G][H]blend[D],[C][D]interleave"
-map 0 -c:v libx264 -crf 20 -an -sn "C:\AVOut\FOO-GH.MKV"

: Run reversed 'blend' inputs
SET FFREPORT=file=FOO-HG.LOG:level=32

ffmpeg -i %1 -filter_complex
"telecine=pattern=46,split[A][B],[A]select='not(eq(mod(n+1\,5)\,3))'[C],[B]split[E][F],[E]select='eq(mod(n+1\,5)\,2)'[G],[F]select='eq(mod(n+1\,5)\,3)'[H],[H][G]blend[D],[C][D]interleave"
-map 0 -c:v libx264 -crf 20 -an -sn "C:\AVOut\FOO-HG.MKV"

Here are the logs in the same order:

ffmpeg started on 2020-04-17 at 06:35:28
Report written to "FOO-GH.LOG"
Log level: 32
Command line:
ffmpeg -i "M:\\Test Videos\\23.976p.mkv" -filter_complex
"telecine=pattern=46,split[A][B],[A]select='not(eq(mod(n+1\\,5)\\,3))'[C],[B]split[E][F],[E]select='eq(mod(n+1\\,5)\\,2)'[G],[F]select='eq(mod(n+1\\,5)\\,3)'[H],[G][H]blend[D],[C][D]interleave"
-map 0 -c:v libx264 -crf 20 -an -sn "C:\\AVOut\\FOO-GH.MKV"
ffmpeg version git-2020-04-03-52523b6 Copyright (c) 2000-2020 the FFmpeg developers
   built with gcc 9.3.1 (GCC) 20200328
   configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls
--enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype
--enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt
--enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp
--enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib
--enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc
--enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx
--enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec
--enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
   libavutil      56. 42.102 / 56. 42.102
   libavcodec     58. 77.101 / 58. 77.101
   libavformat    58. 42.100 / 58. 42.100
   libavdevice    58.  9.103 / 58.  9.103
   libavfilter     7. 77.101 /  7. 77.101
   libswscale      5.  6.101 /  5.  6.101
   libswresample   3.  6.100 /  3.  6.100
   libpostproc    55.  6.100 / 55.  6.100
Input #0, matroska,webm, from 'M:\Test Videos\23.976p.mkv':
   Metadata:
     encoder         : libebml v1.3.9 + libmatroska v1.5.2
     creation_time   : 2020-04-04T03:44:24.000000Z
   Duration: 00:00:10.01, start: 0.000000, bitrate: 544 kb/s
     Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9],
23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
     Metadata:
       BPS-eng         : 538378
       DURATION-eng    : 00:00:10.010000000
       NUMBER_OF_FRAMES-eng: 240
       NUMBER_OF_BYTES-eng: 673646
       _STATISTICS_WRITING_APP-eng: mkvmerge v41.0.0 ('Smarra') 64-bit
       _STATISTICS_WRITING_DATE_UTC-eng: 2020-04-04 03:44:24
       _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[Parsed_telecine_0 @ 000001aa1b2384c0] Telecine pattern 46 yields up to 3 frames per frame, pts
advance factor: 4/10
Stream mapping:
   Stream #0:0 (h264) -> telecine
   interleave -> Stream #0:0 (libx264)
Press [q] to stop, [?] for help
[Parsed_telecine_0 @ 000001aa18f0e700] Telecine pattern 46 yields up to 3 frames per frame, pts
advance factor: 4/10
[libx264 @ 000001aa18ee2d40] using SAR=1/1
[libx264 @ 000001aa18ee2d40] MB rate (8160000000) > level limit (16711680)
[libx264 @ 000001aa18ee2d40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 000001aa18ee2d40] profile High, level 6.2, 4:2:0, 8-bit
[libx264 @ 000001aa18ee2d40] 264 - core 159 - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 -
http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex
subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0
deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0
decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0
direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0
rc_lookahead=40 rc=crf mbtree=1 crf=20.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, matroska, to 'C:\AVOut\FOO-GH.MKV':
   Metadata:
     encoder         : Lavf58.42.100
     Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9],
q=-1--1, 1k tbn, 1000k tbc (default)
     Metadata:
       encoder         : Lavc58.77.101 libx264
     Side data:
       cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
frame=   46 fps=0.0 q=0.0 size=       1kB time=00:00:00.00 bitrate=N/A dup=0 drop=11 speed=   0x
frame=  116 fps=111 q=28.0 size=       1kB time=00:00:01.18 bitrate=   4.1kbits/s dup=0 drop=29
speed=1.14x
frame=  195 fps=126 q=26.0 size=       1kB time=00:00:02.83 bitrate=   1.7kbits/s dup=0 drop=49
speed=1.83x
frame=  262 fps=128 q=28.0 size=       1kB time=00:00:04.23 bitrate=   1.2kbits/s dup=0 drop=65
speed=2.07x
frame=  333 fps=131 q=27.0 size=     211kB time=00:00:05.72 bitrate= 302.5kbits/s dup=0 drop=83
speed=2.25x
frame=  408 fps=133 q=28.0 size=     211kB time=00:00:07.27 bitrate= 238.0kbits/s dup=0 drop=102
speed=2.38x
frame=  479 fps=135 q=27.0 size=     211kB time=00:00:08.76 bitrate= 197.6kbits/s dup=0 drop=120
speed=2.46x
frame=  479 fps=118 q=27.0 size=     211kB time=00:00:08.76 bitrate= 197.6kbits/s dup=0 drop=120
speed=2.15x
video:401kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.988793%
[libx264 @ 000001aa18ee2d40] frame I:2     Avg QP: 8.81  size: 10038
[libx264 @ 000001aa18ee2d40] frame P:178   Avg QP:18.73  size:  1750
[libx264 @ 000001aa18ee2d40] frame B:299   Avg QP:18.46  size:   261
[libx264 @ 000001aa18ee2d40] consecutive B-frames:  0.4% 48.4%  1.9% 49.3%
[libx264 @ 000001aa18ee2d40] mb I  I16..4: 79.3% 18.2%  2.5%
[libx264 @ 000001aa18ee2d40] mb P  I16..4:  0.7%  0.4%  0.2%  P16..4:  2.3%  0.7%  0.2%  0.0%  0.0%
   skip:95.7%
[libx264 @ 000001aa18ee2d40] mb B  I16..4:  0.1%  0.0%  0.0%  B16..8:  1.6%  0.1%  0.0%  direct:
0.0%  skip:98.2%  L0:26.8% L1:71.3% BI: 2.0%
[libx264 @ 000001aa18ee2d40] 8x8 transform intra:24.7% inter:40.6%
[libx264 @ 000001aa18ee2d40] coded y,uvDC,uvAC intra: 4.3% 16.3% 13.6% inter: 0.1% 0.4% 0.3%
[libx264 @ 000001aa18ee2d40] i16 v,h,dc,p: 85% 14%  1%  0%
[libx264 @ 000001aa18ee2d40] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 34%  3% 63%  0%  0%  0%  0%  0%  0%
[libx264 @ 000001aa18ee2d40] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 46% 25% 24%  1%  1%  1%  0%  1%  0%
[libx264 @ 000001aa18ee2d40] i8c dc,h,v,p: 61% 14% 24%  0%
[libx264 @ 000001aa18ee2d40] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 000001aa18ee2d40] ref P L0: 69.3%  1.7% 16.8% 12.1%
[libx264 @ 000001aa18ee2d40] ref B L0: 69.3% 13.6% 17.1%
[libx264 @ 000001aa18ee2d40] ref B L1: 98.4%  1.6%
[libx264 @ 000001aa18ee2d40] kb/s:328.46


ffmpeg started on 2020-04-17 at 06:36:11
Report written to "FOO-HG.LOG"
Log level: 32
Command line:
ffmpeg -i "M:\\Test Videos\\23.976p.mkv" -filter_complex
"telecine=pattern=46,split[A][B],[A]select='not(eq(mod(n+1\\,5)\\,3))'[C],[B]split[E][F],[E]select='eq(mod(n+1\\,5)\\,2)'[G],[F]select='eq(mod(n+1\\,5)\\,3)'[H],[H][G]blend[D],[C][D]interleave"
-map 0 -c:v libx264 -crf 20 -an -sn "C:\\AVOut\\FOO-HG.MKV"
ffmpeg version git-2020-04-03-52523b6 Copyright (c) 2000-2020 the FFmpeg developers
   built with gcc 9.3.1 (GCC) 20200328
   configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls
--enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype
--enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt
--enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp
--enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib
--enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc
--enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx
--enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec
--enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
   libavutil      56. 42.102 / 56. 42.102
   libavcodec     58. 77.101 / 58. 77.101
   libavformat    58. 42.100 / 58. 42.100
   libavdevice    58.  9.103 / 58.  9.103
   libavfilter     7. 77.101 /  7. 77.101
   libswscale      5.  6.101 /  5.  6.101
   libswresample   3.  6.100 /  3.  6.100
   libpostproc    55.  6.100 / 55.  6.100
Input #0, matroska,webm, from 'M:\Test Videos\23.976p.mkv':
   Metadata:
     encoder         : libebml v1.3.9 + libmatroska v1.5.2
     creation_time   : 2020-04-04T03:44:24.000000Z
   Duration: 00:00:10.01, start: 0.000000, bitrate: 544 kb/s
     Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9],
23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
     Metadata:
       BPS-eng         : 538378
       DURATION-eng    : 00:00:10.010000000
       NUMBER_OF_FRAMES-eng: 240
       NUMBER_OF_BYTES-eng: 673646
       _STATISTICS_WRITING_APP-eng: mkvmerge v41.0.0 ('Smarra') 64-bit
       _STATISTICS_WRITING_DATE_UTC-eng: 2020-04-04 03:44:24
       _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[Parsed_telecine_0 @ 000001c0aff784c0] Telecine pattern 46 yields up to 3 frames per frame, pts
advance factor: 4/10
Stream mapping:
   Stream #0:0 (h264) -> telecine
   interleave -> Stream #0:0 (libx264)
Press [q] to stop, [?] for help
[Parsed_telecine_0 @ 000001c0afb7bec0] Telecine pattern 46 yields up to 3 frames per frame, pts
advance factor: 4/10
[libx264 @ 000001c0af952d40] using SAR=1/1
[libx264 @ 000001c0af952d40] MB rate (8160000000) > level limit (16711680)
[libx264 @ 000001c0af952d40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 000001c0af952d40] profile High, level 6.2, 4:2:0, 8-bit
[libx264 @ 000001c0af952d40] 264 - core 159 - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 -
http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex
subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0
deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0
decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0
direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0
rc_lookahead=40 rc=crf mbtree=1 crf=20.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, matroska, to 'C:\AVOut\FOO-HG.MKV':
   Metadata:
     encoder         : Lavf58.42.100
     Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9],
q=-1--1, 1k tbn, 1000k tbc (default)
     Metadata:
       encoder         : Lavc58.77.101 libx264
     Side data:
       cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
frame=   36 fps=0.0 q=0.0 size=       1kB time=00:00:00.00 bitrate=N/A speed=   0x
frame=   94 fps= 93 q=28.0 size=       1kB time=00:00:00.58 bitrate=   8.4kbits/s speed=0.58x
frame=  177 fps=117 q=28.0 size=       1kB time=00:00:01.97 bitrate=   2.5kbits/s speed=1.31x
frame=  260 fps=129 q=28.0 size=       1kB time=00:00:03.35 bitrate=   1.5kbits/s speed=1.66x
frame=  328 fps=130 q=28.0 size=     180kB time=00:00:04.48 bitrate= 327.6kbits/s speed=1.78x
frame=  408 fps=135 q=28.0 size=     180kB time=00:00:05.82 bitrate= 252.6kbits/s speed=1.93x
frame=  485 fps=138 q=28.0 size=     180kB time=00:00:07.10 bitrate= 206.9kbits/s speed=2.02x
frame=  568 fps=141 q=28.0 size=     256kB time=00:00:08.49 bitrate= 246.9kbits/s speed=2.11x
frame=  594 fps=131 q=28.0 size=     256kB time=00:00:08.92 bitrate= 234.9kbits/s speed=1.97x
frame=  594 fps=118 q=28.0 size=     256kB time=00:00:08.92 bitrate= 234.9kbits/s speed=1.77x
video:437kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.073745%
[libx264 @ 000001c0af952d40] frame I:3     Avg QP: 6.19  size: 11408
[libx264 @ 000001c0af952d40] frame P:186   Avg QP:19.13  size:  1739
[libx264 @ 000001c0af952d40] frame B:405   Avg QP:16.99  size:   220
[libx264 @ 000001c0af952d40] consecutive B-frames:  0.7% 16.2% 27.3% 55.9%
[libx264 @ 000001c0af952d40] mb I  I16..4: 96.1%  0.9%  2.9%
[libx264 @ 000001c0af952d40] mb P  I16..4:  0.6%  0.4%  0.2%  P16..4:  2.2%  0.7%  0.2%  0.0%  0.0%
   skip:95.7%
[libx264 @ 000001c0af952d40] mb B  I16..4:  0.1%  0.0%  0.0%  B16..8:  1.4%  0.1%  0.0%  direct:
0.0%  skip:98.5%  L0:42.8% L1:55.4% BI: 1.8%
[libx264 @ 000001c0af952d40] 8x8 transform intra:14.6% inter:40.6%
[libx264 @ 000001c0af952d40] coded y,uvDC,uvAC intra: 3.9% 14.9% 12.4% inter: 0.1% 0.4% 0.2%
[libx264 @ 000001c0af952d40] i16 v,h,dc,p: 89% 10%  1%  0%
[libx264 @ 000001c0af952d40] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:  6%  4% 90%  0%  0%  0%  0%  0%  0%
[libx264 @ 000001c0af952d40] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 44% 25% 24%  2%  1%  2%  0%  2%  0%
[libx264 @ 000001c0af952d40] i8c dc,h,v,p: 67% 13% 21%  0%
[libx264 @ 000001c0af952d40] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 000001c0af952d40] ref P L0: 75.3%  2.0% 12.2% 10.4%
[libx264 @ 000001c0af952d40] ref B L0: 79.5% 13.9%  6.6%
[libx264 @ 000001c0af952d40] ref B L1: 98.4%  1.6%
[libx264 @ 000001c0af952d40] kb/s:355.76
_______________________________________________
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

Mark Filipak
In reply to this post by Monex
On 04/17/2020 06:34 AM, Monex wrote:

> On 17/04/2020 11:52, Mark Filipak wrote:
>> On 04/17/2020 05:48 AM, Paul B Mahol wrote:
>>> On 4/17/20, Mark Filipak <[hidden email]> wrote:
>>>> On 04/17/2020 05:38 AM, Paul B Mahol wrote:
>>>>> On 4/17/20, Mark Filipak <[hidden email]> wrote:
>>>>>> On 04/17/2020 05:03 AM, Paul B Mahol wrote:
>>>>>> -snip-
>>>>>>> That is not filter graph. It is your wrong interpretation of it.
>>>>>>> I can not dechiper it at all, because your removed crucial info like ','
>>>>>>
>>>>>> My filtergraph is slightly abbreviated to keep within a 70 character line
>>>>>> limit.
>>>>>>
>>>>>> The important thing is to portray the logic of the filter chain.
>>>>>>
>>>>>> I think you may be the only person who "can not dec_ip[h]er it".
>>>>>
>>>>> Haha, you are kind of person that never admits own mistakes.
>>>>
>>>> You apparently aren't monitoring other threads. Just a couple of minutes ago
>>>> I acknowledged that I
>>>> was wrong about DTS.
>>>>
>>>> The difference between us, Paul, is that you engage in character
>>>> assassination. If you stopped
>>>> trying to assign motives and looked purely at behavior, I think you'd find
>>>> more joy.
>>>
>>> So when you will admit mistake in this thread?
>>
>> When it's pointed out to me. By the way, the filter graph sketch I posted is not even complete. I left some stuff out that is not germane (again, to stay within 70 characters).
>
> It is often requested on this list NOT to cut your command lines and/or console output.

Well then, I'm good. I've never cut my command lines or console output.

> Most technical people are capable of following a line that is wrapped after 70 characters. Escape your long lines (backslash) if necessary.

I've never seen that prior to this list. What does it do? When I've encountered escaped eols here,
they didn't seem to do anything in my email program (Thunderbird). The lines were broken. I figured
the backslashes must be put in by the poster's OS. Can you inform me or give me a link?

> Please do not use complicated phrases or words like "germane" - many ffmpeg-users are not native English speakers and you are causing confusion; it is not necessary on a technical list.

Supposing that readers have no English dictionary, or access to an on-line dictionary, or access to
Google translate, that leaves me responsible for monitoring my vocabulary. Are you serious? Do I
have to somehow gauge my word usage? I'm always careful to use the best words and punctuation and
sentence construction. I really don't know how to make you happy. You know, if someone doesn't
understand what I write, they can always ask for clarification.

> You are too verbose (noisy) in your posts. Verbosity is only useful in commands and console outputs, or when telling someone to stfu.

"too verbose" == "not cryptic"?

Your complaints are ridiculous.

_______________________________________________
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

Mark Filipak
In reply to this post by Michael Koch
I reran the tests with these command lines:

SET FFREPORT=file=FOO-GH.LOG:level=32

ffmpeg -i %1 -filter_complex
"telecine=pattern=46,split[A][B],[A]select='not(eq(mod(n+1\,5)\,3))'[C],[B]split[E][F],[E]select='eq(mod(n+1\,5)\,2)',datascope=size=1920x1080:x=45:y=340:mode=color2[G],[F]select='eq(mod(n+1\,5)\,3)'[H],[G][H]blend[D],[C][D]interleave"
-map 0 -c:v libx264 -crf 20 -an -sn "C:\AVOut\FOO-GH.MKV"

SET FFREPORT=file=FOO-HG.LOG:level=32

ffmpeg -i %1 -filter_complex
"telecine=pattern=46,split[A][B],[A]select='not(eq(mod(n+1\,5)\,3))'[C],[B]split[E][F],[E]select='eq(mod(n+1\,5)\,2)',datascope=size=1920x1080:x=45:y=340:mode=color2[G],[F]select='eq(mod(n+1\,5)\,3)'[H],[H][G]blend[D],[C][D]interleave"
-map 0 -c:v libx264 -crf 20 -an -sn "C:\AVOut\FOO-HG.MKV"

The datascope doesn't appear in either output, so frame 1 (zero-based) is not traversing [E][H]
(upper command) or [E][G] (lower command).

Therefore, I'm pretty confident that once frame 1 gets enqueued at [C], the filter chain is not
recursed.

Another interesting thing is the behavior of 'blend'.

If blend gets a hit to its 2nd input (but not the 1st) the total frames output = 479.

If blend gets a hit to its 1st input (but not the 2nd) the total frames output = 594.
_______________________________________________
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

Paul B Mahol
On 4/17/20, Mark Filipak <[hidden email]> wrote:

> I reran the tests with these command lines:
>
> SET FFREPORT=file=FOO-GH.LOG:level=32
>
> ffmpeg -i %1 -filter_complex
> "telecine=pattern=46,split[A][B],[A]select='not(eq(mod(n+1\,5)\,3))'[C],[B]split[E][F],[E]select='eq(mod(n+1\,5)\,2)',datascope=size=1920x1080:x=45:y=340:mode=color2[G],[F]select='eq(mod(n+1\,5)\,3)'[H],[G][H]blend[D],[C][D]interleave"
> -map 0 -c:v libx264 -crf 20 -an -sn "C:\AVOut\FOO-GH.MKV"
>
> SET FFREPORT=file=FOO-HG.LOG:level=32
>
> ffmpeg -i %1 -filter_complex
> "telecine=pattern=46,split[A][B],[A]select='not(eq(mod(n+1\,5)\,3))'[C],[B]split[E][F],[E]select='eq(mod(n+1\,5)\,2)',datascope=size=1920x1080:x=45:y=340:mode=color2[G],[F]select='eq(mod(n+1\,5)\,3)'[H],[H][G]blend[D],[C][D]interleave"
> -map 0 -c:v libx264 -crf 20 -an -sn "C:\AVOut\FOO-HG.MKV"
>
> The datascope doesn't appear in either output, so frame 1 (zero-based) is
> not traversing [E][H]
> (upper command) or [E][G] (lower command).
>
> Therefore, I'm pretty confident that once frame 1 gets enqueued at [C], the
> filter chain is not
> recursed.
>

datascope appears if you switch order of interleave pads, or use
hstack/vstack filter instead of interleave filter.

> Another interesting thing is the behavior of 'blend'.
>
> If blend gets a hit to its 2nd input (but not the 1st) the total frames
> output = 479.
>
> If blend gets a hit to its 1st input (but not the 2nd) the total frames
> output = 594.
_______________________________________________
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

Mark Filipak
On 04/17/2020 11:23 AM, Paul B Mahol wrote:
-snip-
> datascope appears if you switch order of interleave pads, or use
> hstack/vstack filter instead of interleave filter.

Thank you, but I've had no difficulty using datascope. It does not appear in the output video if no
frames flow through it. The fact that it does not appear means that no frames flowed through the
branch of the filter complex into which I put it. I use that as a means to discover how ffmpeg works.
_______________________________________________
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

Mark Filipak
In reply to this post by Paul B Mahol
For example,
In the select branch that contains

datascope=size=1920x1080:x=45:y=340:mode=color2,not(eq(mod((n+1)\,5)\,3))

datascope appears for frames 0 1 3 4 5 6 8 9 10 11 13 14 15 16 18 19 etc.
whereas in the select branch that contains

datascope=size=1920x1080:x=45:y=340:mode=color2,eq(mod((n+1)\,5)\,3)

datascope appears solely for frames 2 7 12 17 etc.

That reveals that, though datascope is placed before the modulo filter and is therefore exposed to
the entire stream, only those frames that pass completely through the branch are 'scoped'.
Logically, datascope's 'scope' must be replacing the contents of the frames that pass through, not
the frames that don't pass through.

Do you agree, or am I mistaken?

_______________________________________________
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".
1234