Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@noln
Last active March 22, 2024 16:43
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save noln/8ba9632775c63685e83c3534cbd83079 to your computer and use it in GitHub Desktop.
Save noln/8ba9632775c63685e83c3534cbd83079 to your computer and use it in GitHub Desktop.
Handy FFMPEG Commands for Quickly Processing GoPro Videos
1) Concatenate a list of videos into one
ffmpeg -f concat -safe 0 -i tojoin.txt -c copy output.mp4
// Format of tojoin.txt:
file 'file0.MP4'
file 'file1.MP4'
file 'etc..
2) Scale down 4k video to
// 2.7k / 2704p
ffmpeg -i output.mp4 -vf scale=2704:1520 -c:v libx264 -crf 20 -preset slow smaller_2704p.mp4
// 1440p
ffmpeg -i output.mp4 -vf scale=1920:1440 -c:v libx264 -crf 20 -preset slow smaller_1440p.mp4
// 1080p
ffmpeg -i output.mp4 -vf scale=1920:1080 -c:v libx264 -crf 20 -preset slow smaller_1080p.mp4
// 720p
ffmpeg -i output.mp4 -vf scale=1280:720 -c:v libx264 -crf 20 -preset slow smaller_720p.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment