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

Support for alternative transfer characteristics SEI #272

Closed
badyu17 opened this issue Oct 16, 2020 · 6 comments
Closed

Support for alternative transfer characteristics SEI #272

badyu17 opened this issue Oct 16, 2020 · 6 comments

Comments

@badyu17
Copy link

badyu17 commented Oct 16, 2020

Hi,

I was using NVEncC to re-encode few 4K HLG files which worked perfectly and I was happy with the result but I noticed that I can only define VUI part for transfer characteristics and not add additional SEI message which I found is required for HLG.

This can be observed by additional MediaInfo output which shows:

Transfer characteristics: HLG / HLG (source file)
Transfer characteristics: HLG (encoded file)

Adding this Alternative transfer characteristics SEI is possible in x265 with '--atc-sei' option. Can this be implemented in NVEncC as an additional option?

Thank you for your great work.

@rigaya
Copy link
Owner

rigaya commented Nov 1, 2020

I've added option which will add the additional SEI for HLG in NVEnc 5.19 as --atc-sei, please have a try.

@badyu17
Copy link
Author

badyu17 commented Nov 1, 2020

Thanks Rigaya

I just tested new option. It should be working but there is one thing. MediaInfo is now reporting two rows of information instead of one for "transfer" when I use --atc-sei arib-std-b67

Transfer characteristics : HLG
transfer_characteristics_Original : HLG / HLG

I don't know if it's of any help but here is the log of ffmpeg's trace_headers option

Original

orig

NVenc

nvenc

@rigaya
Copy link
Owner

rigaya commented Nov 1, 2020

I don’t seem to have trouble myself, there is only single "Transfer characteristics" line in MediaInfo. Also I don't think the header of the NVenc output is invalid. Would you share the full command line you have used to check?

x64\NVEncC64.exe -i "4K_HLG_Sample.MP4" -o F:\temp\test.mp4 -c hevc --output-depth 10 --transfer arib-std-b67 --colormatrix bt2020nc --colorprim bt2020 --atc-sei arib-std-b67
image

@badyu17
Copy link
Author

badyu17 commented Nov 1, 2020

That's weird, maybe it's a bug in NVencC matroska muxer but this only happens when NVencC's output is mkv. MediaInfo output is same as yours when I remux NVEnc mkv to mp4 or when the output is raw h265.

Anyway this can be considered as solved :)
Thanks again for your work on this great software.

@rigaya
Copy link
Owner

rigaya commented Nov 1, 2020

Thanks, I also got two "Transfer characteristics" line when I wrote in mkv format.

Checking the mkv video header with mkvtoolnix, it seems like the first line is coming from mkv header as it only has the VUI part for transfer characteristics.

Transfer characteristics : HLG < from mkv header
transfer_characteristics_Original : HLG / HLG < from HEVC stream

I'll try if I can avoid this.

rigaya added a commit that referenced this issue Nov 11, 2020
コンテナ側にはatcの情報をもたせられないので、かちあってしまう。
@rigaya
Copy link
Owner

rigaya commented Nov 15, 2020

I've changed mux behavior in NVEnc 5.20, to avoid two lines showing up for Transfer characteristics in MediaInfo when writing to mkv format.

@rigaya rigaya closed this as completed Dec 30, 2020
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

2 participants