Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VCE2.0 Firmware bug causes Crash or Artifacting #143

Closed
razorlikes opened this issue Nov 11, 2016 · 41 comments
Closed

VCE2.0 Firmware bug causes Crash or Artifacting #143

razorlikes opened this issue Nov 11, 2016 · 41 comments

Comments

@razorlikes
Copy link

Hey Xaymar, here is a bug I found while playing with different settings. OBS crashes when VBV Buffer Fullness is set to 80. An interesting thing I noticed was, that two out of three times I tried this, OBS crashed after exactly 89,6 MB of video were recorded.

Here are my settings.

Crash 2016-11-11 22-32-15.txt
2016-11-11 22-28-34.txt

Hardware:
AMD FX8350
AMD Radeon R9 390 Nitro
ASUS Crosshair IV Formula
Corsair XMS3 DDR3 12GB
SSD for OS, HDDs for recording and games.

OBS version 0.16.5
Plugin version 1.4.1.5

@Xaymar
Copy link
Contributor

Xaymar commented Nov 11, 2016

Plugin version 1.4.1.5

Don't lie, the log file will betray you:

22:28:35.409: [AMF Encoder] Version 1.4.1.2-1.3.0.5

Update to 1.4.1.5, reproduce it and upload a new log file, crash log and the raw video file it produces.
If you can, create a memory dump as OBS shows the program crashed window. If you don't know how to do that, open Task Manager to the Details tab, right click on obs64.exe/obs32.exe and click "Create dump file". Having that can help with tracking down what crashed and why.

Please do not upload the video to youtube or twitch, that will not help anyone.

@razorlikes
Copy link
Author

razorlikes commented Nov 11, 2016

I could swear I updated to 1.4.1.5... Maybe OBS overwrote the plugin when I updated it today.

So I updated to 1.4.1.5 now, did a 20 minute recording and wasn't able to reproduce the error for now. I will try more tomorrow but I think its fixed in the update!

@razorlikes
Copy link
Author

Okay, I just did some more tests and its most definitely fixed!
Also a VBV Fullness of 0 looks so much better than the 90 or 80 I had before...

@Xaymar
Copy link
Contributor

Xaymar commented Nov 11, 2016

You should fix your VBV Buffer Strictness and set it lower than 80%. I have mine at 66% so it's still strict but allows for a little bitrate variation.

@razorlikes
Copy link
Author

I'm again getting crashes. Uploading the video right now and will update and reopen this issue when everything is uploaded.
Do you need a full dump of OBS or is a minidump okay? I have made both but the full dump has a size of 1 GB.

@Xaymar
Copy link
Contributor

Xaymar commented Nov 12, 2016

Full dump, minidump does not contain enough information. You can compress the full dump with 7z or winrar and it'll lose about ~20-40% in size

@razorlikes
Copy link
Author

@razorlikes razorlikes reopened this Nov 12, 2016
@Xaymar Xaymar changed the title OBS crashes with VBV Fullness set to 80 OBS crashes with VBV Strictness set to 80 Nov 12, 2016
@Xaymar
Copy link
Contributor

Xaymar commented Nov 12, 2016

Crash happened inside AMD Driver, will report this to the AMD Team working on the Encoder.

Edit: Please do not delete the files of your Google Drive until it is fixed. Thank you!

@razorlikes
Copy link
Author

Another thing to note may be that I left an OC on my VRAM. Its on 1675 right now, which worked fine with Plays.TV and your plugin before. When I also OCed my Core I would get artifacts in Plays' recordings. I also have my Power Limit set to +50% but that never changed anything.

@Xaymar
Copy link
Contributor

Xaymar commented Nov 18, 2016

Try 16.11.4 and report back.

@Xaymar Xaymar added status:delayed and removed status:work in progress Work is currently being done on this. labels Nov 18, 2016
@razorlikes
Copy link
Author

Updated the plugin and my drivers and recorded for ~40 minutes without any errors.
Although I'm getting little artifacts now and then when playing the video in VLC, those were present in other videos recorded with your plugin too but never seemed to show up during streams. Also WMP won't play the video at all. I'm using the MKV container.
Is this just some kind of error within VLC or is it something else?

Another thing would be B-Picture Delta QP values. I'm using 0 for both Reference and normal B-Picture Delta QP right now. Are those setting acceptable or is there some recommended value for those?

@Xaymar
Copy link
Contributor

Xaymar commented Nov 18, 2016

Only MPC-HC, ffmpeg and VLC seem to be able to play back the files. I don't know why other players have such a hard time.

As for delta QP, 0/0 is acceptable, the default for them is +4/+2. You can also use -2/-4 if you want to get better quality in B-Frames. I'd recommend not using B-Frames for now though, there are some quality issues with them that only go away at higher bitrates.

@razorlikes
Copy link
Author

Okay, I'll probably turn them off for now then.
But just so you get an idea what artifacts I'm talking about, I found an example where they are pretty prominent: http://i.imgur.com/zlqn1VM.jpg
It just looks like small parts of the image get placed at the wrong position.
I also noticed that those artifacts mostly happen in the beginning of the recording and my bitrate fluctuates extremely in the beginning of the recording: http://i.imgur.com/3K6Yv2I.jpg

@Xaymar
Copy link
Contributor

Xaymar commented Nov 18, 2016

That looks like decoding failed for those macroblocks, I've never seen that happen. I have seen the bitrate fluctuation, but that usually fixes itself after 15-17 seconds.

@razorlikes
Copy link
Author

I'm doing a little more testing right now and it seems like it mostly happens when I have no or just very little movement on my screen.

@razorlikes
Copy link
Author

While testing I just got another crash.

Crash 2016-11-18 21-05-44.txt
2016-11-18 21-03-32.txt

Video: http://5.230.156.11/nextcloud/index.php/s/yZwUeK31yFHScMN

Unfortunately I forgot to take a dump.
In the video you can see that it starts lagging really hard when I just look at the wall at ~1:00, things like this usually happen in most of my test recordings when loading screens come up. The "tearing" at the end of the video is also often happening when there is no movement.

@razorlikes
Copy link
Author

Here is another video where it is very noticeable at around 2:05. This screen-tear + lag thing happens almost every time the movement stops, for example in elevators/loading screens.

http://5.230.156.11/nextcloud/index.php/s/Iub9IB2wGQA4gm5
And this should be the corresponding log: 2016-11-18 20-46-31.txt

And to make it all complete, here are the settings I used when recording both videos: http://i.imgur.com/L73P4r9.jpg

@Xaymar
Copy link
Contributor

Xaymar commented Nov 18, 2016

image

That's the section where you stare at the wall, it looks like for whatever reason it stopped encoding. The log file at that point also matches the output, with the average size being less than 500 bytes per packet. This isn't exactly something that should happen.

Could you set the VBV Buffer Strictness to 0 and Enforce HRD Restrictions set to Enabled?

@razorlikes
Copy link
Author

Did that, uploading the video right now but it happened again...

@razorlikes
Copy link
Author

Here you go.
Log: 2016-11-18 21-30-50.txt
Video: http://5.230.156.11/nextcloud/index.php/s/c7eAMUuGmHlm6Vv

At 1:00 I again looked at a wall and at 3:05 there is a loading screen.

@razorlikes
Copy link
Author

Any news on this issue or any idea what may be causing this?

@Xaymar
Copy link
Contributor

Xaymar commented Nov 20, 2016

If you mean the crash, it still happens with 16.11.4. If you mean the encoding failure, I have yet to be able to reproduce it.

@razorlikes
Copy link
Author

Got another crash today, this time I took a dump of the process although I think this is the same crash as usual.
Also I gave OBS a complete reinstall and deleted my streamEncoder.json to ensure I get fresh settings I then tested with Min QP set to 1 and VBV Strictness set to 0 this time but to no avail.

Anyways here are the links to all files.
Video: http://5.230.156.11/nextcloud/index.php/s/oaLazdRGHTKIy2o
Dump: http://5.230.156.11/nextcloud/index.php/s/lUKkzO7d4eDhDvG
Log: 2016-11-21 20-34-02.txt
Crashlog: Crash 2016-11-21 20-45-17.txt
Settings: http://i.imgur.com/nNqQoPR.jpg

@Xaymar
Copy link
Contributor

Xaymar commented Nov 27, 2016

Merged #144, #145 and #151 to this issue, as they all are caused by the same bug and will be fixed by the same driver update in the future.

@Xaymar
Copy link
Contributor

Xaymar commented Nov 29, 2016

16.11.5 does not contain a VCE firmware update, but it does contain changed DLLs. I however don't expect it to fix this driver bug yet.

@CKannas
Copy link

CKannas commented Nov 29, 2016

The new driver update makes OBS use less CPU when encoding with the AMD VCE, but it still crashes in that dll. Also CBR seems to not work as expected, which I guess is linked to the expected fix.

@Xaymar
Copy link
Contributor

Xaymar commented Dec 6, 2016

With 16.12.1 on the horizon (scheduled release 8th December), I hope that this outstanding bug will be fixed. Tagging all the people affected: @R4BC, @sneaky4oe, @k0zyrev; once the driver is out, please try using the encoder again.

@Xaymar Xaymar changed the title OBS crashes with VBV Strictness set to 80 VCE2.0 Firmware bug causes Crash or Artifacting Dec 6, 2016
@BobbyFuzzy
Copy link

BobbyFuzzy commented Dec 7, 2016 via email

@k0zyrev
Copy link

k0zyrev commented Dec 8, 2016

please try using the encoder again

With the new drivers I can't record/stream at all no matter the settings

log: https://gist.github.com/anonymous/1353f0515c559795d1cb6eb30c849cc4

@Xaymar
Copy link
Contributor

Xaymar commented Dec 8, 2016

23:14:06.368: [AMF Encoder] <Plugin::AMD::VCEEncoder::SetFullColorRangeEnabled> Setting to Disabled failed with error AMF_INVALID_ARG (code 4).
23:14:06.368: [AMF Encoder] <Plugin::AMD::VCEEncoder::SetFullColorRangeEnabled> Setting to Disabled failed with error AMF_INVALID_ARG (code 4).
23:14:06.457: [AMF Encoder] [23:14:06.368][AMFEncoderVCE]  Warning: AVEQueryEncodeCapabilitiesEx bad status : 0x 80000002

Looks like a driver bug, possibly the one @MikhailAMD mentioned.

@razorlikes
Copy link
Author

Same issue on my end!

2016-12-08 20-53-31.txt

@MikhailAMD
Copy link
Contributor

SetFullColorRangeEnabled is undocumented property. The driver has changes in preparation for AMF update. Please don't use it till API published.

@Xaymar
Copy link
Contributor

Xaymar commented Dec 8, 2016

Wasn't my intention to even have it crash the encoding thread, I merely forgot to wrap that part in a try-catch block. Fixed by commit 1e37497.

@Xaymar
Copy link
Contributor

Xaymar commented Dec 8, 2016

1.4.3.3 fixes #175, so those affected by the old bug (@razorlikes, @k0zyrev, @R4BC, @sneaky4oe) should now be able to test if the crash/corruption still happens or if it was indeed fixed.

@k0zyrev
Copy link

k0zyrev commented Dec 8, 2016

I can say for sure that I am still getting frame corruption when frame skipping is enabled. Everything else needs further testing.

@Xaymar
Copy link
Contributor

Xaymar commented Dec 8, 2016

I am aware of one type of corruption with Frame Skipping: GPUOpen-LibrariesAndSDKs/AMF#44
If you mean that, then this isn't the same issue as before but another one.

@k0zyrev
Copy link

k0zyrev commented Dec 8, 2016

This one #151
I think it was labeled as another manifestation of the bug that caused crashes
https://youtu.be/INvfPE3bXQY?t=145

@Xaymar
Copy link
Contributor

Xaymar commented Dec 9, 2016

That one is tracked here: GPUOpen-LibrariesAndSDKs/AMF#46

@razorlikes
Copy link
Author

Tested for a bit today and haven't had a crash. But it seems like the old VCE 2 B-Frame bug is back...

@razorlikes
Copy link
Author

I have multiple hours of test recordings now, without any crashes or anything, so I think its safe to assume this issue is fixed.

@Xaymar
Copy link
Contributor

Xaymar commented Dec 12, 2016

Alright, if it comes back report it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants