[FFmpeg-user] When clipping by exact frame, how to get correct audio to match that clip?

Bouke / edit 'B bouke at editb.nl
Mon Jun 12 10:13:40 EEST 2023


> On 12 Jun 2023, at 07:33, Edit 'B <bouke at editb.nl> wrote:
> 
> 
> 
>> On 12 Jun 2023, at 07:15, Sam Logan <shapableline at gmail.com> wrote:
>> 
>> Could someone please show me a command line with exactly what arguments to
>> pass to -aselect or -atrim, based on my original post of wanting to clip
>> video frames 1069 to 1263?
>> 
>> Thanks.
> 
> The numbers obviously depend on framerate and audio sample rate.
> 
> Bouke
> 

So the math is:
frame number / frame rate * audio sample rate
For speeds other than integers, use the 1000/1001 math.
(23,976 vs 23,98 makes a huge difference on large numbers…)

Bouke


More information about the ffmpeg-user mailing list