FFMPEG is a powerful tool to convert a media file from/to any media format.
To use for Chormecast which mainly uses H264 format, some typical usages:
ffmpeg -i test.mov -vcodec h264 -acodec aac recoded2.mp4
ffmpeg -i input_file_name -c:v libx264 -c:a copy
ffmpeg -i %1 -strict -2 -c:v libx264 -c:a libmp3lame -b:a 128k %2.mp4
ffmpeg -i %1 -strict -2 -vcodec h264 -acodec aac %2.mp4
ffmpeg -i %1 -c:v libx264 -c:a aac %2.mp4
ffmpeg -i %1 -acodec aac -ac 2 -af dynaudnorm -vcodec copy %2.mp4
The link to this article is here: linke