Skip to content

Instantly share code, notes, and snippets.

@danielvartan
Last active April 10, 2025 00:21
Show Gist options
  • Save danielvartan/80b5261572f0f4d4a660f830178695f2 to your computer and use it in GitHub Desktop.
Save danielvartan/80b5261572f0f4d4a660f830178695f2 to your computer and use it in GitHub Desktop.
Learn more abou FFMEG at: https://www.ffmpeg.org
# Source: https://stackoverflow.com/a/42827058/8258804
ffmpeg -ss 00:01:00 -to 00:02:00 -i input.mp4 -c copy output.mp4
ffmpeg -i input.webm -r 10 output.gif
# ffmpeg -i in.webm -r 10 -ss 00:00:01 -to 00:00:05 out.gif
# Source: https://stackoverflow.com/questions/9913032/how-can-i-extract-audio-from-video-with-ffmpeg
ffmpeg -i input.avi -vn -acodec copy output.aac
ffmpeg -i input.avi -q:a 0 -map a ouput.mp3
# Source: https://superuser.com/a/268986/2033807
ffmpeg -i input.webm -c copy -an output.webm
# Source: https://stackoverflow.com/a/18148739/8258804
ffmpeg -i input.webm -c copy output.mp4
ffmpeg -fflags +genpts -i input.webm -r 24 output.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment