Skip to content

Instantly share code, notes, and snippets.

@BonfaceKilz
Last active March 14, 2017 08:07
Show Gist options
  • Save BonfaceKilz/753a8c88bc99cb96e12050a322364142 to your computer and use it in GitHub Desktop.
Save BonfaceKilz/753a8c88bc99cb96e12050a322364142 to your computer and use it in GitHub Desktop.
Speeding up and boosting video using ffmpeg

To speed up you video from 1x to 5x, you can type:

ffmpeg -i <input_video> -vf "setpts=0.2*PTS" -an <output video>

To speed up both video and audio:

ffmpeg -i input.mkv -filter_complex "[0:v]setpts=0.5*PTS[v];[0:a]atempo=2.0[a]" -map "[v]" -map "[a]" output.mkv

To increase volume output, use the -vol switch of FFmpeg like so:

ffmpeg -i <input vidoe> -vol 512 -vcodec copy <output video>

Useful Resources:

  1. https://superuser.com/questions/31176/increase-volume-of-an-mkv-video-from-linux-terminal
  2. https://trac.ffmpeg.org/wiki/How%20to%20speed%20up%20/%20slow%20down%20a%20video
  3. http://askubuntu.com/questions/429599/ffmpeg-how-to-encode-a-video-to-make-it-faster
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment