Closed Xaymar closed 7 years ago
It seems that AMF decides to go for a lower overall bitrate in darker areas, instead of increasing the bitrate for those - which leads to drastic quality loss for those areas or games.
Edit: A perfectly black frame will result in a bitrate near 50kbit/s for 1280x720. Ouch.
I tested out a few changed but none really changed things - it would always either go below target bitrate or above: https://r-1.ch/analyzer/results/xaymar.e34745
This also applies to Variable Bitrate with a Peak restriction. It will never meet the target bitrate if the frame is too dark or there is little going on.
Variable Bitrate with a Peak restriction works as expected. It will not guarantee to reach target because there is no filler data. We confirm that CBR with filler data doesn't work correctly on VCE3. Earlier versions are OK. The fix will be in the driver package and will follow shortly.
We confirm that CBR with filler data doesn't work correctly on VCE3.
Does that mean that a R9 290, R7 370 and a RX 480 are all VCE3? Users on these cards have reported the issue to me, which I was able to reproduce on my R9 285 too without any issues.
It's good to see that it can and will be fixed.
check the list here: https://en.wikipedia.org/wiki/Video_Coding_Engine
Pinging this issue again as it was not fixed in 16.9.2. When can we expect to see a working version?
Hi - found out that the ONLY non-changeable variable is minQP 1 -> all others can be changed and still uses CBR (even when its not that correct in terms of set bitrate - but has not that "up n down bitrate" behaviour)
CBR works like a charm in 16.9.2, no issues anymore.
Not so fast. We did find a problem with filler data. The meaningful bits are OK. Please test the upcoming next public driver (hotfix). Thanks, Mikhail
I will once it's out. What should I look out for? Is it a card specific error with Filler Data?
You should see very steady bitrate with CBR on RX480. On black areas or in general on low information areas encoder adds filler data with zeros to the encoded frame. They don’t have meaningful bits but are important for certain streaming types and certain decoders.
Mikhail
CBR + filler data isn't stable at this moment on my rx480. I'll try the next driver update.
It seems to have been fixed by 16.10.1 now. Waiting for more reports that it was fixed before closing it again.
Yes, the fix is in. Take your time to verify.
Mikhail On Wed, Oct 05, 2016 at 3:55pm, Michael Fabian Dirks notifications@github.com<mailto:notifications@github.com> wrote:
It seems to have been fixed by 16.10.1 now. Waiting for more reports that it was fixed before closing it again.
You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/GPUOpen-LibrariesAndSDKs/AMF/issues/18#issuecomment-251823196, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AOcWv8tP17c9Z4RXhdlyatw9Ro4IZi2Aks5qxCrngaJpZM4J6Fco.
Hi, I've noticed some variances in the bitrate going from 8600 to 12000 Kbps when the Bitrate setting is 10000 Kbps CBR + Filler data (RX480). This happen sometimes at the start of the streaming and a few times latter. I don't know if this is a issue but I want to keep you informed. In practice I can stream now with a stable bitrate.
@M4RK22 use my settings provided at https://github.com/Xaymar/OBS-AMD-Advanced-Media-Framework/issues/90 and change to disired bitrate + calculate strict VBV Buffer (bitrate/FPS*10-1 = Buffer)
@MikhailAMD "minQP 1" is still forced when using CBR -> without it the problem still persists in 16.10.1
here u see it still persists in 16.10.1 (but is much better then before)
There are still reports of RX 4xx having trouble with CBR and Filler Data. Bitrate seems to ignore Filler Data or Target Bitrate at times.
if you want strict flow of the data please set VBV buffer size to bitrate/FPS. Please verify that users got the latest driver (16.10.1). The glitches maybe related to the performance issue in CBR we are still investigating. Please note that VBR doesn't have performance issues.
@MikhailAMD but setting VBV to Bitrate/FPS is "to strict" - better is Bitrate/FPSx10-1 // but i will test it and say if its working
Only rare cases where fillerdata gets added to the second after the one where it should have been in remain, but those are probably due to encoding stress. I'll close this as resolved on my end.
when there is no movement and a mostly black screen the FillerData doesnt work properly -> i can upload footage of this
http://benmanshafen.de/pics/OBS/Xaymar/3400kbps_FillerData-Bug_persists.mp4 (160mb)
here u have video and you see the problem in picture
Update to the latest 16.10.1, check "Debug Tracing" in the plugin and then upload a video and log file.
On Oct 20, 2016 10:20, "Benman2785" notifications@github.com wrote:
[image: 3400kbps_fillerdata-bugpersists] https://cloud.githubusercontent.com/assets/21282980/19552101/ad569962-96ae-11e6-8482-2042b7c726bb.jpg http://benmanshafen.de/pics/OBS/Xaymar/3400kbps FillerData-Bug_persists.mp4
here u have video and you see the problem in picture
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/GPUOpen-LibrariesAndSDKs/AMF/issues/18#issuecomment-255040189, or mute the thread https://github.com/notifications/unsubscribe-auth/AAask9W4JbiylHYYWVE3fz8qvev0uIUYks5q1yQ5gaJpZM4J6Fco .
will be uploaded in 30min
still persists - and worse -> it PEAKS hard now "to maintain bitrate over time" - instead of dropping "bitrate" to hit 3500kbps
3500kbps_FillerData-Bug_persist_log.txt
http://benmanshafen.de/pics/OBS/Xaymar/3500kbps_FillerData-Bug_persists.mp4 (160mb)
Total still looks okay, it just moved all the data from what should have been there to when it could push them out. Make sure that your system is not overloaded during encoding, as it is the case here.
what you men with overloaded? i just have 8gb RAM -> will upgrade soon
with CBR it shouldnt peak that much - because this will result in dropped frames at twitch or even youtube (when its that high)
when u check video + timestamps u see that there is a nearly black screen with no movement -> so fillerdata is buged and doesnt fill up bitrate-target and then pushes them out on next GOP after more data appears -> its a bug
so it needs to be fixed
No it doesn't because it's not a bug. It's your system being overloaded (too slow, too much workload at that time, etc). It has nothing to do with RAM.
Edit: Try using Compute Type OpenCL with Memory Type DirectX 9 or DirectX 11. It should help with this.
ah - ok -> but that peak doesnt occure in 16.9.2
my cpu loaded new stage of game -> its impossible to avoid that -> so its still a bug btw its just 60% load on CPU when "no fillerdata bug" was just peaked to 100% CPU as GPU send "peaked bitrate" into recording u can watch load of computer in left corner
@Benman2785 are you using the 32-bit version of OBS? Because is listing only 2GB of ram and OBS Version -> OBS 0.16.2 (windows), while just looking some logs from my system is states OBS version -> OBS 0.16.2 (64bit, windows).
Tip: You can add the CoreAudio AAC encoder in you OBS by installing some parts of iTunes google it and you will find how to do it. They say it is better than windows AAC encoder.
On 20 October 2016 at 14:17, Benman2785 notifications@github.com wrote:
ah - ok -> but that peak doesnt occure in 16.9.2
my cpu loaded new stage of game -> its impossible to avoid that -> so its still a bug btw its just 60% load on CPU when "no fillerdata bug" was just peaked to 100% CPU as GPU send "peaked bitrate" into recording u can watch load of computer in left corner
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/GPUOpen-LibrariesAndSDKs/AMF/issues/18#issuecomment-255078203, or mute the thread https://github.com/notifications/unsubscribe-auth/ADj_Sm0GieiBNlAKqEudkcO19P4YJSu6ks5q102tgaJpZM4J6Fco .
I took a look at your video upload:
Overall, nothing is wrong with the file or CBR - it did what it should have done.
@CKannas - i have an different AAC Codec (i think) from dB PowerAMP i use 32Bit version of OBS because my Webcam has only 32bit driver -> in OBS classic 64bit i had problems with 32bit drivers -> so i stick 2 use 32bit OBS
@Xaymar thank you - but i cant believe that a peak of 16000kbps is normal with CBR due to limitations of most bitrate-limited streaming servers and it adds up bitrate after a scene with no movement and nearly black screen -> it SHOULDNT peak after that (and better use FillerData to avoid that peak) (german: bei CBR sollte der Peak nicht sostark ausfallen nach schwarzem bild -> sonst geben streamingserver dropped frames aus -> ergo muss das gefixt werden // entweder baust du ein maxPeakLimiter von 4/3 Bitrate max ein oder AMD fixt das im AMF)
You're recording to a file, muxing is different for files than for streaming. Streaming enforces stricter rules, while recording can mux video, audio and whatever however it wants - as long as it's in order. You shouldn't see this happening while streaming, so you should try streaming first - if it occurs there, then it's a problem.
i will try streaming now - (on my own server - and tell u then)
oh and i use streamencoder for recording
EDIT: tested -> still peaks while streaming & recording -> also FillerData bugs when no movement and nearly black screen -> just had 300kbps show in bitrate counter then
EDIT2: if u want i set my streamserver to record my streams -> will send you the file then (and analyse it also for myself - but its flv)
EDIT3: i know its not "your fault" but its annoying and should be fixed by AMD to maintain a proplery working CBR for streams to twitch or youtube (or other sites with limited bitrate)
still does that while streaming -> so streaming to most platforms not possible -> because you will have drops
http://benmanshafen.de/pics/OBS/Xaymar/stream-1476968574.flv (68mb)
Try 16.10.2 Hotfix, it might help.
I took a look at the log file, here is what you're doing wrong:
1-3 - ok -> will change that 4 - why is that? because peak bitrate is added to "normal" Bitrate nearly all the time -> so it wont work properly when streaming to twitch 5 - minQP 1 is a BUG of new AMD AMF -> has to be fixed -> when 18 or 20 you save bitrate for high-movement scene in h264 // maxQP 51 looks bad -> so i stick using 42 (as this wont produce peaks even on high movement scenes in 720p when min 3000kbps) 6 - GOP 15 is recommended for YT when rec/stream in 30 FPS -> so would be nice if this wont be experimental anymore 7 - we need CABAC to handle CBR right with low Bitrate
will try hotfix now and send links to orginal files ;)
GOP Size and CABAC are not official VCE/AMF options. They are the result of reverse engineering. Do not use them.
same problem with 16.10.2 Hotfix at 2:13 you can see it clearly drops frames -> would suck when i stream this to twitch stream-1477038232.txt http://benmanshafen.de/pics/OBS/Xaymar/stream-1477038232.flv (150mb)
oh i noticed stutter when activate OpenCL -> in OLD VCE build OpenCL (OVE) was replaced with AMD AMF for NV12
EDIT: will test now with "simple" instead of advanced settings
with simple: Bitrate 3500 CustomBuffer 116 FillerData Enabled MemoryType DX11 Compute Type OpenCL no custom GOP CABAC default
still same problem - and it also drops frames now (when high peak occure) while streaming
stream-1477039980.txt http://benmanshafen.de/pics/OBS/Xaymar/stream-1477039980.flv (130mb)
also noticed 1% more CPU load on average and my GPU also has more load -> peaks to 100% and wont hold max Boost everytime (what she did with advanced settings and 16.9.2)
tested with old game - peak has nothing to do with high load on CPU or GPU -> as i said before it occures when there is nearly black screen with no movement -> then FillerData bugs and result in low bitrate and later high peak - and now with 16.10.2 in dropped frames
http://benmanshafen.de/pics/OBS/Xaymar/stream-1477041730.flv (201mb) stream-1477041730.txt (scroll down after settings - had some probs capturing old game properly
The fix for filler data bug is in testing. I am trying to push it into the earliest possible release. Stay tuned.
still persists in 16.10.3
after install and reboot i could do it once without bug -> now it always bugs (ever) since
I will send a note when the fixes are available.
For tracking purposes, I'll keep this open.
I have updated the original report with more information. I'm not sure why, but Filler Data seems to be broken on my R9 285 again with driver 16.10.3, but that might just be a temporary problem.
Edit: A change to before is that now I have an Intel IGP. This could perhaps be the cause for strange issues if this case isn't treated properly.
Edit 2: Tested with 16.9.2, IGP disabled and an older plugin version, same issue. Filler Data is being ignored for some weird reason.
Both CBR and VBR seem to be broken completely in 16.10.3 now. I will need additional people to test, but right now AMF encoding is pretty much useless except for recording - and even there it seems to start showing issues with random permanent encoding freezes until reboot.
16.10.3 seems to be the the Driver that breaks CBR on some cards again. I have implemented all the changes suggested in the VBR issue too but they had little effect here.
Result: 20mb/s instead of the set 3500kb/s, Filler Data and Target Bitrate are being ignored again.
The fix should be in the release hot fix driver: 16.11.1 http://support.amd.com/en-us/kb-articles/Pages/Radeon-Software-Crimson-Edition-16.11.1-Release-Notes.aspx
For an unknown reason, AMF currently fails to properly meet the given Target Bitrate on a number of cards. Mostly affected by this are VCE3.x based cards, like the R9 285, R9 380 and the RX 4xx series.
The bitrate will always be lower than needed or be way above the target, which makes streaming hard if not impossible.
System Information
Reproduction Data
1. Dump Files
2016-11-02 Bitrate Problem returns on R9 285
2016-11-03 (20mb/s instead of given 3500kbit/s)