obs-studio icon indicating copy to clipboard operation
obs-studio copied to clipboard

OBS can't stop recording after pause. OBS在我中途暂停过一次后无法结束录制

Open QYream opened this issue 3 years ago • 16 comments

Operating System Info

Windows 11

Other OS

No response

OBS Studio Version

28.1.2

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/NDNsAp4L-js7VsP2

OBS Studio Crash Log URL

https://obsproject.com/logs/VTwf8Oj-Y4qPW6gQ

Expected Behavior

I record as usual. 我像往常一样录制。

Current Behavior

After I recorded for about 50 minutes, I paused the recording for a while and continued after that. When I finished recording I thought it had ended successfully, but it didn't. The button shows "Stop recording..." . I pressed the button again and "... " disappeared, and when I clicked it again, it still said "Stop recording..." . I thought that recording in MKV format could be saved even if OBS was closed, but it turned out that OBS was still running after closing, and it reported an error after a while. When I checked the video file again, I found that only the clip before the recording was paused was saved. (This passage is machine translated) Translated with www.DeepL.com/Translator (free version) 在我录制了50分钟左右后,我暂停了一会录制,之后继续录制。结束录制后我本以为成功结束了,但是它并没有结束。按钮显示的是“停止录制...”。我又按了一下这个按钮,”...“消失了,再点击仍然是“停止录制...”。我本以为以MKV格式录制即使关闭OBS也能保存,结果是关闭后OBS仍在运行,过一会报错。我再查看视频文件时发现只保存了暂停录制前的片段。

Steps to Reproduce

1.record for about 50 minutes 2.paused the recording for a while and continued after that 3.click the button "Stop recording" and find it doesn't work 4.click on the X in the upper right corner of the window 5.OBS is still running , and after a while it crashes

Anything else we should know?

No response

QYream avatar Dec 20 '22 04:12 QYream

I have the same issue, but am quite confident that it is a problem with the latest nvidia drives, because I rolled back to OBS Studio 28.0.3 that I used without any issues for so long and the problem is present in there, too. (Windows 10)

The following I can add:

  • The amount of time recorded is irrelevant. I had the "Stopping..." bug after any time length between a few seconds and several minutes.
  • Closing OBS Studio prompts that this would stop the current recording when closing OBS.
  • 3/4 times the windows closes but obs-studio process must be killed afterwards in task manager, which also takes down the hanging obs-ffmpeg process. (Or something like that. I'll write down the exact names the next time this happens.)
  • The resulting video is always metadata only and lists as 1k size.
  • Sometimes the "Stopping..." message just stays a little longer than usual, for 2-3 seconds, and OBS seems to work properly. But the resulting video is still only 1k in size and unusable.
  • About 1-2 of 5 recording attempts are wrecked by this issue.

In one session with 15 recordings and no hangs, 4 of the recordings where 1k size. Just to let you know: Because I do Let's Play videos, this meant I had to refilm almost everything. The level of frustration when this happens is through the roof. Especially when doing nothing different than in the last 20 months. But again: I am very sure that it has something to do with the nvidia drivers, because of OBS 23.0.3 showing these issues, too, now, but never before about 6 weeks ago.

I am going to record some scenes now. If the issue shows up, I'll try to get some more information about what hangs from task manager.

Yamakuzure avatar Dec 23 '22 07:12 Yamakuzure

I have the same issue, but am quite confidetial that it is a problem with the latest nvidia drives, because I rolled back to OBS Studio 28.0.3 that I used without any issues for so long and the problem is present in there, too. (Windows 10)

The following I can add:

  • The amount of time recorded is irrelevant. I had the "Stopping..." bug after any time length between a few seconds and several minutes.
  • Closing OBS Studio prompts that this would stop the current recording when closing OBS.
  • 3/4 times the windows closes but obs-studio process must be killed afterwards in task manager, which also takes down the hanging obs-ffmpeg process. (Or something like that. I'll write down the exact names the next time this happens.)
  • The resulting video is always metadata only and lists as 1k size.
  • Sometimes the "Stopping..." message just stays a little longer than usual, for 2-3 seconds, and OBS seems to work properly. But the resulting video is still only 1k in size and unusable.
  • About 1-2 of 5 recording attempts are wrecked by this issue.

In one session with 15 recordings and no hangs, 4 of the recordings where 1k size. Just to let you know: Because I do Let's Play videos, this meant I had to refilm almost everything. The level of frustration when this happens is through the roof. Especially when doing nothing different than in the last 20 months. But again: I am very sure that it has something to do with the nvidia drivers, because of OBS 23.0.3 showing these issues, too, now, but never before about 6 weeks ago.

I am going to record some scenes now. If the issue shows up, I'll try to get some more information about what hangs from task manager.

The problem has only happened once so far. And my nvidia driver is not the latest. The version number is 522.30 (10/18/2022)

QYream avatar Dec 24 '22 02:12 QYream

Driver here is 527.27 (11/28/2022) However, I used the "Use optimal settings" feature of Nvidia RTX Experience on OBS Studio, and haven't seen the issue again in a few attempts. I will film more scenes tomorrow after updating back to the lates OBS Studio and will report back whether I could trigger tghe issue again or not.

Yamakuzure avatar Dec 28 '22 09:12 Yamakuzure

It happened again with the first try to record something in OBS Studio 28.1.2.

The Button stays on showing "Stopping Recording.." with blue background. Task Manager shows: OBS Studio (2) +> OBS Studio (8,3% CPU, 677MB RAM, 87,4% GPU (GPU 1 - Video Encode)) +> obs-ffmpeg-mux.exe (0% CPU, 1,1MB RAM, 0% GPU)

When exiting OBS Studio the tasks would remain until obs-ffmpeg-mux.exe is killed. No video file was generated this time. Nothing.

One curiosity: Before I stopped the recording (Recording time was ~5 minutes), the Stats window showed: "Disk full in (approx.) -1157567" Disk Space available is over 200 GB, so I found this odd...

Yamakuzure avatar Dec 29 '22 08:12 Yamakuzure

Okay, the actual message is:

"Disk full in (approx.) -496523 Hours, -14 Minutes

I have rolled back to Nvidia Drivers 515 U6 (517.88) and the third recording I did just went into the "Stopping Freeze" again. Had to kill OBS Studio (28.1.2) after closing it. The process just stayed.

At least the first two videos seem to be okay. The third did not even show up.

Edit 1: Also freezes on the first recording with OBS Studio 28.0.3

Edit 2: Downgraded Nvidia Drivers to 510 U10 (514.08) and upgraded OBS Studio to 29.0.0 Beta 3. ... For now it looks stable and reliable. Will film some more scenes later to test.

Yamakuzure avatar Dec 30 '22 07:12 Yamakuzure

Nope, no luck. First recording this morning, Stopping Freeze + need to kill OBS plus ffmpeg in TaskManager happened.

Which fricking ancient nvidia drivers do I have to downgrade to? This is nuts! Everything worked for months without any issue. And all of a sudden ... BOOM!

Does anybody know which drivers are reliable?

Yamakuzure avatar Dec 31 '22 08:12 Yamakuzure

I then closed Firefox, gave filming another try, and from the 12 scenes I wanted to film 10 went just fine. I almost wrote that running firefox in the background seems to be a problem, but nope, Scene 11 froze again.

My current take is, that something generally introduced into the nvidia drivers causes this. So my nect test will be after downgrading to: Version: R515 U4 (517.40)  WHQL Release Date: 2022.9.20

The other drivers I tried were all released in December, so the issue causing OBS ffmpeg to freeze might be something more general that has been added to all three version familioes (510, 515 and 525)

And I am pretty much sure that I had 517.40 installed at some point and that I had no issue with obs ffmpeg freezing.

Yamakuzure avatar Dec 31 '22 12:12 Yamakuzure

And I am pretty much sure that I had 517.40 installed at some point and that I had no issue with obs ffmpeg freezing.

But it does not help. first recording, next freeze.

Yamakuzure avatar Dec 31 '22 14:12 Yamakuzure

I have booted into safe mode and used DDU to fully remove Intel UHD and nvidia drivers. After another reboot into safe mode I used tweaks.com windows repair and let the full repair package run.

Then, back into normal mode, I installed nvidia drivers R515 U4 (517.40) and OBS Studio 28.0.3

This time the installation seems to be stable. No freeze so far.

Yamakuzure avatar Dec 31 '22 17:12 Yamakuzure

I have updated to OBS Studio 21.1.2 and the third recording had the freeze issue again. Another clip down the drain. great.

All incidents have in common, that the stats windo shows:

"Disk full in (approx.) -496523 Hours, -14 Minutes"

The numbers vary, of course, but if positive numbers are shown here, everything is fine.

Yamakuzure avatar Jan 01 '23 10:01 Yamakuzure

The cause of the negative numbers has been addressed in #7999 but that's only a symptom of no output being sent. It seems the encoder is hanging after unpause for some reason, but I'm not able to reproduce this.

notr1ch avatar Jan 01 '23 22:01 notr1ch

The cause of the negative numbers has been addressed in #7999 but that's only a symptom of no output being sent. It seems the encoder is hanging after unpause for some reason, but I'm not able to reproduce this.

Or after start.

At least I can now tell when the encoder crashes, as the negative numbers start right after the initial 30 seconds grace period where it says "calculating"

Currently I have these hangs with OBS Studio 20.0.3, too, and the old R515 drivers. It is really mystical to me, as this whole setup has worked flawlessly for months and months and months.

And I am recording to a high-speed NVMe, so there isn't a "spin-up delay" or anything like that.

Btw: #7999 does NOT address the cause of the negative numbers, it simply stops them from being shown. So it hides the symptoms and does nothing about the issue.

Which is, in my opinion a very bad idea, because it also stops me (and others) from seing their recording is FUBAR 30 seconds into it, instead of much much later when we try to stop the recording.

Edit: I think I will go full ancient and downgrade to a pre-500 nvidia driver. Just to be able to either confirm my suspicion that the driver version is relevant (then everything will be fine) or to prove me wrong (issue persists).

Yamakuzure avatar Jan 02 '23 08:01 Yamakuzure

You can tell if the encoder has frozen by looking at the recording output kbps, if it's zero when not paused then the encoder isn't producing frames. A dump file might be useful to further diagnose the frozen encoder:

https://obsproject.com/forum/resources/how-to-create-a-dmp-file-for-debugging.598/

notr1ch avatar Jan 02 '23 18:01 notr1ch

You can tell if the encoder has frozen by looking at the recording output kbps, if it's zero when not paused then the encoder isn't producing frames. A dump file might be useful to further diagnose the frozen encoder:

https://obsproject.com/forum/resources/how-to-create-a-dmp-file-for-debugging.598/

And that's the problem. It does show anything normal but Zero. The negative remaining recording time is the only hint that something is wrong. (At least AFAIR, I will check that.)

I'll see to it that I produce such dump files.

Yamakuzure avatar Jan 03 '23 08:01 Yamakuzure

Thank you for your continued attention. For some reason, access to GitHub from China is not stable. I haven't had problems with OBS since then, but I do sometimes have problems with Windows 11, either 21H2 or 22H2. I suspect Windows11 has some bugs. By the way, Happy New Year (a little late) 感谢你们的持续关注。由于某些原因,中国访问GitHub是不稳定的。 自那以后我的OBS没有出现过问题,但我的Windows11有时会出现问题,无论是21H2还是22H2。我怀疑是Windows出bug了。 顺带一提,新年快乐(有点晚)

QYream avatar Jan 04 '23 03:01 QYream

Sorry, you are right, I high-jacked your issue with something that seems to be very different.

@QYream : You may close this issue now, I have wrapped up my part and continue in #8009

Yamakuzure avatar Jan 05 '23 10:01 Yamakuzure

Closing this per above comments. This Issue and @Yamakuzure 's issue are completely separate.

RytoEX avatar Feb 10 '23 15:02 RytoEX