How to convert a Y4M video to MP4 on a Mac
A Y4M file is uncompressed video, which is why it is enormous and why a Mac will not play it. Convert it to MP4 and the same footage shrinks dramatically while still looking right for ordinary viewing. Keep the Y4M only if you need a pristine master for further processing.
What a Y4M file is
Y4M, sometimes called YUV4MPEG, is a plain way of storing video with no compression at all. Every frame is written out in full, one after the other, with a short text header at the start. It exists mostly for people who work with video tools and encoders, because it is a simple, lossless way to hand frames from one program to another.
That simplicity is the problem for everyday use. A few seconds of high-definition footage can fill hundreds of megabytes, and a few minutes can fill many gigabytes. If you were given a Y4M by a colleague, pulled one out of a capture tool, or exported one from a script, it is likely far larger than anything you would want to store or send.
Why a Mac will not play it
QuickTime Player and Finder’s Quick Look read formats Apple supports, mainly MP4 and MOV containers with codecs such as H.264 or HEVC. A Y4M is neither a container Apple knows nor a codec it plays, so you will see a plain icon in Finder and a message that the file is not compatible. Renaming it to .mp4 will not help; the contents are the same. This is the same family of problem as QuickTime saying the file is not compatible.
There is also no sound in a Y4M. The format holds picture only, so if you expected audio, it was never in this file. Any sound would be in a separate file that you can combine in a video editor.
Convert it with Manatee
Manatee accepts Y4M as an input and writes MP4. Its ffmpeg engine is built in, so there is nothing else to install, and the work happens on your Mac without uploading anything.
- Open Manatee and choose Convert.
- Drop the Y4M file into the window, or onto the menu bar icon.
- Pick MP4 as the target.
- The MP4 appears next to the Y4M. The original is never modified.
Expect it to take longer than converting an ordinary video, because the source is so large. Manatee is free for 24 hours with every feature, then $9 once.
Manatee is not a video editor. It will not trim, add a soundtrack or color correct. If you need to combine your Y4M with audio, convert the picture first, then add sound in an editor.
Need it at an exact size
Because the source is so large, the MP4 may still come out bigger than a place you want to send it allows. Manatee’s Shrink mode lets you name a size in megabytes and finds the quality that fits. If the clip is going to chat or email, how to shrink a video to a specific file size walks through it.
Two cautions. The more you push a size down, the softer the picture gets, particularly on fast motion. And converting twice in a row, first to a loose MP4 and then to a tight one, looks worse than going straight to the final size; why compressing a video twice makes it look worse explains why.
Converting with ffmpeg in Terminal
If you use ffmpeg already, this produces a standard H.264 MP4:
ffmpeg -i clip.y4m -c:v libx264 -crf 18 -pix_fmt yuv420p clip.mp4
The -crf setting controls quality; 18 looks very close to the source for most footage, and higher numbers make a smaller file. The -pix_fmt yuv420p option makes sure the result plays in QuickTime and on iPhones. Without it, some Y4M files are stored in a color layout that Apple players reject.
Y4M files do not carry a frame rate in a way every tool honors, so if the video plays too fast or slow, add -r 30 (or the correct rate) before the input to set it.
What to check afterward
- Play the MP4 from start to finish. Y4M has no built-in safeguards, so a file that was cut off during writing will simply be shorter than expected.
- Look at the colors on a scene you know. A washed out or green-tinted picture points to a color layout mismatch; 10-bit, HDR and the video that looks washed out covers it.
- Keep the Y4M until you are sure, then decide whether you need it at all. If your only goal was to watch or share the clip, the MP4 is enough.
Questions
Why is my Y4M file so large? Because it stores every frame completely, with no compression. MP4 stores the differences between frames and discards detail you are unlikely to notice, which is why it is far smaller.
Will the MP4 look identical to the Y4M? Close, but not identical. MP4 is lossy. At a sensible quality setting the difference is hard to see on a normal screen, but it is not a perfect copy.
Does the Y4M file get deleted or changed? No. Manatee always writes a new file alongside it and leaves the original alone.