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

Feature request: master display & max-cll and valer auto pick and transfer #185

Closed
devil40xxx opened this issue Jan 1, 2020 · 10 comments
Closed

Comments

@devil40xxx
Copy link

Use --master-display /--max-cll , options ,we can define the value when encoding HDR videos,

it 's powerful enough to finish the job.

But the fact is ,we open mediainfo or other videotools check the vale,and fill it in nvenc command line options —— and seldom change the value (we just encoding ,not adjusting) ,and have to copy the values one by one by hand (and sometime we have to double check and waste a little time).

So can it be a little easy (lazy ) way in nvenc that we could have an option something like "--transfer HDR-MD-CLL ",it can auto transfer master display string and max-cll value (in case it doesn't need change).

Thanks for the great job in this great software!!

@hydra3333
Copy link

+1 :)

rigaya added a commit that referenced this issue Jan 13, 2020
@rigaya
Copy link
Owner

rigaya commented Jan 13, 2020

NVEnc 4.60 should have feature you have requested, you can specify "--master-display copy --max-cll copy" and the master display string and max-cll value will be transfered from the input file (if exists).

@devil40xxx
Copy link
Author

Thx for the respondence,I tested the 4.60 with "--master-display copy --max-cll copy "and it's fully working!

And after check with Mdiainfo,in video both have master disply luminance and max-cll it adds somthing like "maxcll_original/maxFall_oringinal" values in number(copied),in video only has master disply luminance it adds MaxCLL and Max FAL values in 10 digit numbers.

Is it an original inten design?

@rigaya
Copy link
Owner

rigaya commented Jan 14, 2020

Ah, I see, some weird "MaxCLL/MaxFALL" seems to be added when the output format is mkv, when the video has only master display metadata (I had been testing with mp4).
I'll remove them in next release.

@hydra3333
Copy link

thank you

@devil40xxx
Copy link
Author

devil40xxx commented Jan 15, 2020

I found a HDR video file encoded error with these option.But the file is too big i can't upload it.

Error only occurs in meta-data copy encode mode and everything runs well in “hand-operated” .hevc encode mode.

The error show in line "Assertion in_ts != ((int64_t)0x8000000000000000ULL) failed at libavutil/mathematics.c:171"

This is the detail in video stream hope it helps:

Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L5.1@High
HDR format : SMPTE ST 2086, HDR10 compatible
Codec ID : V_MPEGH/ISO/HEVC
Duration : 1 h 27 min
Bit rate : 25.2 Mb/s
Width : 3 840 pixels
Height : 2 076 pixels
Display aspect ratio : 1.85:1
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0 (Type 2)
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.132
Stream size : 15.4 GiB (69%)
Title : Crank.2006.THEATRICAL.2160p.BluRay.x265.10bit.HDR.DTS-HD.MA.TrueHD.7.1.Atmos-SWTYBLZ
Writing library : x265 3.0_Au+10-74a8672ea4f7:[Windows][GCC 8.2.1][64 bit] 10bit
Encoding settings : cpuid=1111039 / frame-threads=16 / numa-pools=24,24,24,24 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=3840x2076 / interlace=0 / total-frames=0 / level-idc=51 / high-tier=1 / uhd-bd=0 / ref=3 / no-allow-non-conformance / repeat-headers / annexb / aud / hrd / info / hash=0 / no-temporal-layers / no-open-gop / min-keyint=1 / keyint=24 / gop-lookahead=0 / bframes=4 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=25 / lookahead-slices=4 / scenecut=40 / radl=0 / no-splice / no-intra-refresh / ctu=64 / min-cu-size=8 / no-rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=0 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / max-merge=2 / limit-refs=3 / no-limit-modes / me=1 / subme=2 / merange=57 / temporal-mvp / weightp / no-weightb / no-analyze-src-pics / deblock=0:0 / no-sao / no-sao-non-deblock / rd=3 / no-early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=0.00 / no-rd-refine / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=crf / crf=16.0 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / vbv-maxrate=160000 / vbv-bufsize=160000 / vbv-init=0.9 / crf-max=0.0 / crf-min=0.0 / ipratio=1.40 / pbratio=1.30 / aq-mode=1 / aq-strength=1.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 / range=0 / colorprim=9 / transfer=16 / colormatrix=9 / chromaloc=1 / chromaloc-top=2 / chromaloc-bottom=2 / display-window=0 / master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,01) / max-cll=732,213 / min-luma=0 / max-luma=1023 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / opt-qp-pps / opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / no-opt-cu-delta-qp / no-aq-motion / hdr / hdr-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=5 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=0 / refine-ctu-distortion=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-analysis-type=0 / copy-pic=1 / max-ausize-factor=1.0 / no-dynamic-refine / no-single-sei / no-hevc-aq / no-svt / qp-adaptation-range=1.00
Default : Yes
Forced : No
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Mastering display color primaries : Display P3
Mastering display luminance : min: 0.0001 cd/m2, max: 1000 cd/m2
Maximum Content Light Level : 732 cd/m2
Maximum Frame-Average Light Level : 213 cd/m2

@rigaya
Copy link
Owner

rigaya commented Jan 16, 2020

@hydra3333 Thank you for pointing out the problem, unexpected value for maxCLL/maxFALL should be fixed in NVEnc 4.61.

@devil40xxx Unfortunately, I tried with several samples I have, but I'm unsuccessful in reproducing your error. Checking the source code, "Assertion in_ts..." error seems to be related with audio processing, so I'm little confused why copying master-dsiaply or light content metadata causes this error.

@hydra3333
Copy link

cough, any time, cough (I did nothing except thank you for your great work!)

@devil40xxx
Copy link
Author

devil40xxx commented Jan 21, 2020

@rigaya
Talking about the audio,i get somthing strange in encode both video and audio in the same time(audio from dts to opus at 320k/2ch),it's ok to play the video from the beganning, but when you pull the progress bar , it lost the sound for a while (seems like something mess in the audio head)

And I think the auido encoding is a little bit complex even for pro users. It seem like if you don't use the exact correct symbols in above 5.1 situation you may get some weird mapping result .In ffmpeg we can use something like " -map 0:1 -acodec libopus -af aformat=channel_layouts="7.1|6.1|5.1|2.0|mono" -b:a xxxk" to handle almost everything ease and safe,similar to --max-cll copy,i think if we can get an
advanced option that could merge the auido options( to one )and use sth like "-audio-encode steam name | mapping(copy) | bitrates "to solve everyting and that would be great and could be ease to code-maintain in future.

Thx for the good job, again :")

rigaya added a commit that referenced this issue Feb 10, 2020
音声エンコ時に、キューからの映像と音声の取り出し時のtimestamp的な同期が不十分だった(音声コピー時は問題なかった)。
@rigaya
Copy link
Owner

rigaya commented Feb 10, 2020

it's ok to play the video from the beganning, but when you pull the progress bar , it lost the sound for a while (seems like something mess in the audio head)

@devil40xxx I think this is a problem caused by the insufficient handling of muxing, I have improved the handling of muxing in NVEnc 4.63, which might fix this issue.

@rigaya rigaya closed this as completed Aug 26, 2022
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

3 participants