[FFmpeg-user] How to filter time dependent

Michael Koch astroelectronic at t-online.de
Sat Apr 24 20:24:58 EEST 2021


Am 23.04.2021 um 23:19 schrieb Ulf Zibis:
>
> Am 23.04.21 um 08:31 schrieb Gyan Doshi:
>>
>> On this topic generally, see https://superuser.com/q/1632998/
> Much thanks for this hint. I was successful with this approach:
>
> ffmpeg -i 'Stille Tage in Clichy.mpg' -vf 
> "split=3[a][b][c];[a]trim=0:2888.36,setpts=PTS-STARTPTS,crop=352:496:0:36[a];[b]trim=2888.36:3293.96,setpts=PTS-STARTPTS,crop=352:496:0:42[b];[c]trim=3293.96,setpts=PTS-STARTPTS,crop=352:496:0:38[c];[a][b][c]concat=n=3:v=1:a=0",scale=iw:ih/2,hqdn3d=2:1.5:12 
> -preset slow -movflags +faststart 'Stille Tage in 
> Clichy_c_3_scale_1_2_hqdn3d_2_1_12_slow.mp4'


You can simplify this by using sendcmd:

ffmpeg -i input.mp4 -vf 
"sendcmd=f=test.cmd,crop at 1=352:496:0:36,scale=iw:ih/2,hqdn3d=2:1.5:12 
out.mp4

The file "test.cmd" contains these two lines:
2888.36 crop at 1 y 42;
3293.96 crop at 1 y 38;

The above example is untested. There is a similar example at the end of 
chapter 2.86 in my book:
http://www.astro-electronic.de/FFmpeg_Book.pdf

Michael


More information about the ffmpeg-user mailing list