ffmpeg conversion for Chromecast
On an old Google Chromecast 1, I've found the following to produce playable content:
ffmpeg4 -i input.mp4 -preset fast -c:a aac -b:a 192k -ac 2 -c:v libx264 -b:v 1024k -s 1920x1080 -profile:v high -level 4.1 -crf -1 -pix_fmt yuv420p output.mp4
More complex transcoding is possible. Eg. With an input where the video is fine, but the audio stream is aac 5.1 and refuses to play, we can copy the video stream, and map the audio stream twice, keeping the aac 5.1 stream and adding a second 192kb/s aac stereo stream. Eg.
ffmpeg4 -i input.mp4 -map 0:v:0 -c:v copy -map 0:a:0 -map 0:a:0 -c:a:0 aac -ac:a:0 2 -b:a:0 192k -c:a:1 copy output.mp4
- aac 5.1 audio doesn't seem to work.
-t <duration_secs>to test settings on a small portion of the file.
-crf -1specifies constant quality mode, and is roughly equivalent to
-crf 30. For higher quality, try, eg.