Lossless H.264 MP4 file created from images cannot be played in QuickTime
There are two problems:
-
You're using PNG images as input. When converting images to video, the ffmpeg tries to preserve the image colorspace by choosing the
yuv444p
pixel format, which uses no chroma subsampling. Like it says:No pixel format specified, yuv444p for H.264 encoding chosen. Use -pix_fmt yuv420p for compatibility with outdated media players.
QuickTime and Windows Media Player are such "outdated" media players. Most FFmpeg-based players such as VLC can handle this kind of video though.
-qp 0
(much like-crf 0
) enables the lossless mode in x264, which makes the file use the High 4:4:4 Predictive Profile. This profile is not supported in QuickTime. It may very well be unsupported in Windows Media Player as well (but I couldn't check).
To ensure compatibility, you should always therefore add the option -pix_fmt yuv420p
and choose a lossy encoding method, ideally by using CRF encoding, and setting -crf
to a reasonable value. CRF default is 23, but anything from 18–28 is fine, where lower means better quality.
Note that older versions of Windows do not support H.264 at all. Here you'd have to fall back to MPEG-2 or even MPEG-1. See also:
- How do I tell ffmpeg to transcode to a video codec supported by Windows Media player?
- Which codecs are most suitable for playback with Windows Media Player on Windows XP?
- Convert video into format which is most likely playable on a windows system
- Will a file encoded with the libx264 play on Windows 8?
Read the H.264 encoding guide for more encoding strategies.