Sub topic 9
Pick a recording format and remux safely
This chapter assumes you can already start a recording in OBS Studio and have set an encoder and bitrate in Settings > Output. It covers what a recording format is, which one to choose for lessons, and how to convert a file without losing quality.
Containers and codecs
A recording has two layers. The codec compresses the video and audio, for example H.264 for video and AAC for audio. The container is the file that holds those compressed streams together with timing information. The recording format setting in OBS selects the container. Your encoder choice selects the codec.
This split matters because you can change the container without touching the compressed data. That operation is called remuxing. It takes seconds, loses no quality, and uses almost no CPU, because nothing is decoded or re-encoded.
Formats you will see in OBS
You choose the format in Settings > Output > Recording > Recording Format. The common options are below.
| Format | Survives a crash or power loss | Plays in most editors and browsers | Notes |
|---|---|---|---|
| MKV | Yes | Often no | Safe default for recording |
| MP4 | No, the file can be unreadable | Yes | Index is written only when you stop |
| Fragmented MP4 (fMP4) | Mostly | Mostly | Written in pieces, so a crash loses little |
| MOV | No | Yes, on Apple tools | Similar risk to MP4 |
| Hybrid MP4 | Yes | Yes | Newer option, available in recent OBS versions, still marked beta in some releases |
Availability varies by OBS version, so check the dropdown in your installation.
Why MP4 is risky
An MP4 file stores an index, called the moov atom, that tells a player where each frame sits. A standard MP4 writer finishes this index only when the recording stops cleanly. If OBS crashes, the computer loses power, or the disk fills up, the index is missing and the whole file can be unplayable. For a 40-minute lesson, that loss is expensive.
MKV writes data so that a partial file stays readable. You lose at most the last few seconds.
The practical recommendation
Record to MKV. After you stop, remux to MP4 for editing and sharing. You get crash safety during the recording and compatibility afterward.
Name your files so they sort
OBS names files with a formatting string. The default is shown below. You can change it in Settings > Advanced > Recording > Filename Formatting.
%CCYY-%MM-%DD %hh-%mm-%ssThis produces names such as 2026-11-28 15-45-10. They sort by date and never collide, which is good. They do not tell you which lesson a file belongs to. Prepend a lesson identifier, for example lesson-01 %CCYY-%MM-%DD %hh-%mm-%ss, so files sort by lesson and then by take. Update the prefix before each lesson, or rename after remuxing.
Remux inside OBS
- Stop recording and wait until OBS finishes writing the file.
- Choose File > Remux Recordings.
- Click the file selector, or drag your MKV into the window.
- Check the target path. By default OBS writes an MP4 next to the source with the same name.
- Click Remux.
OBS leaves the original MKV in place. Do not delete it until you have played the MP4 from start to end and confirmed the audio and video are in sync.
You can also enable Settings > Advanced > Recording > Automatically remux to mp4. OBS then converts each MKV when you stop recording. Leave the original in place until you have checked the result.
Remux with FFmpeg
FFmpeg is a command-line tool that handles the same job and works well in scripts. This command copies the streams into a new container:
ffmpeg -i "2026-11-28 15-45-10.mkv" -c copy "lesson-01.mp4"The -c copy option tells FFmpeg to copy every stream without re-encoding. This is the same operation as File > Remux Recordings. Use quotes around the input name because the default filename contains spaces.
To remux every MKV in a folder on macOS or Linux:
for f in *.mkv; do
ffmpeg -i "$f" -c copy "${f%.mkv}.mp4"
doneFFmpeg asks before overwriting an existing output file. Add -n to refuse overwriting or -y to overwrite without asking.
Audio tracks and what remuxing keeps
OBS can record several audio tracks into one file. Settings > Output > Recording > Audio Track lets you tick tracks 1 to 6. A common setup is to put the mixed output on track 1 and the microphone alone on track 2. If a loud notification ruins the mix, you can still use the clean microphone track in editing.
MKV holds multiple tracks without trouble. MP4 supports them too, but some players and editors only use the first one. When you remux with -c copy and no extra options, FFmpeg's default stream selection keeps only one video and one audio stream, which silently drops the other tracks. To keep every track, map all streams:
ffmpeg -i "2026-11-28 15-45-10.mkv" -map 0 -c copy "lesson-01.mp4"The OBS remux tool preserves all tracks, but test your own file to confirm. Open the result in your editor and check that every track appears.
What can go wrong
- Remux fails with an error about a codec. The recording uses a codec the MP4 container does not accept. Remux to MKV instead, or re-encode the offending stream.
- The MP4 is fine but audio drifts. This is rare with a clean remux. It usually means the source had dropped frames or a variable frame rate. Check the OBS log and the Stats dock before blaming the remux.
- The file will not open after a crash. If you recorded to standard MP4, try recovering it with a tool such as
untruncusing a healthy reference file from the same settings. Success is not guaranteed, which is why MKV is the safer default. - You deleted the MKV and the MP4 is bad. The remux is not reversible once the source is gone. Keep the MKV until the lesson is published.
- The output is larger than expected. Remuxing does not shrink a file. Size depends on your bitrate and duration. Change those in Settings > Output, not here.
Check the remuxed file
Before you delete anything, inspect the result with ffprobe, which ships with FFmpeg:
ffprobe -hide_banner "lesson-01.mp4"Compare the listed streams, duration, resolution, and frame rate with the original. They should match. A duration that is much shorter than expected points to a failed or interrupted remux.
The workflow in one view
Choosing for your situation
- Long lessons, one machine, no crash tolerance: MKV, then remux.
- Editor that cannot open MKV: MKV plus remux, or fragmented MP4 if you want to skip the step.
- Several audio tracks for editing: MKV during recording, and
-map 0if you remux with FFmpeg. - Quick short clip you will upload right away: standard MP4 is acceptable, since losing a two-minute take costs little.
Exercise
You recorded a 45-minute lesson to standard MP4 and OBS crashed at minute 30. Why is the file likely unplayable, and what setting change prevents this next time?
Show answer
A standard MP4 writes its index (the moov atom) only when the recording stops cleanly, so a crash leaves a file without it. Set the recording format to MKV (or fragmented or Hybrid MP4), then remux to MP4 after you stop.
Exercise
Write an FFmpeg command that remuxes "take 2.mkv" into "lesson-02.mp4" without re-encoding and keeps all audio tracks.
Show answer
ffmpeg -i "take 2.mkv" -map 0 -c copy "lesson-02.mp4"