Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
16th November 2017, 22:34 | #1 | Link |
Moderator
Join Date: Oct 2001
Posts: 20,975
|
X265 command line for UHD-BD
Anyone have a recommended command line that will create an HEVC file that would be compliant for integration into a UHD-BD structure? I've tried several, but when I mux them the I don't get a picture on my UHD player, only audio.
I've written code that can update a structure created by TSMUXER so that it is compliant with UHD-BD, and it works correctly if I use it with an HEVC steam from a UHD-BD -- but fails when used with my output from my attempts with X265 output. I'm pulling my hair out -- any help would be appreciated. |
16th November 2017, 23:58 | #4 | Link |
Registered Developer
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,346
|
Including the piece of information that you want to do HDR would've been important (or if you're not, you should not be using smpte-st-2084)
__________________
LAV Filters - open source ffmpeg based media splitter and decoders |
17th November 2017, 02:59 | #5 | Link | |
Moderator
Join Date: Oct 2001
Posts: 20,975
|
Quote:
How about a command line example of an encode that works? Maybe one with hdr and one without? Oh, I see, you're too busy nit-picking -- and probably haven't a clue. I guess, as usual, I'm on my own. Last edited by jdobbs; 17th November 2017 at 03:04. |
|
17th November 2017, 10:11 | #7 | Link |
Lost my old account :(
Join Date: Jul 2017
Posts: 325
|
This should result in a uhd-bd compliant hevc stream for HDR10 material (P3 graded with 1000nits peaks).
Code:
"ffmpeg.exe" -probesize 100MB -i "input" -pix_fmt yuv420p10le -an -f yuv4mpegpipe -strict -1 - | "x265.exe" --y4m --fps 24000/1001 --input-csp 1 --input-depth 10 --output-depth 10 --no-interlace --preset slow --vbv-maxrate 109000 --vbv-bufsize 109000 --uhd-bd --bitrate 50000 --pass 1 --slow-firstpass --sar 1 --hrd --aud --chromaloc 2 --hdr-opt --colorprim bt2020 --transfer smpte2084 --colormatrix bt2020nc --max-cll "1000,400" --master-display "G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,1)" - -o nul "ffmpeg.exe" -probesize 100MB -i "input" -pix_fmt yuv420p10le -an -f yuv4mpegpipe -strict -1 - | "x265.exe" --y4m --fps 24000/1001 --input-csp 1 --input-depth 10 --output-depth 10 --no-interlace --preset slow --vbv-maxrate 109000 --vbv-bufsize 109000 --uhd-bd --bitrate 50000 --pass 2 --sar 1 --hrd --aud --chromaloc 2 --hdr-opt --colorprim bt2020 --transfer smpte2084 --colormatrix bt2020nc --max-cll "1000,400" --master-display "G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,1)" - -o "out.hevc" Last edited by excellentswordfight; 17th November 2017 at 10:33. |
17th November 2017, 10:14 | #8 | Link |
Registered Developer
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,346
|
How about instead of insulting people you actually answer the questions you were asked, so people can help you?
There is already a thread with discussion about UHD BD x265 encoding here: https://forum.doom9.org/showthread.php?t=174491, which has a bunch of examples from people which allegedly work (I didn't test all of them), but the basic answer is that it really doesn't require many special commands, primarily either --uhd-bd or the equivalent individual options (--aud --no-open-gop --chromaloc 2), and possibly enabling hrd. And for HDR, the long list of appropriate mastering options.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders |
17th November 2017, 14:54 | #9 | Link | ||
Moderator
Join Date: Oct 2001
Posts: 20,975
|
Quote:
Quote:
I read that thread several days ago and tried pretty much every iteration I could find. None worked. I'm doing something wrong. I'll run the example provided above by excellentswordfight and see how it works. Last edited by jdobbs; 17th November 2017 at 15:17. |
||
17th November 2017, 17:40 | #11 | Link | |
Moderator
Join Date: Oct 2001
Posts: 20,975
|
Quote:
The encoded and muxed M2TS file plays back fine on my computer with Media Player Classic -- but, of course, that's no real test. Both streams appear the same when I look at them with MEDIAINFO. Last edited by jdobbs; 17th November 2017 at 18:09. |
|
18th November 2017, 00:00 | #16 | Link |
Moderator
Join Date: Oct 2001
Posts: 20,975
|
I downloaded a trial version of CodecVisa -- honestly I couldn't make heads or tails of most of it. I tried comparing two streams -- but it didn't seem to do anything. Is Zond any easier? I tried downloading the demo package of zond and it keeps failing.
Last edited by jdobbs; 18th November 2017 at 00:04. |
18th November 2017, 00:30 | #17 | Link |
Moderator
Join Date: Oct 2001
Posts: 20,975
|
Here's what I got from Zond.
The original file: Code:
File info Stream type HEVC/H.265 Profile Main 10 Level / Tier 5.1 / High Chroma subsampling 4:2:0 Bit depth (Luma / Chroma) 10 / 10 Bits Resolution 3840 x 2160 (Ultra HD) Display aspect ratio 16 x 9 Frame rate 23.98 Frame count 1491 Duration 00:01:02,186 Bitrate 41.6 Mbps Stream size 323 MBytes File size 323 MBytes Proportion of this stream 0.99988 High dynamic range (HDR) Yes Color range Limited Color description present Yes Color primaries BT.2020 Transfer characteristics SMPTE ST 2084 Matrix coefficients BT.2020 non-constant Maximum Content Light Level 1514 Maximum Frame-Average Light Level 172 Mastering display color primaries R x=0.680000 y=0.320000 G x=0.265000 y=0.690000 B x=0.150000 y=0.060000 White point x=0.312700 y=0.329000 Mastering display luminance min 0.005000 cd/m2 max 4000.000000 cd/m2 GOP length Maximum GOP length 875 msec (21 frames) Minimum GOP length 41 msec (1 frames) Median of GOP length 562 msec (13 frames) Standard deviation of GOP length 381.49 msec (9.15 frames) Frame sizes Average frame size 222 KBytes Average I frame size 457 KBytes Average P frame size 279 KBytes Average B frame size 150 KBytes Compression efficiency Compressed size 323 MBytes Uncompressed size 0 Bytes bits per bin 0.25 bits per pixel 5.29 compression ratio 0.00 motion vectors per pixel 0.0000 Elements % bits residuals 1.30 232 mvd 0.00 0 merge_idx 0.00 0 skip_flag 0.00 0 split_coding_unit_flag 3.44 613 part_mode 0.31 56 merge_flag 0.00 0 cbf_cr 1.94 346 cbf_luma 3.00 535 slice header 2.83 504 inter_dir_pu 0.00 0 intra pred modes 51.75 9233 no_residual_data_flag 0.00 0 mvp_flag 0.00 0 ref_idx 0.00 0 cbf_cb 2.22 396 others 32.76 5844 pred_mode_flag 0.00 0 end_of_slice_flag 0.14 25 cu_qp_delta 0.31 56 split_transform_flag 0.00 0 CU types % Pixels intra 100.00 8294400 inter 0.00 0 Intra PU sizes % Numbers 8x8 0.38 32 16x16 3.17 264 32x32 96.45 8032 TU (Y) sizes % Numbers 8x8 100.00 8 Intra PU (Y) 8x8 16x16 32x32 PLANAR 16 (0.19%) 24 (0.29%) 4072 (48.90%) DC 16 (0.19%) 240 (2.88%) 3960 (47.55%) Intra PU (C) 8x8 16x16 32x32 PLANAR 16 (0.19%) 24 (0.29%) 4072 (48.90%) DC 16 (0.19%) 240 (2.88%) 3960 (47.55%) Code:
File info Stream type HEVC/H.265 Profile Main 10 Level / Tier 5.1 / High Chroma subsampling 4:2:0 Bit depth (Luma / Chroma) 10 / 10 Bits Resolution 3840 x 2160 (Ultra HD) Display aspect ratio 16 x 9 Frame rate 23.98 Frame count 1492 Duration 00:01:02,228 Bitrate 33.1 Mbps Stream size 257 MBytes File size 257 MBytes Proportion of this stream 1 High dynamic range (HDR) Yes Color range Limited Color description present Yes Color primaries BT.2020 Transfer characteristics SMPTE ST 2084 Matrix coefficients BT.2020 non-constant Maximum Content Light Level 1000 Maximum Frame-Average Light Level 400 Mastering display color primaries R x=0.680000 y=0.320000 G x=0.265000 y=0.690000 B x=0.150000 y=0.060000 White point x=0.312700 y=0.329000 Mastering display luminance min 0.005000 cd/m2 max 4000.000000 cd/m2 GOP length Maximum GOP length 1001 msec (24 frames) Minimum GOP length 41 msec (1 frames) Median of GOP length 1001 msec (24 frames) Standard deviation of GOP length 276.26 msec (6.62 frames) Frame sizes Average frame size 176 KBytes Average I frame size 417 KBytes Average P frame size 241 KBytes Average B frame size 142 KBytes Compression efficiency Compressed size 257 MBytes Uncompressed size 0 Bytes bits per bin 0.50 bits per pixel 5.32 compression ratio 0.00 motion vectors per pixel 0.0000 Elements % bits residuals 0.09 38 mvd 0.00 0 merge_idx 0.00 0 skip_flag 0.00 0 split_coding_unit_flag 0.93 376 part_mode 0.00 0 merge_flag 0.00 0 cbf_cr 0.69 280 cbf_luma 0.76 310 slice header 0.79 320 inter_dir_pu 0.00 0 intra pred modes 62.45 25375 no_residual_data_flag 0.00 0 mvp_flag 0.00 0 ref_idx 0.00 0 cbf_cb 0.62 250 others 33.62 13659 pred_mode_flag 0.00 0 end_of_slice_flag 0.03 12 cu_qp_delta 0.03 12 split_transform_flag 0.00 0 CU types % Pixels intra 100.00 8294400 inter 0.00 0 Intra PU sizes % Numbers 16x16 2.90 240 32x32 97.10 8040 TU (Y) sizes % Numbers 32x32 100.00 1 Intra PU (Y) 16x16 32x32 PLANAR 0 (0.00%) 4080 (49.28%) DC 240 (2.90%) 3960 (47.83%) Intra PU (C) 16x16 32x32 PLANAR 240 (2.90%) 3960 (47.83%) ANGULAR34 0 (0.00%) 4080 (49.28%) |
18th November 2017, 07:27 | #18 | Link |
Registered User
Join Date: Dec 2002
Posts: 5,565
|
I meant compare VPS/SPS/PPS. In Zond should be "Bitstream" and then expand the first NALUs. Also look for differences in general NALU structure/order (same SEIs before the picture NALUs, same order?).
Or maybe we try it the other way: you test files created by us on your player: https://www.sendspace.com/file/ezphty |
Thread Tools | Search this Thread |
Display Modes | |
|
|