ffmpeg common commands

18 Uncategorized Leave a Comment

1 Trim audio file using start and stop times

ffmpeg -i file.mkv -ss 20 -to 40 -c copy file-2.mkv
ffmpeg -i file.mkv -ss 00:00:20 -to 00:00:40 -c copy file-2.mkv

This should create a copy (file-2.mkv) of file.mkv from the 20 second mark to the 40 second mark.

concatenate two mp3 files

ffmpeg -i "concat:file1.mp3|file2.mp3" -acodec copy output.mp3

References:

  1. Trim audio file using start and stop times
  2. How to join/merge many mp3 files?

Leave a Reply

Your email address will not be published.

Name *