petrkotek / chromecastize

Bash script to convert video files into Google Chromecast supported format.
MIT License
178 stars 34 forks source link

Specify AVC profile, level, and pixel format #49

Closed talisein closed 5 years ago

talisein commented 5 years ago

Add options to force encoding if compatability check is faulty

Checking the video format is insufficient to ensure video codec compatibility to chromecast. A file encoded with profile High 4:4:4 Predictive@L5 doesn't play on my 2nd gen chromecast for example.

I've added a log statement to display the input video's profile, if available. Profiles like High @L4.1 High @L3 are ok. But I don't know a good way to parse this field in bash, so instead I've added a command line option to force the re-encoding.

In order to get ffmpeg to actually transcode my 4:4:4 video to 4:2:0, I had to add the -pix_fmt yuv420p encoding option.