FFMPEG -ss and -t for cutting mp3

Viewed 13588

I have been trying to use FFMPEG to cut out a specific portion of a sound track. I wanted to cut from 00:07 to 04:33, so I input the ffmpeg command as follows:

bin\ffmpeg -ss 00:07 -t 04:26 -i "input.mp3" -acodec copy "output.mp3"

I used 04:26 for -t, which is [end_time - start_time]. However, the output.mp3 I got was cut from 00:07 to 04:40, and the track was 04:33 long. In order to get the correct output file, I had to use a -t 04:19, which is [end_time - 2*(start_time)].

timeline of desired mp3 track

I tried an alternate command using -to instead of -t

bin\ffmpeg -i "input.mp3" -ss 00:07 -to 04:33 -acodec copy -y "output.mp3"

and this worked as expected, giving the desired output track from 00:07 to 04:33.

The question is, why does the first method require -t to be [end_time - 2* (start_time)]? intuitively, I want to seek 00:07 and then capture the subsequent 04:26, so -ss 00:07 and -t 04:26 makes sense to me. I can't figure out how ffmpeg is interpreting this such that I have to use 04:19 as -t instead.

Since the second method works, I'm not really looking for a solution. I'm just wondering why this happens.

1 Answers
Related