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

AMF Encoder HDR metadata missing / no longer detected by youtube after 29.1.0 #9195

Closed
lza78 opened this issue Jul 2, 2023 · 18 comments
Closed

Comments

@lza78
Copy link

lza78 commented Jul 2, 2023

Operating System Info

Windows 11

Other OS

OBS Studio Version

29.1.3

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/Oe5GVY3AUbx0wBCp

OBS Studio Crash Log URL

No response

Expected Behavior

After uploading a obs studio recording in youtube,and after youtube done processing it,youtube allows users to watch the video in HDR.
I upload a video by :
i) https://studio.youtube.com/
ii)Upload videos
iii)Select the obs studio recording and adding description
iv)wait for it to be processed by youtube(which takes several days at most)

Current Behavior

When I finish uploading a video to youtube as usual,youtube does not says that the video is HDR even after it done processing.

Steps to Reproduce

1.Use obs studio 29.1.0 and onwards to make a screen recording
2.Upload it to youtube as usual
3.Youtube does not detect/process HDR

Anything else we should know?

https://obsproject.com/logs/07wiUuIEPUA2GCx8
This is the log file where I use OBS STUDIO 29.0.2 to upload videos to youtube normally.After processing,youtube automatically shows the video in HDR.
Since OBS studio 29.1.0 and above,HDR videos is no longer detected automatically by youtube after uploading it.
Every settings is the same in both version that I mentioned.The versions are the only difference unless the newer version(29.1.0 and onwards modified some default settings)

@derrod
Copy link
Member

derrod commented Jul 2, 2023

HDR processing takes longer than the SDR versions, and YouTube does not show any inidcation that it's still processing. You'll just have to wait.

@derrod derrod closed this as not planned Won't fix, can't repro, duplicate, stale Jul 2, 2023
@lza78
Copy link
Author

lza78 commented Jul 3, 2023

Hi,I am absolutely sure that it is fully processing already. Those videos I recorded using obs studio 29.0.1 and onwards is already uploaded to youtube for 2 months.After I switched back to obs studio 29.0.2,every video I upload only takes at most 3 days for HDR to be available.I even tried uploading a 2 seconds video to youtube (using obs studio 29.1.3),and after that upload a 2 hours worth of video (using obs studio 29.0.2) and yet after that 2 hours video shows HDR,the 2 seconds video does not have HDR still.

@derrod
Copy link
Member

derrod commented Jul 3, 2023

I uploaded a few test clips recorded with 29.1.3 and 29.0.2 to YouTube and all were processed with HDR renditions available after a few hours.

@lza78
Copy link
Author

lza78 commented Jul 3, 2023

Should I contact youtube support instead?
Or can you offer me some ways to troubleshoot what's wrong when I upgraded from 29.0.2 to 29.1.3?
Thanks :)

@flaeri
Copy link
Contributor

flaeri commented Jul 3, 2023

I uploaded a few test clips recorded with 29.1.3 and 29.0.2 to YouTube and all were processed with HDR renditions available after a few hours.

Did you test with AMF? I did 4, mp4+mkv, p010 and i 010. It's been 2 days, and none of the 4 has gotten HDR. The 5th file I uploaded at the same time (known good) got it within the hour.

I couldn't see anything wrong on the surface, all files seem to have the required data, but may need to dig deeper.

@derrod
Copy link
Member

derrod commented Jul 3, 2023

I've only tested NVENC on my end, perhaps if you could provide us with a sample (github should allow uploads of smaller files, so just do a short test recording) we can investigate further.

@lza78
Copy link
Author

lza78 commented Jul 3, 2023

Github does not support .mkv files.So I upload the video to weshare instead.Btw i should have mentioned that both I010 and P010 does not make any differences as both of them can't be processed as HDR after being uploaded to youtube using obs studio 29.0.1 and onwards.
https://we.tl/t-1QEODYnwMr
just in case you want a log file here it is : https://obsproject.com/logs/zDwUDTuGKbnBywjQ

@derrod
Copy link
Member

derrod commented Jul 4, 2023

Not entirely sure what's happening here, but it appears that your files are not tagged correctly, MediaInfo shows BT2020 etc. but ffprobe does not (remuxed):
Stream #0:0[0x1](und): Video: hevc (Main 10) (hev1 / 0x31766568), yuv420p10le(tv), 2880x1800, 4166 kb/s, 60 fps, 60 tbr, 16k tbn (default)
It seems the container might have the necessary metadata, but the video stream itself does not.

By manually changing the metadata in the HEVC stream using the hevc_metadata bitstream filter this can be fixed like so:
ffmpeg -i <input> -c copy -bsf:v hevc_metadata=colour_primaries=9:transfer_characteristics=16:matrix_coefficients=9 <output>

The file will then correctly show up in ffprobe and on YouTube:
Stream #0:0[0x1](und): Video: hevc (Main 10) (hev1 / 0x31766568), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 2880x1800, 4166 kb/s, 60 fps, 60 tbr, 16k tbn (default)

Going to reopen this with some edits to make clear that this is an issue with AMF.

@derrod derrod reopened this Jul 4, 2023
@derrod derrod changed the title HDR no longer detected by youtube after 29.1.0 AMF Encoder HDR metadata missing / no longer detected by youtube after 29.1.0 Jul 4, 2023
@lza78
Copy link
Author

lza78 commented Jul 4, 2023

do I need to change the metadata every time before I upload to youtube or a fix will be included in the next obs studio version?

@derrod
Copy link
Member

derrod commented Jul 5, 2023

We don't know what the issue is yet, so we can't promise a fix to be in the next version.

@flaeri
Copy link
Contributor

flaeri commented Jul 8, 2023

Bisected it to this deps update:
b262eea - CI: Update deps to 2023-03-20 release

Highly suspect its from the ffmpeg 6.0 version bump. Will try to have a look, but can't make any promises. Not that familiar with that part of the code.

@flaeri
Copy link
Contributor

flaeri commented Aug 3, 2023

I can confirm that using the 2023-03-20 deps, but reverting the ffmpeg bump 681fa3dbb will solve the issue.

@flaeri
Copy link
Contributor

flaeri commented Aug 3, 2023

With some help from @pkviet (lifesaver), I believe I've found the offending commit in ffmpeg here: FFmpeg/FFmpeg@8b5d155

Reverting requires reverting fc410ce (changes log type for 8b5d155) and c421000 (changes indentation for 8b5d155), neither of which has any functional change to 8b5d155.

@Yw0ke
Copy link

Yw0ke commented Aug 26, 2023

Hey guys, Is there a simple way to fix this while waiting for an update ?
I've seen the command line above that will fix a file but i cant be bothered to do that for every record i do.
Thanks for reporting this and the work behind finding what cause the issue.

@lza78
Copy link
Author

lza78 commented Nov 14, 2023

This issue seems not to be solved in OBS studio 30.0 yet

@derrod
Copy link
Member

derrod commented Nov 14, 2023

This has been determined to not be an OBS issue but a problem on AMD's side, if it's not fixed in the latest driver yet then you'll have to wait a bit longer.

But a good time to close this as we don't have to make any changes on our end.

@derrod derrod closed this as not planned Won't fix, can't repro, duplicate, stale Nov 14, 2023
@RytoEX
Copy link
Member

RytoEX commented Nov 16, 2023

This issue seems not to be solved in OBS studio 30.0 yet

There was a fix for missing VUI information for HDR in the AMD 23.11.1 drivers. With those, OBS will correctly produce HDR video files when using the AMD HW encoders.

@lza78
Copy link
Author

lza78 commented Nov 17, 2023

Well I purposely used PRO drivers because using adrenaline version(I forgot to take note since which),OBS studio will keep saying "Encoding overloaded" and the recording produced is laggy.Now I can only hope that the PRO driver won't have the same issue after updating.

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

No branches or pull requests

5 participants