Skip to content

Instantly share code, notes, and snippets.

@fjorgemota
Created March 25, 2020 20:36
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fjorgemota/1dd56095eafaaecb68470a2973b57d13 to your computer and use it in GitHub Desktop.
Save fjorgemota/1dd56095eafaaecb68470a2973b57d13 to your computer and use it in GitHub Desktop.
Small script to convert to x264, which is accepted by telegram, whatsapp and a lot of other services

Usage:

prepare-video source.mp4 output.mp4

The final video will use the x264 codec for video and aac codec for audio.

You'll need to install ffmpeg to be able to run that command.

#!/bin/bash
ffmpeg -i "$1" -crf 27 -preset veryfast -vcodec libx264 -acodec aac "$2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment