audio data and video p-frames issues

Ciannar

New Member
So a while ago I posted in this forum about a problem I had where my footage was being ruined in a way that was preventing me from editing it and thus being forced to throw out the recording and start over (link to previous post: https://obsproject.com/forum/threads/recording-problem-ruining-recordings.122563/#post-459285). according to one of the developers what was happening was that the audio data and video p-frames were being recorded before the first video keyframe, which was apparently happening due to recording in multi-track audio. Recording in single track audio does prevent this from happening, but it makes it very difficult to edit the audio later on should I need to. I have also tried to use the audio writer filter, but unfortunately the audio files I get from that (whether is use the wav setting or the acc setting) will end up shorter and pitch shifted up and I don't have the editing skills to fix the files. The only current fix I have is to try and get the game audio and mic audio as balanced as is physically possible and record in single-track audio, but this doesn't always work out for moments when the game is louder than usual either due to music or sound effects.

Is there anything I can do to prevent this problem from happening so that I can continue to record in multi-track audio so that I can edit it later if necessary or do I just have to deal with it until the devs can find a solution?

TL;DR I'm having issues with recording in multi-track audio that randomly ruin the recording, but sometimes need to record in multi-track audio so that I can edit it later please help.
 

rockbottom

Active Member
I just checked your recordings that were attached to the old thread in Avidemux, the recordings have B Frames but your GPU doesn't support them. I have some other ideas but for now, change B Frames in your encoder settings to 0 & see what happens.

10:07:40.457: [NVENC encoder: 'recording_h264'] settings:
10:07:40.457: rate_control: CQP
10:07:40.457: bitrate: 0
10:07:40.457: cqp: 18
10:07:40.457: keyint: 250
10:07:40.457: preset: hq
10:07:40.457: profile: high
10:07:40.457: width: 1920
10:07:40.457: height: 1080
10:07:40.457: 2-pass: false
10:07:40.457: b-frames: 2
10:07:40.457: GPU: 0

Avidemux.JPG
 

rockbottom

Active Member
Just leaving this as an alternative:

Copy & Paste the bolded commands to: Video Encoder Settings (if any): preset=hq profile=high rc=constqp init_qpP=18 init_qpI=18

Custom Output 1.JPG
 

Ciannar

New Member
Just leaving this as an alternative:

Copy & Paste the bolded commands to: Video Encoder Settings (if any): preset=hq profile=high rc=constqp init_qpP=18 init_qpI=18

View attachment 61085
So I tried setting max B-Frames in my encoder settings to 0 but it didn't work, and I would use the alternative solution you suggested but it appears as though your output settings are different from mine. Would I be fine putting that line in the custom muxer settings or is there somethings different that I need to do? For the record I have OBS studio 25.0.8 which according to the website is the latest version.
1600459771012.png
 

rockbottom

Active Member
Updated with no Psycho Visual Tuning.

preset=q profile=high rc=constqp init_qpP=14 init_qpI=14

Also turn off Game DVR if you still have it on & if you're going to be encoding aac, you should install the Core Audio encoder.

v26 Release Canadate 2 is out. Might be worth giving it a shot if this doesn't work.
 

rockbottom

Active Member
I just had a chance to test all of the different settings & they all worked. This recording was done with your settings. An I Frame is first & both audio tracks are good to go.

Update your Nvidia Driver & re-try. Updating Windows wouldn't be a bad idea either. I just updated from 1903 to 2004 a couple of days ago & have noticed slightly better performance with all my apps.

Avidemux 2.JPG
 

Ciannar

New Member
I just had a chance to test all of the different settings & they all worked. This recording was done with your settings. An I Frame is first & both audio tracks are good to go.

Update your Nvidia Driver & re-try. Updating Windows wouldn't be a bad idea either. I just updated from 1903 to 2004 a couple of days ago & have noticed slightly better performance with all my apps.

View attachment 61092
Well I've made sure that windows 10 is up to date and I updated my Nvidia drivers I even tried copying the output settings you posted in that one picture but all I get is this error message:
1600471803626.png

Current settings based upon image:
1600471834286.png
 

Ciannar

New Member
I tried it again with my or
You used the x264 encoder, the commands won't work.

Use NVENC

h264_nvenc (libx264)
Whoops my bad. Well after fixing that little mistake I went back in to try and test if the problem still occurred I managed to get 30 3-5 second test videos without the problem happening, so unless I got insanely lucky I think this has finally solved my problem (though the real test will be doing a full recording). The only oddity to occur was this window popping up a couple times:
1600477593542.png

Just one small question though: Is matroska in the container format just the full name for the mkv format?

Beyond that thank you so much for helping to solve a problem that has been plaguing me for the better part of a year.
 

rockbottom

Active Member
Cool, YW! Some good news but the unspecified error is bothersome. If you were starting/stopping the 30 recordings quickly, that may have been the cause of the error but I would need to see the log. Anyway, try some longer test recordings, hopefully the stability will be good. If you still run into the error, try switching back to your original settings. They should produce a good recording as well now that you've updated the Nvidia drivers. If the error keeps occurring just post a log in this thread.

Yes, Matroska is mkv. Here's the link to the website: https://www.matroska.org/index.html
 

Ciannar

New Member
Cool, YW! Some good news but the unspecified error is bothersome. If you were starting/stopping the 30 recordings quickly, that may have been the cause of the error but I would need to see the log. Anyway, try some longer test recordings, hopefully the stability will be good. If you still run into the error, try switching back to your original settings. They should produce a good recording as well now that you've updated the Nvidia drivers. If the error keeps occurring just post a log in this thread.

Yes, Matroska is mkv. Here's the link to the website: https://www.matroska.org/index.html
Well I did a long recording (just over an hour) and everything seems fine. As for the error it only popped up when I pressed the start recording hot key those two times and it only seemed to stop the recording process, which shouldn't be a problem for me. The only things that seems off is that I can no longer use the pause recording feature of OBS studio any idea why?
 

Ciannar

New Member
Nice!

No pause with the Custom FFMPEG output. If you need it, switch back to your settings.
Well it's not a deal breaker being able to pause recordings was more for the convenience and to reduce the editing work I would have to do. Plus if I revert to the original settings (unless there is something similar I can do in the standard type output settings) then I will have to deal with the problem that ruins my recordings again.
 

rockbottom

Active Member
I'm fairly certain the issue was being caused by the old Nvidia drivers you were using. Now that you've updated them, I don't think you're going to have any trouble. If the issue does still exist, switch back to the Custom FFMPEG output.
 
Top