jakob
jakob

Reputation: 43

MP4 HTML5 issues for some video files on iOS Safari

On multiple websites, I include different autoplay MP4 videos on the first viewport using the following HTML code:

<video playsinline="playsinline" webkit-playsinline="webkit-playsinline" autoplay data-keepplaying="1" preload="none" muted="muted" loop="loop">
    <source src="example.mp4" type="video/mp4">
</video>

All videos use a H.264 codec and have mp4a audio (that is muted by the video tag). All videos tested work on multiple browsers (Firefox and Chrome on Linux, Windows and Android). When using iOS Safari, however, some videos don't work.

I opened the video codec information on VLC and noticed that the videos that don't work on Safari have 3 additional lines: "Color primaries", "Color transfer function" and "Color space", all 3 set to "ITU-R BT.709".

Has anyone encountered this specific problem playing videos on Safari?

I tried moving the video to another container file. Also, I tried switching between absolute and relative paths and using different HTML attributes. Using the attributes in the current example, the autoplay itself is working, but some videos still don't.

Upvotes: 3

Views: 699

Answers (1)

WannaKnow5789
WannaKnow5789

Reputation: 5

Good day, Jakob. Those attributes need to be set to ITU-R BT.2154, the newest version because ITU-R BT.709 came out in 2015 so it is older than ITU-R BT.2154. It doesn't give much information if you want to read about it at https://www.itu.int/rec/R-REC-BT/en

Upvotes: -1

Related Questions