[FFmpeg-user] Decombing via screening - 'tblend' bug (?)

pdr0 pdr0 at shaw.ca
Thu Apr 16 02:13:28 EEST 2020





This:

ffmpeg -i IN -filter_complex 
"telecine=pattern=5,split[A][B],[A]select='not(eq(mod(n+1\,5)\,3))'[C],[B]select='eq(mod(n+1\,5)\,3)',split[E][F],[E][F]blend[D],[C][D]interleave" 
OUT

outputs 598 frames. 'blend' outputs as expected.

This:

ffmpeg -i IN -filter_complex 
"telecine=pattern=5,split[A][B],[A]select='not(eq(mod(n+1\,5)\,3))'[C],[B]select='eq(mod(n+1\,5)\,3)',separatefields,scale=height=2*in_h:sws_flags=neighbor,setsar=1,tblend[D],[C][D]interleave" 
OUT

outputs 716 frames. 'tblend' (documented in the same article) outputs extra
frames.

Now, does that look consistent to you?

But of course, since I can't read, and I'm always wrong...

_______________________________________________


You would expect 719 frame output if you started with a 240 frame, 23.976p
clip

tblend changes the frame count by -1 . Default mode doesn't appear to do
anything except drop the original frame zero. When you use all_mode=average,
it blends adjacent frames.  The new frame zero becomes 50/50 mix of (old
frame 0,1). New frame one becomes a 50/50 mix of (old frame 1,2).  You can
test the filter by itself to verify this

When you separate fields, you have 2 times the number of original frames. 
If you resize them to full height and treat them as frames, you still have 2
times the number of frames on that selection set

If you started with a 240 frame clip , you should end up with a 600 frame
clip after that telecine filter only with those settings. 

If you take every 5th frame from the telecine output ; 600/5 =120 .
Separating fields give you 120*2 =240. Applying tblend=all_mode=average
after gives you 240-1=239 frames. This is [D] . 

[C] is the other frame selection set; 600-120=480

Interleaving selection [C] with [D] should give you (600-120) + (240-1) =
719

The 716 might be from interleave dropping frames at the end when it hangs. 
Expect it to hang because there is no end-of-stream signal when used with
select. 

https://ffmpeg.org/ffmpeg-filters.html#interleave_002c-ainterleave




--
Sent from: http://www.ffmpeg-archive.org/


More information about the ffmpeg-user mailing list