Created
April 29, 2019 15:25
-
-
Save ChristosT/78044c5a36ee5f3196e20ffa4fbaba1e to your computer and use it in GitHub Desktop.
Speedup a video x2 using ffmpeg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -u | |
| set -e | |
| filename=$1 | |
| ext="${filename##*.}" | |
| base=$(basename "${filename}" "${ext}") | |
| new_filename="${base}"_x2${ext} | |
| # change 0.5 to 0.25 for x4 speedup | |
| ffmpeg -i "${filename}" -vf "setpts=0.5*PTS" "${new_filename}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment