Reduce file size while maintaining quality
While H.264 encoded videos are everywhere nowadays, advanced video codecs like HEVC and VP9 can reduce file sizes by half while maintaining quality.
Use HandBrake to encode a video source file into 3 different formats:
- MP4 container with HEVC video (H.265)
- MP4 container with regular H.264
- Matroska container (MKV) with VP9 video
MP4/HEVC will be played by iOS and Mac while MP4/H.264 serves as fallback for systems that don’t support more advanced codecs.
VP9 video needs to be in a WebM container to be playable in Firefox and Chrome. Use FFmpeg to convert the MKV/VP9 output from HandBrake to WebM/VP9:
ffmpeg -i input.mkv …