If an MP4 file plays locally but fails to play in a browser, first check its video codec. MP4 is the container format that can contain codecs such as H.264 (also known as AVC) or HEVC (also known as H.265). The file extension therefore provides little information about how the file will play on the target device.
Two exports from the same source
For a local test, we generated two MP4 files containing a synthetic test image with motion and a sine wave audio signal, each lasting six seconds at 640 × 360 pixels, 24 frames per second, and AAC audio. FFprobe showed that the first export used H.264 with the identifier avc1, while the second used HEVC with the identifier hvc1. Both files were fully decodable in video and audio. The test comprised 144 video frames per file.
The test shows how to reliably distinguish between the two files. The two exports use different encoder settings, so a comparison of image quality at the same file size is not possible. Local decoding also does not indicate which version will play on a specific smartphone in a browser.
FFmpeg Documentation on H.264 and HEVC
Limit a genuine outage
In the fictional example, a course participant can view the lesson on a notebook, but on another device, only the player is displayed. Create a short H.264 export with AAC audio in an MP4 container as a counterexample using the original material. Select a segment that includes audio, motion, and small text. Keep the playback conditions comparable. With HEVC, playback may depend on the specific device. According to the Chromium documentation, hardware acceleration in Chrome is required for proper playback.
Chromium documentation on support for audio and video codecs
- Check the container, video codec, and audio track of both versions using your editing program's media information or FFprobe.
- Test start, sound, jumps, and readability on the affected device in actual reader view. Keep the browser, device, and export method used fixed.
- If your host re-encodes during upload, check the final playback after processing. The most important factor is the version actually retrieved by the player.
If the H.264 test version runs within the same context, you have a possible alternative for this target group. If both versions fail, next check delivery and access. This avoids an additional export if the player simply does not receive the file.