[FFmpeg-user] propagation of frames in a filter complex

pdr0 pdr0 at shaw.ca
Fri Apr 17 01:35:35 EEST 2020


Mark Filipak wrote
> By the way, 'interleave' not recognizing end-of-stream (or 'select' not
> generating end-of-stream, 
> whichever the cause) isn't a big deal as I'll be queuing up transcodes --
> as many as I can -- to run 
> overnight.


But it would be nice to find some way to terminate, especially if you were
batching . The "hang" limits what you can do if you were processing
sequentially overnight

If you have known framecount, you can enter "-frames:v whatever" to send the
end signal. In that example, -frames:v 600. But it hangs prior to the end,
at 598. One way might to duplicate the last frame, or add with -vf tpad,
then cut it off with -frames:v 

If you add tpad=stop=1 to the end of each selection, the end result is the
last 2 frames are duplicates , but at least it terminates
ffmpeg -i 23.976p_framenumber.mp4 -filter_complex
"telecine=pattern=5,split[A][B],[A]select='not(eq(mod(n+1\,5)\,3))',tpad=stop=1[C],[B]select='eq(mod(n+1\,5)\,3)',pp=lb,tpad=stop=1[D],[C][D]interleave"
-c:v libx264 -crf 18 -frames:v 600 -an out_tpad.mkv

But another issue is "automatically" getting the proper frame count and
entering that telecined=5 output frame number value into the -frames:v field
(it should be 2.5x the original framecount).  It should be possible use
ffprobe to parse the framecount, and plugging that variable into a ffmpeg,
but it's beyond my batch scripting knowledge





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


More information about the ffmpeg-user mailing list