Skip to content

Instantly share code, notes, and snippets.

@acrylic-style
Last active October 1, 2021 04:26
Show Gist options
  • Save acrylic-style/dd60b739185931d603b9b32b110610da to your computer and use it in GitHub Desktop.
Save acrylic-style/dd60b739185931d603b9b32b110610da to your computer and use it in GitHub Desktop.
ffmpeg commands
# convert a mp4 into nightcore
ffmpeg -i input.mp4 -filter:a "atempo=1.06,asetrate=44100*1.25" -filter:v "setpts=0.815*PTS,fps=30" output.mp4
# convert a mp3 into nightcore
ffmpeg -i input.mp3 -filter:a "atempo=1.06,asetrate=44100*1.25" output.mp3
# Compress mp4
ffmpeg -i input.mp4 -vcodec h264 -b:v 1000k -acodec mp2 output.mp4
# Low bitrate (strips artwork)
ffmpeg -i input.mp3 -b:a 128k -map a output.mp3
# Extract audio
ffmpeg -i input.mp4 -ab 192k output.mp3
# Remove audio
ffmpeg -i input.mp4 -c copy -an output.mp4
# crop video time (00:01:00 - 00:02:00)
ffmpeg -ss 00:01:00 -i input.mp4 -to 00:02:00 -c copy output.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment