Skip to content

Instantly share code, notes, and snippets.

@briglx
Created September 20, 2020 14:30
Show Gist options
  • Save briglx/db06bcc9c910e15dafc5c179a609935c to your computer and use it in GitHub Desktop.
Save briglx/db06bcc9c910e15dafc5c179a609935c to your computer and use it in GitHub Desktop.
Various ffmpeg commands to convert video and images
# Rotate movie 90 degress
ffmpeg.exe -i input.MOV -vf "transpose=1" output.mp4
# Convert to differnt type
ffmpeg.exe -i input.MOV -q:v 0 output.mp4
# Resize and add black bars
ffmpeg.exe -i input.MOV -vf "scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2,setsar=1" output.mp4
# Convert heic to tiff
ffmpeg -i (file).heic -c:v png -pix_fmt rgb48 (output).tiff
# Convert all heic to png in a folder
for f in *.HEIC;do ffmpeg -i "$f" -c:v png -pix_fmt rgb24 "${f%heic}.png";done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment