Skip to content

Instantly share code, notes, and snippets.

@choonkeat
Created October 23, 2025 03:52
Show Gist options
  • Select an option

  • Save choonkeat/74c6e4bb98c276d1a8e030700525b23e to your computer and use it in GitHub Desktop.

Select an option

Save choonkeat/74c6e4bb98c276d1a8e030700525b23e to your computer and use it in GitHub Desktop.
#!/bin/bash
set -x
SPEEDUP=1.5
while test -n "$1"
do
yes | ffmpeg -i "$1" \
-vf "setpts=PTS/${SPEEDUP}" \
-c:v libx264 -preset slow -crf 23 -pix_fmt yuv420p \
-af "atempo=${SPEEDUP}" -c:a aac -b:a 128k \
-movflags +faststart \
"$1".mp4 || exit 1
shift
done
#!/bin/bash
set -x
SPEEDUP=1.5
while test -n "$1"
do
yes | ffmpeg -i "$1" -vf "setpts=PTS/${SPEEDUP}" -an -c:v libx264 -preset slow -crf 23 -pix_fmt yuv420p "$1".mp4 || exit 1
shift
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment