Question / Help Recording Problem ruining recordings

Ciannar

New Member
Like the title says I've been having a problem with OBS studio that ruins my recordings and prevents me from uploading them as I cannot edit them, which because I'm using multi-track audio is a necessity.
What basically happens is that after I record the video I open it to make sure that it recorded properly I see this:
1589740786848.png

Even if I remux the recording from mkv to mp4 I get a similar problem but instead of the grey screen I just get a black screen:
1589740976596.png

After a few seconds it returns to normal and the recording goes on as normal, but this error prevents me from editing it as when I put it into my video editing software all I get is a black screen for the video:
1589740886328.png

I've tried several things to try and fix this problem including: running OBS studio in administrator mode, uninstalling OBS studio and then importing my profiles and scenes into a fresh install of OBS studio, and trying to record my videos in mkv format as I thought that my videos were getting corrupted, but none of these solution seemed to take care of my problem also it's not just game capture that I have this problem with, but also with window capture when I try to record Persona 5 via remoteplay.

As far a I remember this problem didn't start happening until I started recording a series on Tron 2.0 using the killer app mod (so that I could have a decent resolution), which also required an unofficial patch. I tried uninstalling all of those objects thinking that they might be causing the problems, but doing so has solved nothing.

Currently my only viable solution is to do 3 test recordings and if the error happens to just close and reopen OBS studio until I get 3 good tests in a row, and then hope that the fourth official recording goes fine.

Here are my computer specs:
Operating System: Windows 10 Home 64-bit
Processor: Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz (4 CPUs), ~3.4GHz
Graphics Card: NVIDIA GeForce GTX 1070 Ti

Attached is the log file for the failed recording if anyone can help me I would greatly appreciate it.
 

Attachments

  • 2020-05-17 10-07-27.txt
    18.3 KB · Views: 31

FerretBomb

Active Member
To be clear, are you certain that is the logfile from the session that created the broken file? The only thing immediately visible in that last (fourth) recording session is 34 frames of encoding lag, not even 0.1%, which shouldn't be a problem.

I'm also curious if you run mkclean over the mkv before remuxing, if that might fix the issue; I've had a bad-metadata issue when recording with nvenc, but it normally only hits extremely long (10+ hour) recordings. Wondering if this could maybe be related if an mkclean -remux then remuxing to mp4 after the repair gets them fixed up.
 

Ciannar

New Member
Would you be able to share the damaged MKV file somewhere?
Unfortunately I can't share the damaged MKV file as it is far too large to attach as a file here but I did record another, much smaller, video where the same problem happened, and have included a remuxed mp4 file of that same recording. I hope that will be enough for you to find a solution to this problem.
 

Attachments

  • Shadowrun Dragonfall - Director's Cut Damaged File.rar
    716.4 KB · Views: 22

Ciannar

New Member
To be clear, are you certain that is the logfile from the session that created the broken file? The only thing immediately visible in that last (fourth) recording session is 34 frames of encoding lag, not even 0.1%, which shouldn't be a problem.

I'm also curious if you run mkclean over the mkv before remuxing, if that might fix the issue; I've had a bad-metadata issue when recording with nvenc, but it normally only hits extremely long (10+ hour) recordings. Wondering if this could maybe be related if an mkclean -remux then remuxing to mp4 after the repair gets them fixed up.
I've never actually heard of that program before today. I downloaded it, but the instructions were not very clear. I assume that I'm supposed to drag the MKV file onto the EXE file which does seem to cause the program to open, but then the text goes by so quickly that I don't have time to see what is going on. Is there some tutorial I could watch to have an idea of how to use it?
 

R1CH

Forum Admin
Developer
Thanks for the file, it confirms my suspicions - audio data and video p-frames are being written before the first video keyframe. Does it still happen if you only use a single audio track?
 

Ciannar

New Member
Thanks for the file, it confirms my suspicions - audio data and video p-frames are being written before the first video keyframe. Does it still happen if you only use a single audio track?
Well I switched my settings over to using just one audio track and managed to record 15 test videos in a row without the problem happening, but unfortunately I need to record with multi-track audio in case I need to edit said audio like when the audio glitches out and becomes incredibly loud or when music is too quiet/too loud and I can't just adjust the volume in game, so I don't also mess with my own microphone volume. Is there any other solution I could use besides switching to a single audio track for recording?
 

FerretBomb

Active Member
I've never actually heard of that program before today. I downloaded it, but the instructions were not very clear. I assume that I'm supposed to drag the MKV file onto the EXE file which does seem to cause the program to open, but then the text goes by so quickly that I don't have time to see what is going on. Is there some tutorial I could watch to have an idea of how to use it?
Ah, sorry. It's a command-line utility. Place it in the directory where your videos are. Hit CTRL+R to open the Run dialog, type in 'cmd' without quotes and hit enter. Then navigate to the directory (for example, D: to switch to the D drive, cd \ to change to the root directory, then cd \this\is\an\example\path to change to the directory containing the video and mkclean), and type 'mkclean' to get a list of options.
Normally I use
mkclean --remux input_file.mkv output_file.mkv
While you don't always need the --remux flag, in my case it's what generally gets me a clean output mkv in the case of my corruption issue.
If anything in your path or filename has spaces, you'll have to surround it with quotes (so something like "My filename has spaces.mkv" or cd \test\"path has spaces in"\its\name
And DON'T write to the same file it's reading from, use a different output filename.

On a side note, does the issue happen if you use x264 software encoding, or only with NVENC?

In the short-term as a workaround, if you're already editing you could record a single audio track to avoid the issue, use the AudioWriter filter to split out your audio sources into separate audio recordings, then re-sync them with the video in your editor, discarding the single unified audio track from the video. The only potential issue at that point is getting the secondary audio files synced properly to the video.
 
Last edited:

Ciannar

New Member
Ah, sorry. It's a command-line utility. Place it in the directory where your videos are. Hit CTRL+R to open the Run dialog, type in 'cmd' without quotes and hit enter. Then navigate to the directory (for example, D: to switch to the D drive, cd \ to change to the root directory, then cd \this\is\an\example\path to change to the directory containing the video and mkclean), and type 'mkclean' to get a list of options.
Normally I use

While you don't always need the --remux flag, in my case it's what generally gets me a clean output mkv in the case of my corruption issue.
If anything in your path or filename has spaces, you'll have to surround it with quotes (so something like "My filename has spaces.mkv" or cd \test\"path has spaces in"\its\name
And DON'T write to the same file it's reading from, use a different output filename.

On a side note, does the issue happen if you use x264 software encoding, or only with NVENC?

In the short-term as a workaround, if you're already editing you could record a single audio track to avoid the issue, use the AudioWriter filter to split out your audio sources into separate audio recordings, then re-sync them with the video in your editor, discarding the single unified audio track from the video. The only potential issue at that point is getting the secondary audio files synced properly to the video.
Hi Sorry it took me so long to respond, but I did test out x264 and NVIDIA NVENC H.264 (New) with multi-track audio and it seems that I was able to get 15 good test recordings in a row with x264, but I wasn't able to do so with the NVIDIA NVENC H.264 (New). So I could try for the x264 encoding in order to prevent the problem, but from what I've hear the NVIDIA NVENC is better when it comes to video quality. Should I just use the x264 encoding so I can stick to using multi-track audio or should I just stick with the NVENC on a single audio track and just use the Audio Writer Filter considering that I still have to use audacity to separate my microphone audio and then edit it in anyways? Also If I use the NVIDIA NVENC H.264 (New) should I turn off Psycho Visual Tuning and leave Look-ahead off (as I use CQP for rate control) or have them turned on?
 

FerretBomb

Active Member
So it does appear there are some issues with NVENC and local recordings for some reason.
When recording locally and using CQP/CRF, a better-quality encoder just means smaller file sizes.

You can use x264 Ultrafast with CQP and it will result in larger files and minimal CPU impact... essentially it'll just throw a mountain of bitrate at the poor encoding quality to make it look good, which you can do when recording locally as hard drive space and write speed are plentiful. You can then re-compress it later with something like Handbrake and a better encoding preset to bring the file sizes down.
When streaming you have a bitrate bottleneck to deal with.
Turing NVENC is equivalent to x264 Slow in that case, and extremely good to use.

I'd probably just (for the moment) go with x264 Ultrafast CQP/CRF (or whatever your CPU can handle reasonably while gaming), just to make it less of a problem keeping the audio and video together and synced.
Hopefully @R1CH and crew can figure out what's going wonky with NVENC recording. :)

Did the mkclean utility fix up the existing recordings, by the way?
 

Ciannar

New Member
So it does appear there are some issues with NVENC and local recordings for some reason.
When recording locally and using CQP/CRF, a better-quality encoder just means smaller file sizes.

You can use x264 Ultrafast with CQP and it will result in larger files and minimal CPU impact... essentially it'll just throw a mountain of bitrate at the poor encoding quality to make it look good, which you can do when recording locally as hard drive space and write speed are plentiful. You can then re-compress it later with something like Handbrake and a better encoding preset to bring the file sizes down.
When streaming you have a bitrate bottleneck to deal with.
Turing NVENC is equivalent to x264 Slow in that case, and extremely good to use.

I'd probably just (for the moment) go with x264 Ultrafast CQP/CRF (or whatever your CPU can handle reasonably while gaming), just to make it less of a problem keeping the audio and video together and synced.
Hopefully @R1CH and crew can figure out what's going wonky with NVENC recording. :)

Did the mkclean utility fix up the existing recordings, by the way?
I tried using the instructions you provided for the mkclean utility, but whenever I try to use mkclean in the command line after setting the root directory to the location of the broken mkv file it just says that 'mkclean' is not recognized as an internal or external command,
operable program or batch file. So I have no idea what I'm doing wrong with that.

As for using x264 at ultrafast on CRF (as CQP isn't an option and that seems to be the closest to CRF) what would you recommend for the CRF option (I've been using 18 for NVENC without any noticeable problems), for the Keyframe Interval according to a video from eposvox he states that setting it to 2 is a must, and for the profile/tune options. He also reccomended using VBR, but I'm not sure which is better.
 

Ciannar

New Member
So it does appear there are some issues with NVENC and local recordings for some reason.
When recording locally and using CQP/CRF, a better-quality encoder just means smaller file sizes.

You can use x264 Ultrafast with CQP and it will result in larger files and minimal CPU impact... essentially it'll just throw a mountain of bitrate at the poor encoding quality to make it look good, which you can do when recording locally as hard drive space and write speed are plentiful. You can then re-compress it later with something like Handbrake and a better encoding preset to bring the file sizes down.
When streaming you have a bitrate bottleneck to deal with.
Turing NVENC is equivalent to x264 Slow in that case, and extremely good to use.

I'd probably just (for the moment) go with x264 Ultrafast CQP/CRF (or whatever your CPU can handle reasonably while gaming), just to make it less of a problem keeping the audio and video together and synced.
Hopefully @R1CH and crew can figure out what's going wonky with NVENC recording. :)

Did the mkclean utility fix up the existing recordings, by the way?
Sorry for the double reply, but I just put in some setting for CRF on x264 encoder (16 for CRF 2 for keyframe interval and ultrafast for the CPU) and the problem that I've been having showed up again when I was using multiple audio tracks but when I switched to a single audio track it worked just fine in getting me 15 test recordings in a row without any problem I should also note that I was using CBR with default settings (as I didn't want to mess with anything) for the earlier test. So I'm thinking the problem might genuinely be the use of multiple audio tracks and I might have to use the Audio Writer Filter in order to get around this problem.
 

FerretBomb

Active Member
CQP and CRF are equivalent. One is the x264, the other is what NVENC calls it. I can never remember which one is which, so just listed both. Lower numbers are better quality on both, and 16-22 are the normal use-ranges (going down to 12 for stuff you plan to edit).
Ah, that means that the issue isn't NVENC-specific then, just got lucky on the first tries. Yep, at least you have a workaround method though!

That response means that the mkclean utility wasn't placed into the directory where the video file is. If you don't have it there, you have to specify the full path to it, which is a pain.
 

Ciannar

New Member
CQP and CRF are equivalent. One is the x264, the other is what NVENC calls it. I can never remember which one is which, so just listed both. Lower numbers are better quality on both, and 16-22 are the normal use-ranges (going down to 12 for stuff you plan to edit).
Ah, that means that the issue isn't NVENC-specific then, just got lucky on the first tries. Yep, at least you have a workaround method though!

That response means that the mkclean utility wasn't placed into the directory where the video file is. If you don't have it there, you have to specify the full path to it, which is a pain.
Yeah I just need to find where my OBS folder is so that I can install that filter, and thank goodness it exists because I need to have separate audio tracks for my game audio and my microphone for editing purposes.

As for the mkclean utility I realized that I downloaded the wrong thing as I had downloaded the mkvalidator instead, but even then I can't seem to get it to work. The readme file says something about building mkclean and coremake, but the instructions are exactly clear.
 

Ciannar

New Member
CQP and CRF are equivalent. One is the x264, the other is what NVENC calls it. I can never remember which one is which, so just listed both. Lower numbers are better quality on both, and 16-22 are the normal use-ranges (going down to 12 for stuff you plan to edit).
Ah, that means that the issue isn't NVENC-specific then, just got lucky on the first tries. Yep, at least you have a workaround method though!

That response means that the mkclean utility wasn't placed into the directory where the video file is. If you don't have it there, you have to specify the full path to it, which is a pain.
Well it looks like I actually can't use the audio writer filter because the .wav files that I get are shorter/sped up and sound like they've been pitch shifted up so that my voice sounds higher than it actually should and I have nowhere near the editing skills to fix this so it looks like I'm just going to have to endure the issue until the devs can fix the problem.
 

HitchensYT

New Member
hello any clue when this will be fixed as im having the same issue, still scrambly and grey n stuff (whatever its called) using NVENC (new), ive an i7 and play fairly intensive games do you think itllimpact it heavily if i switched to x264?? thanks for all the information!!
 

Attachments

  • image_2022-08-05_125006792.png
    image_2022-08-05_125006792.png
    289.2 KB · Views: 12
Top