ffmpeg common commands

393 Uncategorized Leave a Comment

Download video with .m3u8 link

Download full video

ffmpeg -i "https://this-is-your-url-of.m3u8" -c copy -bsf:a aac_adtstoasc "output.mp4"

Download specific time range:

ffmpeg -ss 04:05:25 -to 04:15:00 -i "https://this-is-your-url-of.m3u8" -c copy -bsf:a aac_adtstoasc "output-crop.mp4"

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?
  3. How to Use FFmpeg to Download M3U8 File?

Leave a Reply

Your email address will not be published. Required fields are marked *

Name *