Question / Help How to record high quality Wav audio in OBS ?

Hello, fellows,

I want to record musical performances in OBS, alternating cameras, etc. One of the problems is that while recording, OBS ( at least that I know ), doesn´t offer the option to record high quality waves files ( 16 bit PCM ), only while in Mp4, record AAC, which is really bad audio for professional level edition ( We need to edit them later, so I need really fine PCM raw audio ). Is there some way to record nice video files while choosing wave as the audio record setting ?

Thanks in advance
 

koala

Active Member
There are restrictions with every container format. The mp4 format does not allow pcm audio contents. This is no OBS restriction, it's a restriction of the mp4 container format. The only modern container format that allows arbitrary combinations is mkv. With mkv, you are able to record h.264-encoded video and pcm audio. But be careful: you cannot convert this combination to mp4. If your postprocessing software only supports mp4, you have to first extract the audio tracks to separate files and strip them from the mkv. Then you can remux the audio-less mkv to mp4. Then import the extracted wav and mp4 separately into your postprocessing software.

To create mkv files with h.264 video and pcm audio, use ffmpeg output. It's probably something like this:
1562262928118.png


An alternative is using the simple output mode of OBS and choose "lossless quality" as recording quality. This will create an *.avi file with both video and audio lossless. This will create really huge files, though.
 
There are restrictions with every container format. The mp4 format does not allow pcm audio contents. This is no OBS restriction, it's a restriction of the mp4 container format. The only modern container format that allows arbitrary combinations is mkv. With mkv, you are able to record h.264-encoded video and pcm audio. But be careful: you cannot convert this combination to mp4. If your postprocessing software only supports mp4, you have to first extract the audio tracks to separate files and strip them from the mkv. Then you can remux the audio-less mkv to mp4. Then import the extracted wav and mp4 separately into your postprocessing software.

To create mkv files with h.264 video and pcm audio, use ffmpeg output. It's probably something like this:
View attachment 46271

An alternative is using the simple output mode of OBS and choose "lossless quality" as recording quality. This will create an *.avi file with both video and audio lossless. This will create really huge files, though.

Thank you sooo much. MKV files will do the job. I don´t mind extracting audio later, or find a way that Adobe Premiere could open MKV files for post-processing.

Thanks !
 
There are restrictions with every container format. The mp4 format does not allow pcm audio contents. This is no OBS restriction, it's a restriction of the mp4 container format. The only modern container format that allows arbitrary combinations is mkv. With mkv, you are able to record h.264-encoded video and pcm audio. But be careful: you cannot convert this combination to mp4. If your postprocessing software only supports mp4, you have to first extract the audio tracks to separate files and strip them from the mkv. Then you can remux the audio-less mkv to mp4. Then import the extracted wav and mp4 separately into your postprocessing software.

To create mkv files with h.264 video and pcm audio, use ffmpeg output. It's probably something like this:
View attachment 46271

An alternative is using the simple output mode of OBS and choose "lossless quality" as recording quality. This will create an *.avi file with both video and audio lossless. This will create really huge files, though.

Hello, Koala. It´s been a long time since we talked about this issue. It worked with MKV files, but now I have another question that perhaps you could answer: .MOV files can´t do that also ? I mean, mkv files are not easily editable in Adobe Premiere, but MOV files are. Is there a way to use mov files and PCM audio instead in OBS ? ( Since mp4 files cannot use PCM ? )

Thanks to anyone that could answer that or help.
 

BluePeer

Member
its a little work but
with gMKVExtractGUI you can extract the sound lines
and with mkvtoolnix you can create a new mkv without sounds
that file you can remux with obs to mp4
then you can use the mp4 and the audio files separated in the software
i know this steps need a little time related to the file size but you have then all in your target software
 
its a little work but
with gMKVExtractGUI you can extract the sound lines
and with mkvtoolnix you can create a new mkv without sounds
that file you can remux with obs to mp4
then you can use the mp4 and the audio files separated in the software
i know this steps need a little time related to the file size but you have then all in your target software

Sometimes I use another tour: I record in OBS in mp4 and use an external audio recorder to record the sound in PCM 44.1khz 16 bits and remux them on Adobe Premiere. But of course, it would be better.....
 

rockbottom

Active Member
It sure is, these are my settings for H265 with 24/48 WAV. Just make sure your system/OBS is stable, if you get a crash during your recording session, you'll lose it.

Custom QT Settings.JPG
 

Suslik V

Active Member
@rockbottom probably the Muxer Settings as:
Code:
movflags=frag_keyframe min_frag_duration=16000000
will help to withstand the crash.

If your editor doesn't supports fragmented files (Muxer Settings above creates such files with fragment length 16 sec) you may remux recording in the main menu of OBS before using it in your editor.
 

rockbottom

Active Member
@rockbottom probably the Muxer Settings as:
Code:
movflags=frag_keyframe min_frag_duration=16000000
will help to withstand the crash.

If your editor doesn't supports fragmented files (Muxer Settings above creates such files with fragment length 16 sec) you may remux recording in the main menu of OBS before using it in your editor.

Yep, I've tested using those arguments. Also have done some testing using moov_size=bytes, this moves the atom file to the beginning so if there is a crash the result is the same as recording to an mkv container. I just need to do some more testing for 4-6 hour recordings. The longest I've done so far was about 90 minutes & that was with moov_size=1024
 

rockbottom

Active Member
B reference mode still gives me some trouble so it's disabled, but it might be worth a shot enabling it.

preset=hq profile=main tier=high rc=constqp rc-lookahead=32 init_qpP=18 init_qpB=18 init_qpI=18 bf=2 b_ref_mode=disabled
 

Suslik V

Active Member
@rockbottom the moov_size incompatible with fragmented writing as far as I understand.
Fragmenting keeps the index table in small pieces and distributed across the file. So, either the file written using moov_size and keeps indexes in the RAM (growing value) and thus can be lost during power failure. Or the file written in "fragments" (min_frag_duration) - small index tables written each few seconds within the recording file (file grows - indexes saved).
I think, the moov_size was designed for portable cameras where writing bitrate more predictable and disk re-writing not desirable. Casual remuxing increases waiting time before newly created recording will be ready for playback.
 

rockbottom

Active Member
@rockbottom the moov_size incompatible with fragmented writing as far as I understand.
Fragmenting keeps the index table in small pieces and distributed across the file. So, either the file written using moov_size and keeps indexes in the RAM (growing value) and thus can be lost during power failure. Or the file written in "fragments" (min_frag_duration) - small index tables written each few seconds within the recording file (file grows - indexes saved).
I think, the moov_size was designed for portable cameras where writing bitrate more predictable and disk re-writing not desirable. Casual remuxing increases waiting time before newly created recording will be ready for playback.

Cool, Thx for the clarification! I'll do some additional testing with fragmented writing commands when I get a chance.
 
Top