I recently discovered that several videos on my self-hosted Discourse forum were silently failing to play on iPhone and iPad. After investigation, the root cause was that the videos had been encoded with the VP9 codec inside an MP4 container β a combination that iOS Safari cannot play.
How it happens
Facebook (and possibly other platforms) sometimes delivers VP9-encoded video when users download their content. When those files are uploaded to Discourse, they are accepted without issue β the .mp4 extension gives no indication of the codec inside. On desktop browsers and Android the videos play fine, so the problem goes unnoticed. On iOS Safari, the video shows a thumbnail and a play button, but tapping it produces only a spinning indicator. Users typically assume itβs a network issue and move on without reporting it.
Why itβs hard to catch
- The file extension (
.mp4) is identical to a working H.264 file - Desktop browsers support VP9, so admins testing on desktop see no problem
- iOS users often donβt report individual media failures, especially when other content in the same post is visible and playable
- There is no admin-facing warning or error
Suggested resolution
On video upload, Discourse could inspect the video codec (ffprobe is already available in the Docker container) and either:
- Reject the upload with a clear message explaining that VP9 is not supported on iOS, and asking the user to re-encode to H.264, or
- Automatically transcode the video to H.264 on upload (similar to how some platforms normalize uploads)
Option 1 is lower complexity and would already be a significant improvement. Option 2 would be ideal for a seamless user experience.
Environment
- Self-hosted Discourse in Docker, local storage (no S3)
- Discourse version: 2026.4.0-latest
- Apache reverse proxy in front of Discourse nginx
Workaround
For admins who encounter this, the fix involves:
- Identifying VP9 files with
ffprobe - Re-encoding to H.264 with
ffmpeg -c:v libx264 -profile:v main -level 3.1 -r 30 -movflags +faststart - Updating the
sha1,url,filesizein theuploadstable - Updating
upload://short URL tokens in affected post raw markdown - Rebaking affected posts
This is a non-trivial manual process that most forum admins would not be equipped to perform.