Skip to content

Instantly share code, notes, and snippets.

@cataska
Created March 13, 2015 09:42
Show Gist options
  • Save cataska/37e8a18570ee4340e07f to your computer and use it in GitHub Desktop.
Save cataska/37e8a18570ee4340e07f to your computer and use it in GitHub Desktop.
Covert file using ffmpeg for Chromecast
#!/bin/sh
input=$1
output=$2
ffmpeg -i "$input" -c:v libx264 -profile:v high -level 5 -crf 18 -maxrate 10M -bufsize 16M -pix_fmt yuv420p -vf "scale=iw*sar:ih, scale='if(gt(iw,ih),min(1920,iw),-1)':'if(gt(iw,ih),-1,min(1080,ih))'" -x264opts bframes=3:cabac=1 -movflags faststart -c:a libfdk_aac -b:a 320k -y "$output"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment