Bash script to convert video files into Google Chromecast supported format.
Simple bash script to convert video files into Google Chromecast supported format.
Script identifies video and audio format of given file (using
mediainfo) and converts it if necessary (using
ffmpeg).
Filename of output video file is
.mkvand original video file gets renamed to
.bak.
mediainfo
ffmpeg
Install requirements by running e.g.
apt-get install ffmpeg mediainfo(Debian) or
brew install ffmpeg mediainfo(MacOS with Homebrew).
./chromecastize.sh [--mp4 | --mkv | --stereo | --delete-on-success | --force-vencode | --force-aencode | --config=/path/to/config] [videofile2 ...]
./chromecastize.sh /Volumes/MyNAS- converts all videos on your NAS (assuming that it's mounted to
/Volumes/MyNAS)
./chromecastize.sh Holiday.avi Wedding.avi- converts specified video files
--mp4forces conversion to MPEG-4 container
--mkvforces conversion to Matroska container
--stereoforces conversion from multichannel audio to 2 channel stereo
--delete-on-successdeletes the original file on success instead of renaming it to
.bak
--force-vencodeforces re-encoding of the video, if the codec is supported but the profile level is too high
--force-aencodeforces re-encoding of the audio
--config=/path/to/configspecify where to store configuration. When omitted the default folder
~/.chromecastizeis used.
config.shfile to your config folder (default location:
~/.chromecastize).
#symbol.