Quantcast
Channel: How to remove last 4 seconds of MP3 file? - Ask Ubuntu
Viewing all articles
Browse latest Browse all 5

How to remove last 4 seconds of MP3 file?

$
0
0

I have a set of MP3 files that I would like to remove the last 4 seconds. I know that if I know the time duration of each file I can do:

ffmpeg -t ${1} -i inputfilename -acodec copy -vcodec copy outputfilename

Where $1 is the duration of the file minus the 4 seconds.

I'd really like something that would just chop the last 4 seconds off regardless of the length of the file. A "stop 4 seconds before the EOF".

Note: I struggled to figure this command line out, if there's an easier version, I love to see it.


Viewing all articles
Browse latest Browse all 5

Trending Articles