Skip to content

Instantly share code, notes, and snippets.

@hermzz
Last active April 15, 2020 21:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hermzz/c03c75a8886b72d374d6b94c2c996e93 to your computer and use it in GitHub Desktop.
Save hermzz/c03c75a8886b72d374d6b94c2c996e93 to your computer and use it in GitHub Desktop.
FFMPEG
echo "file video1.mp4" >> filelist.txt
echo "file video2.mp4" >> filelist.txt
ffmpeg -f concat -i filelist.txt -c copy timelapse.mp4
ffmpeg -i video1.mp4 -i video2.mp4 -filter_complex "[0:v:0] [1:v:0] concat=n=2:v=1 [v]" -map "[v]" output.mp4
ffmpeg \
  -framerate 15 \ # 15 FPS
  -pattern_type glob \
  -i '*.JPG' \
  -vf scale=512:-2 \ # Scale to width 512px and round the height to a multiple of 2 (required by baseline profile)
  -vcodec libx264 \
  -profile:v baseline -level 3.0 \ # Max compatibility with all kinds of old devices and players
  -pix_fmt yuv420p \ # Colour encoding required by baseline profile
  timelapse.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment