[FFmpeg-user] How to filter time dependent
Ulf Zibis
Ulf.Zibis at CoSoCo.de
Fri Apr 23 00:01:23 EEST 2021
Am 22.04.21 um 21:59 schrieb Jim DeLaHunt:
> On 2021-04-22 08:26, Ulf Zibis wrote:
>
>> …with exact frame count instead unsing -ss, which only counts in seconds?
>
> Just to be sure the obvious is stated out loud: the parameter to -ss can be a floating-point number, meaning you can make it as precise as you like, to indicate the time when you expect a specific frame. e.g. "-ss 22.0393" .
Well yes, I know, thanks for your thoughts.
But I would feel better and more exact with frame counts.
Imagine I create a series of pics to find out the time where I should switch to the other filter:
ffmpeg -i IN.mpg -ss 48:07.50 -frames:v 50 'OUT_%03d.jpg'
(the videos fps is 25)
Imagine, that OUT_021.jpg is the first frame for the other filter.
Then I could do:
ffmpeg -i input.mp4 -filter_complex split[a][b];[a]filter_A[c];[b]filter_B[d];[c][d]select='between(t,0,48:08.30)',filter_C out.mp4
If OUT_021.jpg is at 0,48:08.299, it will be filtered with filter_A, If it is at 0,48:08.30, I don't know, as I don't know if select treats the upper border inclusive or exclusive of 0,48:08.30, and if it is at 0,48:08.301, it will be filtered with filter_B.
-Ulf
More information about the ffmpeg-user
mailing list