Welcome to OBS Mythbusters. My name is Jessica, known online as tielqt.
I am a support volunteer and moderator for the OBS Project.
I help out with all kinds of issues in the OBS Discord everyday, as well as a dedicated team of
contributors, developers, and other support volunteers like myself.
You can find a link to join the OBS Discord in the description.
Today, I'm here to talk about OBS, the MP4 file format and whether you should record to MP4.
Don't get me wrong. MP4 is one of the world's most popular video formats
for a reason. Most video editors will work with it. Most devices will play it back without issue.
Most programs can play it as well.
Plenty of YouTube tutorials out there will tell you to record directly to MP4 though,
and that's something of a problem. For as good and convenient as MP4 is as a format the fact is that
MP4 is dangerous as a live format.
If you record to it directly like you would with OBS Studio or any sort of similar software,
you're putting your recording at risk. In fact, OBS has a big warning about this in the program itself.
This warning is also visible in many best settings videos for OBS.
Now that should be a big red flag that
"Hey, maybe those aren't the best settings after all", but we'll get to those in a later video.
In OBS Studio 22.0.2, the most recent version of OBS Studio at the time of recording,
the warning which, appears when you select MP4 as your recording format says:
Warning:
Recordings saved to MP4 will be unrecoverable if the file cannot be finalized, for example as a result of blue screens of death, power loss etc.
But why should you the audience care about that?
Well, let's demonstrate. Right now in this demonstration, I'm recording to MP4 with OBS.
I've just about wrapped up but something is going to go wrong and my computer is going to die on me for some reason.
For the purposes of this video and so that you can replicate this experiment at home,
I am going to be killing the OBS muxer process.
If you would like to do this yourself, you can kill the ffMPEG muxer process.
This process is used by OBS to actually make the video
Now when I go back and check on the recording that I've just made as an MP4,
The file is unplayable in VLC or any other media player.
The file is corrupt, effectively empty and I can't watch it.
That, right there, is the reason that you should not be recording to MP4.
If something goes wrong in any way, shape, or form, that file can become corrupted and
completely unrecoverable. All of your hard work might go right down the drain.
Get a blue screen of death? Say goodbye to that perfect boss kill that you just did.
Power outage? Sayonara [ENG: Goodbye] to that personal best time.
All of your hilarious jokes, and all of your game footage is just gone and there is a
Very low chance that you will ever be able to get it back.
If that's not a compelling reason not to record to MP4, I don't know what is.
and all of the same problems that I'm mentioning here also occur with the MOV format.
But why does this happen?
Well, I can explain but it's going to get a little technical
You can use a timestamp in the description to skip over all of this technical content or skip to the timestamp pictured on my left.
The reason that MP4 is so terrible for live recording is because, much like MOV before it, MP4s require a
finalization process before the file is actually finished.
This finalization process writes the atoms of the file.
These are bits of information about what the mp4 file actually contains, including the codec and various other bits of information.
The atoms, and more specifically the "moov", or movie, atom are a key part of an MP4 file,
and the file is not complete without them. If something goes wrong and the atoms can't be written, that's it.
The file is effectively gone.
The atoms serve as an index of the entire file, so if your video player can't find an index
Then it can't play it. It doesn't know what to do. And so the file becomes effectively useless
Well, it's true that sometimes an MP4 file can be recovered
It's a bit of a pain in the ass to do so. The process for doing that involves
reconstructing the entire movie atom. This can be hard to near impossible to do properly.
Some more interesting technical bits about movie atoms.
In OBS, by default, these movie atoms are written at the end of the file. As soon as you hit stop recording,
It's right at the end of that stream of data.
This isn't a problem for local files; VLC won't have any problem finding an index right at the end
but it can cause some problems when you want to upload it to a service like YouTube
YouTube will actually give you a warning about streamable file formats, but mp4 is technically a streamable file format
So what's the deal there? Well, if the movie atom isn't written at the beginning of the file and is written at the end
Playback can't start until your file has been fully uploaded
If the movie atom is right at the beginning, playback of the video can begin right away,
because the video player has information about the contents of the entire file to come
and so it can be accurately played back
While it's possible to force OBS to write the movie atom at the beginning of the file using an encoder flag
it's still not recommended that you record to mp4 at all because that
finalization process still needs to happen.
You still need to hit "stop recording" and write all of the atoms. If that doesn't happen
the file is still just as corrupt as if you had an atom at the end.
If you want more information about the make up of all of the atoms, how they're structured and how they go into
MP4 and MOV files, Apple has written a technical breakdown of all of that.
You can find a link to that in the description.
Adobe has also written a breakdown of the MP4 format and the movie atom
This is aimed at Flash creators, but it can be used by creators of all kinds,
because this breakdown includes information on network delivery and other things
You can find a link to that in the description as well.
So, to sum up, and welcome back if you skipped over all the technical details
MP4 files have an extra process that needs to run in order to actually
finish writing the file. If this process doesn't run for some reason then your file is corrupted and gone.
So what's the solution then? What can we use instead of MP4 files?
Well, the OBS Team recommends recording to FLV or MKV
Both of these formats are popular "container" formats, which means that they can contain
many different types of video or audio. Neither FLV nor MKV require a process to finish like MP4 does,
so even if your recording is interrupted by a power loss a blue screen of death or anything like that
Your recording is still safe. As for which is better
There's very little difference actually, between FLV and MKV.
One thing you will notice though is that FLV does not support multitrack audio
But MKV does, so if you require that as a feature use MKV. If you don't, FLV is fine.
As well YouTube and other video services also accept direct FLV and MKV uploads.
In fact using FLV or MKV may actually mean that YouTube can process your videos faster.
Now, one thing that the OBS team often hears when we say not to record to MP4 is that people don't have
software that can play FLV or MKV files
The OBS team recommends using VLC media player to play back anything that you create with OBS.
Like OBS,  VLC is a free and open source media player and you can find a link to download it in the description.
Sometimes you might actually need an MP4 file; usually for an editor,
or a piece of software that's a bit more finicky.
I'll need MP4s for all of my recordings to edit this video in fact, but I'm recording to MKV,
so what can I do?
Well, OBS can do something called "remuxing". If you go to the file menu and then choose "Remux Recordings",
You can do this yourself.
To put this in simple terms, it's going to take the video on audio from one type of file and move it into another.
In my case, this is going to take an MKV and move it into an mp4 file.
This process takes seconds, and won't result in any quality loss since all that the process does is
make an exact copy of the video and audio from one file and place it into another. This way, you can get an
MP4 file with having to worry about losing it while recording or losing quality.
So now we've reached the end and we can answer the question, "should you record to mp4?"
The answer? No.
Instead, you should record to FLV or MKV.
You should play your video files back with the VLC media player and
you should remux recordings if you need MP4s by going to File -> Remux Recordings
Thanks for watching this video. I hope this has saved hours and hours of your footage and a ton of heartache.
If this has helped, maybe consider giving this video a like, or subscribing.
You can find me online in a bunch of places besides YouTube just check the description
You can also help support me by visiting humble.bird.school
to buy games from the Humble Bundle while supporting me and my charity of choice: The Mickaboo Companion Bird Rescue.
Lastly if you need help with anything OBS Studio
you can visit obsproject.com/help to find the OBS wiki, with a ton of guides and information
as well as the forums, Discord and more.
Cheers and I'll see you in the next video.
