[FFmpeg-user] 'image trails'

Mark Filipak markfilipak.windows+ffmpeg at gmail.com
Wed Apr 8 11:02:44 EEST 2020


Hi, Michael (Love your book!),

On 04/08/2020 02:23 AM, Michael Koch wrote:
> Am 08.04.2020 um 08:09 schrieb Michael Koch:
>> Am 08.04.2020 um 04:48 schrieb Mark Filipak:
>>> Start again after a good sleep.
>>>
>>> Re: https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20200407/4556ce6a/attachment.mpv
>>>
>>> Kindly play 'attachment'. Got any ideas what's causing the image trails?
>>>
>>> fmpeg -i "M:\Test Videos\23.976p.mkv" \
>>> -filter_complex \
>>> "telecine=pattern=5 \
>>> ,split=3[B][C][D] \
>>> ,[B]select='bitand(not(eq(mod(n+1\,10)\,3))\,not(eq(mod(n+1\,10)\,8)))'[E] \
>>> ,[C]select='eq(mod(n+1\,10)\,3)'[G] \
>>> ,[D]select='eq(mod(n+1\,10)\,8)'[H] \
>>> ,[E][G][H]mix=3" \
>>> -map 0 -c:v libx264 -crf 28 -c:a copy -c:s copy "C:\AVOut\23.976p.MKV"
>>>
>>
>> I think the mix filter doesn't do what you want. The streamselect filter might be worth a try.
> 
> Sorry, that was a bad idea because streamselect doesn't support expresssions for the map option.
> 
> Michael

The 'mix' filter seems to be too cleaver.

Below is the structure of the first 10 frames of, Stream 1: the 24fps source, and Stream 2: the 
5-5-5-5 60fps telecined intermediate, and Stream 3: the mixed target.
(I have pictures of the first 10 target frames for anyone who wants to see them.)

The 3 streams need to be interleaved as follows:
1 1 2 1 1 1 1 3 1 1 1 1 2 1 1 1 1 3 etc.

To accomplish the interleave:
Stream 1 is select='bitand(not(eq(mod(n+1\,10)\,3))\,not(eq(mod(n+1\,10)\,8)))'
Stream 2 is select='eq(mod(n+1\,10)\,3)'
Stream 3 is select='eq(mod(n+1\,10)\,8)'

Behavior of 'mix' filter:
The 'mix' filter is mixing fields from the differing streams from as much as 7 frames downstream and 
also altering the luminance.

My Question: Is there an alternative to 'mix' that can simply interleave frames from 3 streams 
without altering them?

            <--------------------------1/12s--------------------------->
p24 source [A/a_________________________][B/b_________________________]
   5555 p60 [A/a_______][A/a_______][A/b_______][B/b_______][B/b_______]
mix target [A+2C/b+d__][A+C/b+2d__][A+C/b+2d__][A+C+2E/b+d][A+C+2E/b+d]
n (frame#) 0           1           2           3           4

         ...<--------------------------1/12s--------------------------->
            [C/c_________________________][D/d_________________________]
            [C/c_______][C/c_______][C/d_______][D/d_______][D/d_______]
            [C+2E/d+f_][C+E/d+2f___][C+E/d+2f__][C+E+2G/d+f][C+E+2G/d+f]
            5          6            7           8           9

         ...<--------------------------1/12s--------------------------->
            [E/e_________________________][F/f_________________________]
            [E/E_______][E/e_______][E/f_______][F/f_______][F/f_______]


         ...<--------------------------1/12s--------------------------->
            [G/g_________________________][H/h_________________________]
            [G/g_______][G/g_______][G/h_______][H/h_______][H/h_______]



More information about the ffmpeg-user mailing list