# Convert WebM to MP4 that plays on an iPhone

> Markdown version of https://stella.sh/how/video/convert-webm-to-mp4 for agents and LLMs.
> WebM won't play on your iPhone? Re-encode it to H.264 MP4 (renaming isn't enough) with HandBrake, VLC, ffmpeg, or let Stella (stella.sh) convert them all.

Re-encode it: WebM holds VP8, VP9 or AV1 video with Opus or Vorbis sound, and an iPhone wants H.264 or HEVC with AAC. Renaming the file or copying the streams into an .mp4 box doesn't help. The free HandBrake on Mac or Windows does it with its Fast 1080p30 preset. Stella (stella.sh) converted four WebMs, including a browser screen recording with an odd height and no length in its header.

- Checked: 14 November 2026
- Stella does it on: Windows, Mac, Linux

## Stella doing it

Recorded 14 November 2026 on Linux (Omarchy) with Claude Code with Opus, on a Claude plan.
Result: Four MP4s in under a minute. Checked afterwards against an answer key written before the run: an MP4 for each WebM, H.264 with AAC inside (not VP9 or Opus renamed), the same picture size, full length including the screen recording with no length in its header, the same picture at the same moment, sound kept, set to start playing straight away, and the WebMs and an unrelated PDF untouched. The four WebMs were made for this run as browsers and sites write them: VP9 with Opus, VP8 with Vorbis and AV1 with Opus, with a time code in each picture. The work is sped up 3×. We didn't play them on a real iPhone; the check confirmed the format iPhones play.

Video (41 s): https://stella.sh/media/proofs/video/convert-webm-to-mp4/proof.mp4

Transcript:

- 0:00 Stella on a Linux computer. Four WebM videos are in Downloads.
- 0:01 The prompt: turn them into MP4s that play on an iPhone.
- 0:09 Stella replies it's converting them next to the originals and keeping the WebMs.
- 0:15 Checking each file and converting to H.264 with AAC sound.
- 0:26 Done: four MP4s, every frame there; the screen recording is one pixel shorter.

What Stella does:

1. Finds the four WebM files in Downloads and reads their codecs: VP8, VP9 and AV1 video with Vorbis or Opus sound
2. Notices the screen recording is 767 pixels tall (H.264 needs an even number) and has no length in its header
3. Decodes every source to the end to make sure none is damaged, and counts its frames
4. Re-encodes each to H.264 with AAC sound, set to start playing straight away, rounding the odd height to 766
5. Checks each MP4 has every frame of its original and saves it next to the WebM with the same name, keeping the WebMs

## The prompt to paste

```text
I have some WebM videos in my Downloads that won't play on my iPhone. Can you turn them into MP4s that will?
```

## Convert it yourself

1. **Mac or Windows: HandBrake.** Open the free HandBrake, drag in the WebM and pick the Fast 1080p30 preset, which makes H.264 video with AAC sound in an MP4. Click Start, or Add to Queue for several files and then Start Queue.
2. **VLC.** Choose Media, Convert / Save, add the WebM, click Convert / Save and pick the Video - H.264 + MP3 (MP4) profile. One file at a time, but it works offline.
3. **ffmpeg.** `ffmpeg -i clip.webm -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" -c:v libx264 -pix_fmt yuv420p -c:a aac -movflags +faststart clip.mp4`. The scale part rounds odd sizes to even ones, which H.264 needs.
4. **Don't just rename it.** Renaming .webm to .mp4, or copying the streams with `-c copy`, leaves VP9 or AV1 video and Opus sound inside. Some players cope, but iPhones and many editors won't. The video has to be re-encoded.
5. **Screen recordings from a browser.** Browser recorders often write WebMs with no length in the header, so players show 0:00 or can't seek. A full re-encode fixes that, because the new file gets a proper length.

## Where Stella stops

- Re-encoding takes time and is slightly lossy. Stella used a high-quality setting, which is invisible on short clips; long films take minutes each.
- A WebM with transparency loses it in MP4, which has no see-through video.
- File names and the videos' technical details went to the AI model you use in Stella. The videos were converted on your computer.
- Recorded on Linux with ffmpeg already installed. On a Mac or Windows PC Stella would usually download ffmpeg first, which isn't shown.

## Questions

**Why won't WebM play on my iPhone?**
Newer iPhones play some WebM in Safari, but not in Photos, Files or Messages, and VP8 or AV1 can fail. An H.264 MP4 plays everywhere.

**Is there a size limit?**
Not on your own computer. Online converters cap file size; HandBrake, VLC, ffmpeg and Stella don't.

**Can I convert to a GIF instead?**
Yes, see [make a GIF from a video](https://stella.sh/how/video/make-gif-from-video).

**What about old AVI or WMV clips?**
Same idea, different traps. See [convert AVI, WMV, 3GP and VOB to MP4](https://stella.sh/how/video/convert-avi-to-mp4).

**Is Stella free for this?**
Yes. Free with the ChatGPT or Claude plan you already have. Sign in with your ChatGPT plan, or use your Claude plan through Claude Code, and this task costs nothing extra. New accounts also get a small free trial of Stella’s own models.

**Can I control what Stella changes on my computer?**
Yes. Stella works on Windows, Mac and Linux with your own files and shows each step in the chat, so you can watch it and stop it at any point. Tell it what it may not do, as the prompts on these pages do (“don't delete anything without asking”). In the Downloads recording it deleted nothing until it was told to go ahead. It also refuses commands that would wipe a whole disk, your home folder or system folders.

Sources: [HandBrake documentation](https://handbrake.fr/docs/en/latest/), [VLC media player](https://www.videolan.org/vlc/), [FFmpeg H.264 encoding guide](https://trac.ffmpeg.org/wiki/Encode/H.264).

## Related problems

- [Convert old AVI, WMV, 3GP and VOB videos to MP4](https://stella.sh/how/video/convert-avi-to-mp4.md)
- [Convert MOV to MP4 so your phone videos play anywhere](https://stella.sh/how/video/convert-mov-to-mp4.md)
- [Make a GIF from a video clip](https://stella.sh/how/video/make-gif-from-video.md)
- [Add burned-in subtitles to a video for TikTok](https://stella.sh/how/video/burn-subtitles-into-video-for-tiktok.md)
- [Cut silences out of a video automatically](https://stella.sh/how/video/cut-silences-from-video.md)
- [Compress a video for Discord](https://stella.sh/how/video/compress-video-for-discord.md)

Get Stella: https://stella.sh/download. Free with the ChatGPT or Claude plan you already have.
