Skip to content

Instantly share code, notes, and snippets.

@raphaelameaume
Last active September 24, 2020 08:05
Show Gist options
  • Save raphaelameaume/5a164caae2664978e8592e95adada29d to your computer and use it in GitHub Desktop.
Save raphaelameaume/5a164caae2664978e8592e95adada29d to your computer and use it in GitHub Desktop.
Useful commands for ffmpeg
  • Change extension
ffmpeg  -i input.MOV -c copy  output.mp4
  • Add black borders to video
ffmpeg -i input.mp4 -vf "scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2,setsar=1" output.mp4
  • Crop video
ffmpeg -i input.mp4 -filter:v "crop=width:height:x:y" -c:a copy output.mp4
  • Noise reduction
ffmpeg -i input.mp4 -filter:v "hqdn3d" -c:a copy output.mp4
  • Edit length
ffmpeg -ss 00:00:07.0 -i input.mp4 -t 00:01:08.50 output.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment