Skip to content

Instantly share code, notes, and snippets.

@devnano
Last active November 12, 2019 11:11
Show Gist options
  • Save devnano/eb5f64df2fef3dc219da40febcfcd9c7 to your computer and use it in GitHub Desktop.
Save devnano/eb5f64df2fef3dc219da40febcfcd9c7 to your computer and use it in GitHub Desktop.
Speed up video – 2x – at 30fps, remove audio and leave silence two-channel audio
# AppStore requires an apppreview that doesn't exceed X size, no more than Y fps and MUST have two-channel audio.
# This script assumes a device recorded video with QuickTime as input. It's too slow, give size exceeded error and the audio is background noise
# As output we have: Speed up video – 2x – at 30fps, remove original audio and add silence two-channel audio
# Sources:
# https://stackoverflow.com/a/12375018
# https://trac.ffmpeg.org/wiki/How%20to%20speed%20up%20/%20slow%20down%20a%20video
# https://trac.ffmpeg.org/wiki/ChangingFrameRate
# https://ffmpeg.org/ffmpeg-filters.html#Examples-67
# https://superuser.com/a/1354557
#!/bin/bash
ffmpeg -f lavfi -i anullsrc -i iphone\ 5s.mov -filter:v "fps=30,setpts=0.5*PTS" -shortest -c:a aac -map 0:a -map 1:v output.mov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment