Question / Help Portion of recording missing/corrupted

Stalfelz

New Member
First post here so apologies in advance if I screwed it up in some way, such as posting in the wrong area. This looks to be the correct place however, so on to the issue.

My friends and I just finished recording a set of videos for our sub-par, just for the fun of it let's play channel, and a small portion in the middle of the video seems to have gone poof. At approximately 1:03:56 into the recording, the video feed [from an internal capture card] freezes but maintains game audio until 1:04:14, at which point the audio appears to jump forward in the recording then cut out at 1:04:16. Both USB microphones [we're using] also drop out at 1:04:15, then return along with the game audio at 1:08:12. The video feed also updates at 1:08:11 but it still frozen, and continues to update [while remaining frozen] at various intervals until it eventually returns to normal at 1:09:41.

The rest of the video appears to be completely fine and correctly synchronized as if nothing terrible had befallen it, but something else that has never happened before occurred. Once we hit the 'Stop Recording' hotkey, the button's text changed to 'Stopping Recording' and appeared to be stuck there. After a couple of minutes I decided to hit it again, and thus it stopped. Everything appeared fine until I imported the footage into Audacity to clean up the commentary audio, which is when I noticed the huge missing chunk, followed by the discovery of missing/corrupted video footage to go along with it.

In all the years I've been using OBS to record videos, this has never happened. The only other issue I have is Xbox One X not wanting to play nicely with my setup (multiple HDMI matrixes and such) unless literally everything is set to it, and no other game console. But that's a different issue entirely, so back on task.

I come here today to ask if anyone else has encountered this issue, and maybe shed some light as to why it occurred. The only points of failure I can think of are the capture card, OBS, or my computer itself. A combination of one or more of them had to have derped, and I'm worried it may happen again in the near future. While this recording may be salvageable due to making a save backup between recording sessions—and we can thus simply redo a small portion of the afflicted episodes and let the non-existant viewers know about it—it could do significant harm down the line for games we can't easily make a backup for; and although we won't lose any revenue from it (channel is just for fun, not monetized), it would still really suck.

If requested, I can upload the original recording somewhere if it needs to be examined. Other than that, here's my system specs if they can be of any use.

OS: Windows 10 Pro 64-bit
CPU: i9-9900k
GPU: RTX 2080 Ti
RAM: 64 GB (4x16 GB) DDR4 C16 2666 Mhz
PSU: 1200 W 80+ Platinum

Capture Card: AVerMedia Live Gamer HD 2
USB Mic 1: Blue Yeti
USB Mic 2: Yeti Nano

OBS version 24.0.3 (64 bit)

Addendum: This log file shows the recording having started at 5:40 PM, but the recording actually started at 6:40 PM. There are no log files after this one [save for instances where I've opened OBS after the recording], so I don't know what happened if this isn't it... Just in case however, I'll also upload the one after it.

Edit: Oh, there's an upload log feature, derp. I'll use that instead of attachments.

OBS Log: https://obsproject.com/logs/zBy1SRVh5-ZommvK
OBS Log 2: https://obsproject.com/logs/6a_-1JhZQmnCF0Ea
 
Last edited:

Narcogen

Active Member
Only thing in the log is this:

20:34:23.092: Video stopped, number of skipped frames due to encoding lag: 20932/409653 (5.1%)

Not sure if what that means is that you're just dropping a few frames throughout your video in addition to the missing footage, or if this error represents that footage. If something really dramatic happened, like the encoder crashing, I'd expect the video to be in worse shape.

The log doesn't indicate anything else amiss, which indicates to me the issue is possibly upstream of OBS-- possibly the capture device?
 

Stalfelz

New Member
Hmm... not sure. As previously stated, the video seems to be in perfect condition with all audio and video still synchronized, save for the 8 minutes of derped footage.

Also after thinking about it over night, it had to be OBS at fault. If it was my PC, then other things such as a JavaScript episode timer (marks points of interest in the recording such as when an episode starts and ends) I rigged up would have stopped working, or at the very least frozen for a period and cause the timestamps to be inaccurate, but everything was fine on that front.

Likewise, it could not have simply been the capture card, as the USB microphones stopped working as well. You could say USB devices stopped working, but the wireless USB keypad I use for hotkey functions still worked, as well as the USB powered external monitor we display the JavaScript timer on.

Any ideas on what may have caused encoding lag in OBS? I didn't have any extra programs running aside from what I always have (Skype, Steam, Firefox and normal background processes), which is no different from any other recording session. My CPU and GPU should be more than capable of handling a few things being thrown at it in the first place.

The only thing I did differently from usual was have OBS loaded for an extended period of time before actually starting the recording. Oh, come to think of it, that's probably why the timestamp on the log is an hour before the recording started. Why didn't I think of that before... Anyway, we've had much longer recording sessions than this with no issue, so an hour just idling before hitting the record button shouldn't affect anything, right?
 

Stalfelz

New Member
So I just finished recording/streaming a 6 hour game of Monster Hunter World on Steam, and a small portion of my recording disappeared into limbo again. I know it's not a capture card issue for sure now, as it wasn't even in use for this, so it has to be something going on with OBS.

The error occurs around the 1 hour mark this time, and corrects itself after about 5 minutes. The stream stopped once the error started, and a new stream started up once it was back to normal (leaving me with a 1 hour stream, a 5 hour stream, and a 6 hour recording).

If anyone could figure out what's causing this to happen, it would be much appreciated. Log file below.
Note: Before the stream and recording in question were started, I did a quick 1 minute test stream. I did not idle OBS before starting anything this time around.

https://obsproject.com/logs/9vvOdBCOKgac7PjS
 

Stalfelz

New Member
There's no way I had network issues unless it was just with Twitch. I was playing the game online and using TeamSpeak the entire time, and there were no issues there. The fact that the stream stopped and restarted at the exact moment the recording is missing footage cannot be a coincidence. More likely the stream stopped because OBS was derping and there was nothing to send upstream. Either way, I'm not worried about the stream, I'm worried about losing recorded footage again like before. Thank you for trying to help though.
 

koala

Active Member
It seems an issue with OBS in fact, but not with the network connectivity part as I see it. In the log it is clearly seen that OBS detects a network stall for the video stream and the stream is aborted:
12:50:09.601: [game-capture: 'Fullscreen'] d3d11 shared texture capture successful 12:50:09.605: [game-capture: 'Fullscreen'] shared texture capture successful 13:53:31.945: adding 21 milliseconds of audio buffering, total audio buffering is now 64 milliseconds (source: Game Audio) 13:53:31.945: 13:53:47.116: WriteN, RTMP send error 10053 (542 bytes) 13:53:47.116: WriteN, RTMP send error 10053 (79 bytes) 13:53:47.116: WriteN, RTMP send error 10038 (42 bytes) 13:53:47.116: [rtmp stream: 'adv_stream'] Disconnected from rtmp://live-dfw.twitch.tv/app 13:53:47.116: Output 'adv_stream': stopping 13:53:47.116: Output 'adv_stream': Total frames output: 213728 (219226 attempted) 13:53:47.116: Output 'adv_stream': Total drawn frames: 230167 13:53:47.116: Output 'adv_stream': Number of dropped frames due to insufficient bandwidth/connection stalls: 5498 (2.5%) 13:53:47.116: Output 'adv_stream': Reconnecting in 10 seconds.. 13:53:47.116: [rtmp stream: 'adv_stream'] Freeing 4378 remaining packets
The "WriteN, RMTP send error" messages mean the connection was aborted. First, error 10053 means it is unable to send any more data, then error 10038 means there is no socket any more, which means the connection is actually aborted by both sides. This is a completely valid sequence if the connection between OBS and the Twitch server is severed. If Teamspeak and your game continued to work fine, then there was some connection issue on the Twitch server side. Nothing you can do about except use a different Twitch server, if this happens frequently.

The issue, as I see it, is that although you use 2 different encoders, one x264 for the stream and one nvenc for the recording, the recording encoder stopped encoding while streaming was down. This looks to me as a bug in OBS, because both should be independent from each other. And they usually are, because you can start/stop streaming manually as often as you like with the start/top streaming button while a previously started recording continues to run uninterrupted.
 

Stalfelz

New Member
The only connection issue I've ever had with Twitch was several years ago on a much less powerful computer, and much slower internet (currently have fiber connection with an average of 940Gbps upstream and downstream).

Again though, this is the same issue as I had in the original post, wherein I was not streaming, only recording. Normally I only stream or record, never both at once, but this time I doubled down so I could later upload a cut down version of the stream in higher quality to YouTube. In both cases, once I clicked on the "Stop recording" button, the button's text changed to "Stopping recording..." and did not actually stop until I hit it again.

I did another dual stream and record test tonight for 3 hours 40 minutes and it appears to be just fine, so I'm really not sure what is causing this. So far it's only happened the two times, but without knowing the cause, I'm worried it'll happened again during a game where save backups cannot be made (like Pokemon).

Once again though, thank you for your response, and sorry for the late reply.
 

Narcogen

Active Member
13:00:45.348: WriteN, RTMP send error 10053 (3746 bytes)
13:00:45.348: WriteN, RTMP send error 10053 (79 bytes)
13:00:45.348: WriteN, RTMP send error 10038 (42 bytes)
13:00:45.348: [rtmp stream: 'adv_stream'] Disconnected from rtmp://live-dfw.twitch.tv/app


Same as above. Connection drops and OBS reconnects.
 

Stalfelz

New Member
So I might have discovered what the problem is, along with the solution. I'm not 100% sure this is the cause, but there would inherently be problems if OBS couldn't write data fast enough, and a faster drive would solve such an issue.

Before, I was recording to a 10TB HDD (Seagate Barracuda Pro). Obviously that's limited to the write speeds of a 7200rpm platter drive, whatever that may be. So as a sanity check, I decided to try recording to a faster drive, a 500GB m.2 (Samsung 970 Evo Plus). Ever since switching to the [much] faster drive, I haven't encountered this issue again (which did plague me several more times after my last post, but I elected not to report them).

So for anyone else who encounters this or a similar issue, it may be a simple matter of slow write speeds. Try switching your recording output to a faster drive and do a few test recordings, and good luck.
 

Narcogen

Active Member
The above log errors are network related and would occur even if you were not recording at all. It may just be that the problem was temporary and you're no longer experiencing it, which could mean it was an issue with your ISP that they resolved or a problem they are no longer having.
 

Stalfelz

New Member
Let's say that you're right, and network issues were the cause of the stream cutting out and then resuming, while all other internet connectivity continued unabated. That doesn't explain why the local recording is corrupted/blank for the exact period of time in which the stream was down. More importantly⁠— and I've stated this multiple times now⁠— the very first occurrence of this issue happened while just recording, not streaming, and that wasn't the only time it happened. A couple of the occurrences that I did not report were also local recordings only.

I'm not saying it isn't possible that network issues are the cause of local recording mishaps (depends on how OBS was coded), I'm saying it's highly unlikely. But, just as network issues should not be a hindrance to local recordings, disk write speeds should not affect streaming. Either way, the issue appears to be resolved, hopefully for good. Hopefully.
 

Narcogen

Active Member
Ok, to clarify-- I'm suggesting you have, or at least had, two separate and possibly unrelated problems that both occurred during a single logfile, and that one does not cause or affect the other.

Your output device's ability to write at the speed necessary to keep up with your recording settings can surely have been the cause of lost/corrupted footage in a recording.

It doesn't affect getting disconnected from Twitch, which is a separate issue.

I'm not aware of a mechanism by which the network issue would have caused the recording issue; it's just that in the log as presented, one happens and then the other, but that doesn't mean causation. And the fact that you mention the recording problem happened in at least one situation when no streaming was taking place backs that up. I don't see, in the logfile, a reason for the recording problem, only a reason for the streaming problem.
 

Stalfelz

New Member
That is entirely possible. Though when I did record and stream at the same time, the issue took place on both recording and streaming at the same moment, for the same duration, every time. That many times, there's no way it can just be coincidence, they must be related.

Maybe my computer just hates me.
 
Top