Ubuntu 24.04 dynamic HDR10 hangs
Opened this issue · 23 comments
Hi! I'm trying to use QSVEnc 7.70 with an Arc A380 to transcode my 4K HEVC HDR10Plus files to 4K AV1 HDR10Plus. I've extracted the HDR10Plus metadata to a file using hdr10plus_tool. On Linux it just hangs whenever it tries to encode.
Log file:
qsvencc_log.txt
Passing --dhdr10-info metadata.json
hangs, and passing --dhdr10-info copy
doesn't actually copy the HDR10 info across to the new file.
I've also noticed it isn't able to fetch my card on the GPU Info Intel Graphics / Driver :
line, so it might be some sort of driver issue on my end?
Hi there,
I have almost same issue on windows,
I have an file where i have extracted the HDR10+ metadata data with hdr10plus_tool.
and when i use that file in QSVEnc it gets ignored during the process seems like it,
the encoder does see the metadata.json file. however nothing is injected.
hdr10plus_gen.exe is referenced in the options oversight.
i tried using it (hdr10plus_gen -i metadata.json -o metadata.bin) the output is also not used by qsvenc.
i couldnt find any documentation on the hdr10plus_gen tool. So maybe i did something wrong.
log file:
test.txt
--dhdr10-info copy
needs HDR10Plus metadata included in the input file, I'm unsure why it does not work.
Unfortunately --dhdr10-info metadata.json
is only supported on Windows only.
GPU Info Intel Graphics / Driver : line,
This is normal behavior in Linux systems.
@dennix85 QSVEnc 7.71 shall fix --dhdr10-info not working fine (in Windows).
@rigaya
I just downloaded the new version, however when i try to run this version the application abruptly stops.
without debug log i have no information why it stops, i captured the log file, i have attached it to my message.
test.zip
In there is also the hdr metadata extracted from the test file. The test file can be found :
https://ff.de/hdr10plus-metadata-test/
If you need any other information let me know please :)
Thnx for looking into the issue so fast
My os is windows 10 pro (latest updates) * edit
(I tried with -dhdr10-info copy / --dhdr10-info metadata.json
i tried with avsw / avhw ) * edit2
Thank you for the test file and json file used.
I tried following command line which should be close to your setting (accroding to your log), and unfortunately(?) was able to run fine. Would you please also have a try with the following command line?
x64\QSVEncC64.exe -i hdr10+test_lake_2021_02_01.mp4 -o F:\temp\test.mp4 --audio-copy -c av1 --output-depth 10 --colormatrix auto --colorprim auto --transfer auto --chromaloc auto --colorrange auto --master-display copy --max-cll copy --dhdr10-info hdr10+test_lake_2021_02_01.json --scenario-info archive --tune perceptual --icq 25 --ref 8 --gop-ref-dist 16 --gop-len 350 -u best --extbrc --adapt-ltr
videoPrm.mfx.BRCParamMultiplier value changed 0 -> 2 by driver
cop.AUDelimiter value changed off -> auto by driver
cop.PicTimingSEI value changed off -> auto by driver
cop.SingleSeiNalUnit value changed off -> auto by driver
cop2.RepeatPPS value changed on -> auto by driver
QSVEncC (x64) 7.71 (r3467) by rigaya, Oct 27 2024 16:04:46 (VC 1941/Win)
OS Windows 11 x64 (26100) [UTF-8]
CPU Info 12th Gen Intel Core i9-12900K [5.00GHz] (8P+8E,16C/24T) <DG2>
GPU Info Intel Arc A380 Graphics (128EU) 300-2450MHz (32.0.101.6127)
Media SDK QuickSyncVideo (hardware encoder) FF, 1st GPU(d), API v2.13
Async Depth 3 frames
Hyper Mode off
Buffer Memory d3d11, 36 work buffer
Input Info avqsv: H.265/HEVC, 3840x2160, 60/1 fps
AVSync auto
Output AV1(yuv420 10bit) main @ Level 5
3840x2160p 1:1 60.000fps (60/1fps)
avwriter: av1, aac => mp4
Target usage 1 - best
Encode Mode ICQ (Intelligent Const. Quality)
ICQ Quality 25
Scenario Info archive
Tune Quality perceptual
QP Limit min: 1, max: 255
Ref frames 8 frames
GopRefDist 16, B-pyramid: on
Max GOP Length 350 frames
VUI matrix:bt2020nc,colorprim:bt2020,transfer:smpte2084,range:limited,chromaloc:topleft
MasteringDisp G(0.265000 0.690000) B(0.150000 0.060000) R(0.680000 0.320000)
WP(0.312700 0.329000) L(1000.000000 0.000100)
MaxCLL/MaxFALL 1000/400
Dynamic HDR10 hdr10+test_lake_2021_02_01.json
Ext. Features ExtBRC AdaptiveLTR
encoded 3568 frames, 75.26 fps, 1268.90 kbps, 9.00 MB
encode time 0:00:47, CPU: 2.0%, GPU: 0.0%, VD: 97.1%
frame type IDR 11
frame type I 11, total size 1.14 MB
frame type P 3557, total size 7.86 MB
I have tested it with the command provided, this time the application runs, but still ignores the dhdr10 and seems like it strips it out. I have tried it with mp4 and mkv containers still with version 7.70 and 7.71 it doesnt copy it over yet.
Original Mediainfo output:
And here is the output of the encoded file:
If i play encoded file, there is no dhdr inside it neither, just the base hdr.
I tried the provided command with --dhdr10-info copy and it also neglected the dhdr10 data just basic hdr
edit: i narrowed the command not running with my arguments, is if i set this flag with it:
--dolby-vision-profile copy
it reproduces the error i experienced yesterday,
This only happens on 7.71 on 7.70 it doesnt happen
I think currently hdr10plus metadata is inserted in the av1 bitstream.
I've been checking av1 bitstream with av1parser, and I think currently hdr10plus metadata is inserted in the av1 bitstream, at least when writing in mp4/mkv with QSVEnc 7.71. The inserted data is "ItutT35Metadata" below.
I can get same data bytes inserted when using svt-av1-psy --hdr10plus-json options.
F:\temp\test.ivf: IVF codec="AV01" size=3840x2160 timescale=1000/1 length=6954
IVF F#0 size=297293
TEMPORAL_DELIMITER size=2+0
SEQUENCE_HEADER size=2+16
SequenceHeader { seq_profile: 0, still_picture: false, reduced_still_picture_header: false, timing_info_present_flag: false, timing_info: TimingInfo { num_units_in_display_tick: 0, time_scale: 0, equal_picture_interval: false, num_ticks_per_picture: 0 }, decoder_model_info_present_flag: false, initial_display_delay_present_flag: false, operating_points_cnt: 1, op: [OperatingPoint { operating_point_idc: 0, seq_level_idx: 12, seq_tier: 0 }], frame_width_bits: 16, frame_height_bits: 16, max_frame_width: 3840, max_frame_height: 2160, frame_id_numbers_present_flag: false, delta_frame_id_length: 0, additional_frame_id_length: 0, use_128x128_superblock: false, enable_filter_intra: false, enable_intra_edge_filter: false, enable_interintra_compound: false, enable_masked_compound: false, enable_warped_motion: false, enable_dual_filter: false, enable_order_hint: true, enable_jnt_comp: false, enable_ref_frame_mvs: false, seq_force_screen_content_tools: 2, seq_force_integer_mv: 0, order_hint_bits: 8, enable_superres: false, enable_cdef: true, enable_restoration: false, color_config: ColorConfig { bit_depth: 10, num_planes: 3, mono_chrome: false, color_primaries: 9, transfer_characteristics: 16, matrix_coefficients: 9, color_range: false, subsampling_x: 1, subsampling_y: 1, chroma_sample_position: 0, separate_uv_delta_q: true }, film_grain_params_present: false }
METADATA size=2+26
HdrMdcv(HdrMdcvMetadata { primary_chromaticity_x: [46399, 11141, 8585], primary_chromaticity_y: [19135, 52232, 3015], white_point_chromaticity_x: 20492, white_point_chromaticity_y: 21561, luminance_max: 256000, luminance_min: 0 })
METADATA size=2+6
HdrCll(HdrCllMetadata { max_cll: 2279, max_fall: 256 })
METADATA size=2+51
ItutT35(ItutT35Metadata { itu_t_t35_country_code: 181, itu_t_t35_country_code_extension_byte: None, itu_t_t35_payload_bytes: [0, 60, 0, 1, 4, 1, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 100, 8, 0, 8, 40, 7, 16, 80, 1, 144, 200, 0, 49, 144, 0, 106, 88, 0, 226, 208, 1, 114, 248, 1, 227, 24, 4, 244, 0, 0, 128] })
FRAME size=4+297180
#0 KeyFrame*, update(all), show@0
...
I've found that we currently have problwm when writing to raw av1 bitstream (not in container like mp4/mkv), hdr10plus metadata is not inserted like QSVEnc 7.70, so I'll make a fix for that.
Thank you very much for all your support so far, i'll keep waiting on a update.
@supersnellehenk QSVEnc 7.72 will allow to use --dhdr10-info also in Linux systems.
@dennix85 QSVEnc 7.72 fixes --dhdr10-info not working with raw output. I now can see the metadata written both in raw bitstream and container (mp4/mkv) output.
test-copy.txt
test-metadata.txt
Hi there,
I tried the new version on a set of multiple different hdr10+ content
With json file or with the build in copy function
But still the end results are just the base layer hdr10
But no hdr10+, i tried playing them, but still no hdr10+
It is the same results in mediainfo as shared before.
But the error of dolby vision arguments in the command are solved, the encoder now runs fine even if there is no DV present in the file.
I will provide logs a bit later on.
i have attched both logs
with copy argument and with a json file
Thanks for the update! However, I'm unable to try it at this time as it seems that my Linux box has decided to not like QSVEncc and error out. Could you shed some light on this log file so I can perhaps figure out why? It's not entirely clear to me, as FFMPEG is still able to use the card.
The error in question (I think) is: ResetMFXComponents: there might be error below, but it might be internal error which could be ignored. Failed to initialize encoder. : device operation failure.
It seems also have the same issues with dovi content,
i fed it some dovi p7 content but it always spits me out an HDR file.
I cant get dovi to work sadly neither
the application runs through the whole file but no dovi in output.
it works with P8.1
it does a copy over with that
But it starts with around 80fps, and it dropping alte way to single digit fps and takes almost a half a day to complete :o
if you need more logs on this then i need to find a public test file that has the characteristics..
let me know if i can provide anything else to help ..
Thank you for testing, I've looked throught the log but I'm also unsure here...
Would you please try with following more simplified option below? AV1 encoding does not support lookahead(--la-icq), so removing lookahead related options might do.
qsvencc --codec av1 --avsw --icq 20 --output-depth 10 --fixed-func --quality best --gop-len 350 --gop-ref-dist 16 --level auto --profile auto --colorrange auto --colormatrix auto --colorprim auto --transfer auto --chromaloc auto --max-cll copy --master-display copy --atc-sei auto --dhdr10-info copy --dolby-vision-profile copy --dolby-vision-rpu copy --log-level debug -i "/mnt/storage/tvshows4k/folder/file.mkv" -o /mnt/storage/media/hdr10plus.mkv
@dennix85 Thank you for your tests and feedback.
Although HDR10+ metadata is muxed in to the output file, it seems to be not detected.
For testing purpose, I've been checking for behavior of encoder of others, svt-av1-psy, which supports importing hdr10+ metadata json file, but for hdr10+, it seems like the same as QSVEncC. The encoded result does have hdr10+ metadata, but it does not show up on MediaInfo.
I have run svt-av1-psy like following.
x64\ffmpeg.exe -y -i hdr10+test_lake_2021_02_01.mp4 -c:v rawvideo -f yuv4mpegpipe -pix_fmt yuv420p10le -strict -1 - | x64\SvtAv1EncAppPsy_v2.3.0_x64.exe -i - -b hdr10+test_lake_2021_02_01.av1 --color-primaries bt2020 --transfer-characteristics smpte2084 --matrix-coefficients bt2020-ncl --mastering-display "G(0.2649,0.6900)B(0.1500,0.0600)R(0.6800,0.3200)WP(0.3127,0.3290)L(1000.0,1)" --content-light 1000,50 --hdr10plus-json hdr10+test_lake_2021_02_01.json
Then muxed into mp4 (or mkvmerge for mkv format).
mp4box.exe -add hdr10+test_lake_2021_02_01.av1 -new hdr10+test_lake_2021_02_01_svtav1.mp4
But I only get HDR10 in MediaInfo.
Looks difficult... For HDR10+, you might better try writing in HEVC, and not in AV1.
i fed it some dovi p7 content but it always spits me out an HDR file.
I've tested with dovi profile 7, but it seems to work fine, dolby vision 8.1 is shown up properly. Please note that output to profile 7 is not supported, as QSVEncC does not support EL, you need to write out in profile 8.x.
x64\QSVEncC64.exe -c av1 --output-depth 10 -i P7_FEL_GIJoe_The_Rise_of_Cobra.mkv -o P7_FEL_GIJoe_The_Rise_of_Cobra_qsv.mkv --colorprim auto --transfer auto --colormatrix auto --master-display copy --max-cll copy --dolby-vision-rpu copy --dolby-vision-profile 8.1 --vbr 12000
Input
Output
But it starts with around 80fps, and it dropping alte way to single digit fps and takes almost a half a day to complete
It's kind of weird to get that behavior.
On my side, I get stable 130fps encoding from start to end with dolby vision profile 8 input. (This is actually the longest dolby vision sampe file I have).
x64\QSVEncC64.exe -i IMG_3730.MOV -o IMG_3730.mp4 --colorprim auto --transfer auto --colormatrix auto --master-display copy --max-cll copy --dolby-vision-rpu IMG_3730.rpu --dolby-vision-profile 8.1 --vbr 30000 -c av1 --output-depth 10
--------------------------------------------------------------------------------
IMG_3730.mp4
--------------------------------------------------------------------------------
videoPrm.mfx.MaxKbps value changed 15000 -> 30000 by driver
cop.AUDelimiter value changed off -> auto by driver
cop.PicTimingSEI value changed off -> auto by driver
cop.SingleSeiNalUnit value changed off -> auto by driver
cop2.RepeatPPS value changed on -> auto by driver
QSVEncC (x64) 7.72 (r3486) by rigaya, Nov 3 2024 15:04:31 (VC 1941/Win)
OS Windows 11 x64 (26100) [UTF-8]
CPU Info 12th Gen Intel Core i9-12900K [4.99GHz] (8P+8E,16C/24T) <DG2>
GPU Info Intel Arc A380 Graphics (128EU) 300-2450MHz (32.0.101.6127)
Media SDK QuickSyncVideo (hardware encoder) FF, 1st GPU(d), API v2.13
Async Depth 3 frames
Hyper Mode off
Buffer Memory d3d11, 28 work buffer
Input Info avqsv: H.265/HEVC, 3840x2160, 60000/1001 fps
AVSync auto
Output AV1(yuv420 10bit) main @ Level 5
3840x2160p 1:1 59.940fps (60000/1001fps)
avwriter: av1 => mp4
Target usage 4 - balanced
Encode Mode Bitrate Mode - VBR
Bitrate 30000 kbps
Max Bitrate 30000 kbps
VBV Bufsize 60000 kb
QP Limit min: 1, max: 255
Ref frames 4 frames
GopRefDist 8, B-pyramid: on
Max GOP Length 600 frames
VUI matrix:bt2020nc,colorprim:bt2020,transfer:arib-std-b67
dovi profile 8.1
dovi rpu IMG_3730.rpu
encoded 23453 frames, 131.30 fps, 30928.88 kbps, 1442.63 MB
encode time 0:02:58, CPU: 2.2%, GPU: 0.0%, VD: 97.4%
frame type IDR 40
frame type I 40, total size 27.17 MB
frame type P 23413, total size 1415.46 MB
So please let me ask...
- Please let me know the exact command line.
- Does it work fine without --dolby-vision-rpu option?
- How many frames are you working on?
Thank you.
I have no idea how to inspect the stream if the metadata is indeed injected in the file, if it is injected correctly I believe it has to do with point 3.3 on the page linked below:
" Additionally, [DASH] content following [DASH-IOP] should include a Supplemental Descriptor with @schemeIdUri set to "http://dashif.org/metadata/hdr" and @value set to "SMPTE2094-40" in manifest files. This can aid players to identify tracks containing HDR10+ Metadata OBUs. "
https://aomediacodec.github.io/av1-hdr10plus/
I hope this might help resolve the issue with HDR10+ related.
The dovi
I forgot to capture a log file,
this is the result after encoding a file to av1 DOVI
Non DoVi has no issues chucks along with 80FPS or something.
--device auto --codec av1 --avhw --la-icq 25 --output-depth 10 --fixed-func --d3d11 --quality best --la-depth 80 --la-window-size 0 --la-quality auto --tune perceptual --scenario-info archive --extbrc --i-adapt --b-adapt --bframes 10 --b-pyramid --adapt-ltr --adapt-cqm --ref 8 --gop-len 350 --gop-ref-dist 16 --trellis auto --level auto --profile auto --colorrange auto --colormatrix auto --colorprim auto --transfer auto --chromaloc auto --max-cll copy --master-display copy --atc-sei auto --sao auto --dhdr10-info copy --dolby-vision-profile copy --dolby-vision-rpu copy --video-metadata copy --audio-copy --audio-disposition copy --audio-metadata copy --chapter-copy --sub-copy --sub-disposition copy --sub-metadata copy --avsync auto --gpu-copy --output-thread -1 --timer-period-tuning --task-perf-monitor --log-level info -i test.mkv -o testout.mkv
this is the command used, i use it in conjuction with an other application, that does batch operations with your great application, this is basically what i run with hevc or av1, i noticed, qsvenc is smart enough to turn options on and of what is codec specific, so i never bothered to change anything, as the quality this yields me on hevc and av1 is perfect. and i dont want to experiment any more :) . i know some arguments are hevc and some are av1, but untill now it never caused any issues, i encoded over 30k files already like this.
if there is anything i need to change let me know im willing to try.
I will try to run some more files, with dovi 7 see if i can capture a log where speed craps down again.
If i run non dovi content
with the arguments above, i reach these speeds:
2160p > around 80fps
1080p > around 300fps
720p > around 750fps
sub 720P > above 1000fps
Those speeds im very happy with
I'll keep posted here with some logs on the dovi part
(edit)
running same command on hevc does affect the speed, also when used on dovi source material
If i run it on normal /hdr/hdr10/no issues (AV1)
if i run on a dovi file, the speeds drops gradually down to single digits (av1/hevc)
I have no idea how to inspect the stream if the metadata is indeed injected in the file,
It's quite easy,
ffprobe -show_frames <file path>
and you'll get dump of each frame, and you shall find HDR10+ metadata as side data of each frame if the metadata is inserted correctly.
[FRAME]
...
[SIDE_DATA]
side_data_type=Mastering display metadata
...
[/SIDE_DATA]
[SIDE_DATA]
side_data_type=Content light level metadata
...
[/SIDE_DATA]
[SIDE_DATA]
side_data_type=HDR Dynamic Metadata SMPTE2094-40 (HDR10+) <<<<<< HDR10+ metadata
[/FRAME]
As I can see the metadata in output of QSVEnc, it is there, and ffmpeg/ffprobe recognizes them properly.
Currently, I can't see any more improvement to do with the output.
point 3.3 of the page https://aomediacodec.github.io/av1-hdr10plus/
That part is usage for streaming, so it shall not be related to current problem.
speeds drops
Thank you for the logs. May be I need more frames to reproduce? Bit weird decoding using so much time... I'll check further.
[FRAME]
media_type=audio
stream_index=1
key_frame=0
pts=658
pts_time=0.658000
pkt_dts=658
pkt_dts_time=0.658000
best_effort_timestamp=658
best_effort_timestamp_time=0.658000
duration=N/A
duration_time=N/A
pkt_pos=121725
pkt_size=42
sample_fmt=s32
nb_samples=40
channels=8
channel_layout=7.1
[/FRAME]
[FRAME]
media_type=audio
stream_index=1
key_frame=0
pts=659
pts_time=0.659000
pkt_dts=659
pkt_dts_time=0.659000
best_effort_timestamp=659
best_effort_timestamp_time=0.659000
duration=N/A
duration_time=N/A
pkt_pos=121773
pkt_size=46
sample_fmt=s32
nb_samples=40
channels=8
channel_layout=7.1
[/FRAME]
[FRAME]
media_type=audio
stream_index=1
key_frame=0
pts=660
pts_time=0.660000
pkt_dts=660
pkt_dts_time=0.660000
best_effort_timestamp=660
best_effort_timestamp_time=0.660000
duration=N/A
duration_time=N/A
pkt_pos=121825
pkt_size=44
sample_fmt=s32
nb_samples=40
channels=8
channel_layout=7.1
[/FRAME]
[FRAME]
media_type=audio
stream_index=1
key_frame=0
pts=661
pts_time=0.661000
pkt_dts=661
pkt_dts_time=0.661000
best_effort_timestamp=661
best_effort_timestamp_time=0.661000
duration=N/A
duration_time=N/A
pkt_pos=121875
pkt_size=42
sample_fmt=s32
nb_samples=40
channels=8
channel_layout=7.1
[/FRAME]
[FRAME]
media_type=audio
stream_index=1
key_frame=0
pts=662
pts_time=0.662000
pkt_dts=662
pkt_dts_time=0.662000
best_effort_timestamp=662
best_effort_timestamp_time=0.662000
duration=N/A
duration_time=N/A
pkt_pos=121923
pkt_size=46
sample_fmt=s32
nb_samples=40
channels=8
channel_layout=7.1
[/FRAME]
[FRAME]
media_type=audio
stream_index=1
key_frame=0
pts=662
pts_time=0.662000
pkt_dts=662
pkt_dts_time=0.662000
best_effort_timestamp=662
best_effort_timestamp_time=0.662000
duration=N/A
duration_time=N/A
pkt_pos=121975
pkt_size=42
sample_fmt=s32
nb_samples=40
channels=8
channel_layout=7.1
[/FRAME]
[FRAME]
media_type=audio
stream_index=1
key_frame=0
pts=663
pts_time=0.663000
pkt_dts=663
pkt_dts_time=0.663000
best_effort_timestamp=663
best_effort_timestamp_time=0.663000
duration=N/A
duration_time=N/A
pkt_pos=122023
pkt_size=42
sample_fmt=s32
nb_samples=40
channels=8
channel_layout=7.1
[/FRAME]
[FRAME]
media_type=audio
stream_index=1
key_frame=0
pts=664
pts_time=0.664000
pkt_dts=664
pkt_dts_time=0.664000
best_effort_timestamp=664
best_effort_timestamp_time=0.664000
duration=N/A
duration_time=N/A
pkt_pos=122071
pkt_size=42
sample_fmt=s32
nb_samples=40
channels=8
channel_layout=7.1
[/FRAME]
[FRAME]
media_type=audio
stream_index=1
key_frame=0
pts=665
pts_time=0.665000
pkt_dts=665
pkt_dts_time=0.665000
best_effort_timestamp=665
best_effort_timestamp_time=0.665000
duration=N/A
duration_time=N/A
pkt_pos=122119
pkt_size=46
sample_fmt=s32
nb_samples=40
channels=8
channel_layout=7.1
[/FRAME]
[FRAME]
media_type=audio
stream_index=1
key_frame=0
pts=666
pts_time=0.666000
pkt_dts=666
pkt_dts_time=0.666000
best_effort_timestamp=666
best_effort_timestamp_time=0.666000
duration=N/A
duration_time=N/A
pkt_pos=122171
pkt_size=40
sample_fmt=s32
nb_samples=40
channels=8
channel_layout=7.1
[/FRAME]
[FRAME]
media_type=audio
stream_index=1
key_frame=0
pts=667
pts_time=0.667000
pkt_dts=667
pkt_dts_time=0.667000
best_effort_timestamp=667
best_effort_timestamp_time=0.667000
duration=N/A
duration_time=N/A
pkt_pos=122217
pkt_size=44
sample_fmt=s32
nb_samples=40
channels=8
channel_layout=7.1
[/FRAME]
[FRAME]t message repeated 26 times
media_type=video
stream_index=0
key_frame=0
pts=250
pts_time=0.250000
pkt_dts=250
pkt_dts_time=0.250000
best_effort_timestamp=250
best_effort_timestamp_time=0.250000
duration=41
duration_time=0.041000
pkt_pos=77622
pkt_size=554
width=3840
height=2160
crop_top=0
crop_bottom=0
crop_left=0
crop_right=0
pix_fmt=yuv420p10le
sample_aspect_ratio=1:1
pict_type=B
interlaced_frame=0
top_field_first=0
repeat_pict=0
color_range=tv
color_space=bt2020nc
color_primaries=bt2020
color_transfer=smpte2084
chroma_location=topleft
[SIDE_DATA]
side_data_type=Mastering display metadata
red_x=35400/50000
red_y=14600/50000
green_x=8500/50000
green_y=39850/50000
blue_x=6550/50000
blue_y=2300/50000
white_point_x=15635/50000
white_point_y=16450/50000
min_luminance=50/10000
max_luminance=40000000/10000
[/SIDE_DATA]
[SIDE_DATA]
side_data_type=Content light level metadata
max_content=683
max_average=136
[/SIDE_DATA]
[SIDE_DATA]
side_data_type=HDR Dynamic Metadata SMPTE2094-40 (HDR10+)
application version=1
num_windows=1
targeted_system_display_maximum_luminance=500/1
maxscl=0/100000
maxscl=0/100000
maxscl=0/100000
average_maxrgb=0/100000
num_distribution_maxrgb_percentiles=9
distribution_maxrgb_percentage=1
distribution_maxrgb_percentile=0/100000
distribution_maxrgb_percentage=5
distribution_maxrgb_percentile=0/100000
distribution_maxrgb_percentage=10
distribution_maxrgb_percentile=100/100000
distribution_maxrgb_percentage=25
distribution_maxrgb_percentile=3/100000
distribution_maxrgb_percentage=50
distribution_maxrgb_percentile=4/100000
distribution_maxrgb_percentage=75
distribution_maxrgb_percentile=5/100000
distribution_maxrgb_percentage=90
distribution_maxrgb_percentile=6/100000
distribution_maxrgb_percentage=95
distribution_maxrgb_percentile=7/100000
distribution_maxrgb_percentage=99
distribution_maxrgb_percentile=8/100000
fraction_bright_pixels=0/1000
knee_point_x=0/4095
knee_point_y=0/4095
num_bezier_curve_anchors=9
bezier_curve_anchors=102/1023
bezier_curve_anchors=205/1023
bezier_curve_anchors=307/1023
bezier_curve_anchors=409/1023
bezier_curve_anchors=512/1023
bezier_curve_anchors=614/1023
bezier_curve_anchors=716/1023
bezier_curve_anchors=818/1023
bezier_curve_anchors=921/1023
[/SIDE_DATA]
[SIDE_DATA]
side_data_type=Dolby Vision RPU Data
[/SIDE_DATA]
[SIDE_DATA]
side_data_type=Dolby Vision Metadata
rpu_type=2
rpu_format=18
vdr_rpu_profile=1
vdr_rpu_level=0
chroma_resampling_explicit_filter_flag=0
coef_data_type=0
coef_log2_denom=23
vdr_rpu_normalized_idc=1
bl_video_full_range_flag=0
bl_bit_depth=10
el_bit_depth=10
vdr_bit_depth=12
spatial_resampling_filter_flag=0
el_spatial_resampling_filter_flag=1
disable_residual_flag=0
vdr_rpu_id=0
mapping_color_space=0
mapping_chroma_format_idc=0
nlq_method_idc=0
nlq_method_idc_name=linear_dz
num_x_partitions=1
num_y_partitions=1
[COMPONENT]
pivots=0 1023
[PIECE]
mapping_idc=0
mapping_idc_name=polynomial
poly_order=1
poly_coef=0 8388608
[/PIECE]
nlq_offset=0
vdr_in_max=8388608
linear_deadzone_slope=0
linear_deadzone_threshold=0
[/COMPONENT]
[COMPONENT]
pivots=0 1023
[PIECE]
mapping_idc=0
mapping_idc_name=polynomial
poly_order=1
poly_coef=0 8388608
[/PIECE]
nlq_offset=0
vdr_in_max=8388608
linear_deadzone_slope=0
linear_deadzone_threshold=0
[/COMPONENT]
[COMPONENT]
pivots=0 1023
[PIECE]
mapping_idc=0
mapping_idc_name=polynomial
poly_order=1
poly_coef=0 8388608
[/PIECE]
nlq_offset=0
vdr_in_max=8388608
linear_deadzone_slope=0
linear_deadzone_threshold=0
[/COMPONENT]
dm_metadata_id=0
scene_refresh_flag=0
ycc_to_rgb_matrix=9574/8192 0/8192 13802/8192 9574/8192 -1540/8192 -5348/8192 9574/8192 17610/8192 0/8192
ycc_to_rgb_offset=16777216/268435456 134217728/268435456 134217728/268435456
rgb_to_lms_matrix=7222/16384 8771/16384 390/16384 2654/16384 12430/16384 1300/16384 0/16384 422/16384 15962/16384
signal_eotf=65535
signal_eotf_param0=0
signal_eotf_param1=0
signal_eotf_param2=0
signal_bit_depth=12
signal_color_space=0
signal_chroma_format=0
signal_full_range_flag=1
source_min_pq=62
source_max_pq=3696
source_diagonal=42
[/SIDE_DATA]
[/FRAME]
[FRAME]t message repeated 28 times
media_type=video
stream_index=0
key_frame=0
pts=292
pts_time=0.292000
pkt_dts=292
pkt_dts_time=0.292000
best_effort_timestamp=292
best_effort_timestamp_time=0.292000
duration=41
duration_time=0.041000
pkt_pos=78744
pkt_size=553
width=3840
height=2160
crop_top=0
crop_bottom=0
crop_left=0
crop_right=0
pix_fmt=yuv420p10le
sample_aspect_ratio=1:1
pict_type=B
interlaced_frame=0
top_field_first=0
repeat_pict=0
color_range=tv
color_space=bt2020nc
color_primaries=bt2020
color_transfer=smpte2084
chroma_location=topleft
[SIDE_DATA]
side_data_type=Mastering display metadata
red_x=35400/50000
red_y=14600/50000
green_x=8500/50000
green_y=39850/50000
blue_x=6550/50000
blue_y=2300/50000
white_point_x=15635/50000
white_point_y=16450/50000
min_luminance=50/10000
max_luminance=40000000/10000
[/SIDE_DATA]
[SIDE_DATA]
side_data_type=Content light level metadata
max_content=683
max_average=136
[/SIDE_DATA]
[SIDE_DATA]
side_data_type=HDR Dynamic Metadata SMPTE2094-40 (HDR10+)
application version=1
num_windows=1
targeted_system_display_maximum_luminance=500/1
maxscl=0/100000
maxscl=0/100000
maxscl=0/100000
average_maxrgb=0/100000
num_distribution_maxrgb_percentiles=9
distribution_maxrgb_percentage=1
distribution_maxrgb_percentile=0/100000
distribution_maxrgb_percentage=5
distribution_maxrgb_percentile=0/100000
distribution_maxrgb_percentage=10
distribution_maxrgb_percentile=100/100000
distribution_maxrgb_percentage=25
distribution_maxrgb_percentile=3/100000
distribution_maxrgb_percentage=50
distribution_maxrgb_percentile=4/100000
distribution_maxrgb_percentage=75
distribution_maxrgb_percentile=5/100000
distribution_maxrgb_percentage=90
distribution_maxrgb_percentile=6/100000
distribution_maxrgb_percentage=95
distribution_maxrgb_percentile=7/100000
distribution_maxrgb_percentage=99
distribution_maxrgb_percentile=8/100000
fraction_bright_pixels=0/1000
knee_point_x=0/4095
knee_point_y=0/4095
num_bezier_curve_anchors=9
bezier_curve_anchors=102/1023
bezier_curve_anchors=205/1023
bezier_curve_anchors=307/1023
bezier_curve_anchors=409/1023
bezier_curve_anchors=512/1023
bezier_curve_anchors=614/1023
bezier_curve_anchors=716/1023
bezier_curve_anchors=818/1023
bezier_curve_anchors=921/1023
[/SIDE_DATA]
[SIDE_DATA]
side_data_type=Dolby Vision RPU Data
[/SIDE_DATA]
[SIDE_DATA]
side_data_type=Dolby Vision Metadata
rpu_type=2
rpu_format=18
vdr_rpu_profile=1
vdr_rpu_level=0
chroma_resampling_explicit_filter_flag=0
coef_data_type=0
coef_log2_denom=23
vdr_rpu_normalized_idc=1
bl_video_full_range_flag=0
bl_bit_depth=10
el_bit_depth=10
vdr_bit_depth=12
spatial_resampling_filter_flag=0
el_spatial_resampling_filter_flag=1
disable_residual_flag=0
vdr_rpu_id=0
mapping_color_space=0
mapping_chroma_format_idc=0
nlq_method_idc=0
nlq_method_idc_name=linear_dz
num_x_partitions=1
num_y_partitions=1
[COMPONENT]
pivots=0 1023
[PIECE]
mapping_idc=0
mapping_idc_name=polynomial
poly_order=1
poly_coef=0 8388608
[/PIECE]
nlq_offset=0
vdr_in_max=8388608
linear_deadzone_slope=0
linear_deadzone_threshold=0
[/COMPONENT]
[COMPONENT]
pivots=0 1023
[PIECE]
mapping_idc=0
mapping_idc_name=polynomial
poly_order=1
poly_coef=0 8388608
[/PIECE]
nlq_offset=0
vdr_in_max=8388608
linear_deadzone_slope=0
linear_deadzone_threshold=0
[/COMPONENT]
[COMPONENT]
pivots=0 1023
[PIECE]
mapping_idc=0
mapping_idc_name=polynomial
poly_order=1
poly_coef=0 8388608
[/PIECE]
nlq_offset=0
vdr_in_max=8388608
linear_deadzone_slope=0
linear_deadzone_threshold=0
[/COMPONENT]
dm_metadata_id=0
scene_refresh_flag=0
ycc_to_rgb_matrix=9574/8192 0/8192 13802/8192 9574/8192 -1540/8192 -5348/8192 9574/8192 17610/8192 0/8192
ycc_to_rgb_offset=16777216/268435456 134217728/268435456 134217728/268435456
rgb_to_lms_matrix=7222/16384 8771/16384 390/16384 2654/16384 12430/16384 1300/16384 0/16384 422/16384 15962/16384
signal_eotf=65535
signal_eotf_param0=0
signal_eotf_param1=0
signal_eotf_param2=0
signal_bit_depth=12
signal_color_space=0
signal_chroma_format=0
signal_full_range_flag=1
source_min_pq=62
source_max_pq=3696
source_diagonal=42
[/SIDE_DATA]
[/FRAME]
[FRAME]t message repeated 30 times
media_type=video
stream_index=0
key_frame=0
pts=334
pts_time=0.334000
pkt_dts=334
pkt_dts_time=0.334000
best_effort_timestamp=334
best_effort_timestamp_time=0.334000
duration=41
duration_time=0.041000
pkt_pos=74814
pkt_size=557
width=3840
height=2160
crop_top=0
crop_bottom=0
crop_left=0
crop_right=0
pix_fmt=yuv420p10le
sample_aspect_ratio=1:1
pict_type=P
interlaced_frame=0
top_field_first=0
repeat_pict=0
color_range=tv
color_space=bt2020nc
color_primaries=bt2020
color_transfer=smpte2084
chroma_location=topleft
[SIDE_DATA]
side_data_type=Mastering display metadata
red_x=35400/50000
red_y=14600/50000
green_x=8500/50000
green_y=39850/50000
blue_x=6550/50000
blue_y=2300/50000
white_point_x=15635/50000
white_point_y=16450/50000
min_luminance=50/10000
max_luminance=40000000/10000
[/SIDE_DATA]
[SIDE_DATA]
side_data_type=Content light level metadata
max_content=683
max_average=136
[/SIDE_DATA]
[SIDE_DATA]
side_data_type=HDR Dynamic Metadata SMPTE2094-40 (HDR10+)
application version=1
num_windows=1
targeted_system_display_maximum_luminance=500/1
maxscl=0/100000
maxscl=0/100000
maxscl=0/100000
average_maxrgb=0/100000
num_distribution_maxrgb_percentiles=9
distribution_maxrgb_percentage=1
distribution_maxrgb_percentile=0/100000
distribution_maxrgb_percentage=5
distribution_maxrgb_percentile=0/100000
distribution_maxrgb_percentage=10
distribution_maxrgb_percentile=100/100000
distribution_maxrgb_percentage=25
distribution_maxrgb_percentile=3/100000
distribution_maxrgb_percentage=50
distribution_maxrgb_percentile=4/100000
distribution_maxrgb_percentage=75
distribution_maxrgb_percentile=5/100000
distribution_maxrgb_percentage=90
distribution_maxrgb_percentile=6/100000
distribution_maxrgb_percentage=95
distribution_maxrgb_percentile=7/100000
distribution_maxrgb_percentage=99
distribution_maxrgb_percentile=8/100000
fraction_bright_pixels=0/1000
knee_point_x=0/4095
knee_point_y=0/4095
num_bezier_curve_anchors=9
bezier_curve_anchors=102/1023
bezier_curve_anchors=205/1023
bezier_curve_anchors=307/1023
bezier_curve_anchors=409/1023
bezier_curve_anchors=512/1023
bezier_curve_anchors=614/1023
bezier_curve_anchors=716/1023
bezier_curve_anchors=818/1023
bezier_curve_anchors=921/1023
[/SIDE_DATA]
[SIDE_DATA]
side_data_type=Dolby Vision RPU Data
[/SIDE_DATA]
[SIDE_DATA]
side_data_type=Dolby Vision Metadata
rpu_type=2
rpu_format=18
vdr_rpu_profile=1
vdr_rpu_level=0
chroma_resampling_explicit_filter_flag=0
coef_data_type=0
coef_log2_denom=23
vdr_rpu_normalized_idc=1
bl_video_full_range_flag=0
bl_bit_depth=10
el_bit_depth=10
vdr_bit_depth=12
spatial_resampling_filter_flag=0
el_spatial_resampling_filter_flag=1
disable_residual_flag=0
vdr_rpu_id=0
mapping_color_space=0
mapping_chroma_format_idc=0
nlq_method_idc=0
nlq_method_idc_name=linear_dz
num_x_partitions=1
num_y_partitions=1
[COMPONENT]
pivots=0 1023
[PIECE]
mapping_idc=0
mapping_idc_name=polynomial
poly_order=1
poly_coef=0 8388608
[/PIECE]
nlq_offset=0
vdr_in_max=8388608
linear_deadzone_slope=0
linear_deadzone_threshold=0
[/COMPONENT]
[COMPONENT]
pivots=0 1023
[PIECE]
mapping_idc=0
mapping_idc_name=polynomial
poly_order=1
poly_coef=0 8388608
[/PIECE]
nlq_offset=0
vdr_in_max=8388608
linear_deadzone_slope=0
linear_deadzone_threshold=0
[/COMPONENT]
[COMPONENT]
pivots=0 1023
[PIECE]
mapping_idc=0
mapping_idc_name=polynomial
poly_order=1
poly_coef=0 8388608
[/PIECE]
nlq_offset=0
vdr_in_max=8388608
linear_deadzone_slope=0
linear_deadzone_threshold=0
[/COMPONENT]
dm_metadata_id=0
scene_refresh_flag=0
ycc_to_rgb_matrix=9574/8192 0/8192 13802/8192 9574/8192 -1540/8192 -5348/8192 9574/8192 17610/8192 0/8192
ycc_to_rgb_offset=16777216/268435456 134217728/268435456 134217728/268435456
rgb_to_lms_matrix=7222/16384 8771/16384 390/16384 2654/16384 12430/16384 1300/16384 0/16384 422/16384 15962/16384
signal_eotf=65535
signal_eotf_param0=0
signal_eotf_param1=0
signal_eotf_param2=0
signal_bit_depth=12
signal_color_space=0
signal_chroma_format=0
signal_full_range_flag=1
source_min_pq=62
source_max_pq=3696
source_diagonal=42
[/SIDE_DATA]
[/FRAME]
[FRAME]t message repeated 32 times
media_type=video
stream_index=0
key_frame=0
pts=375
pts_time=0.375000
pkt_dts=375
pkt_dts_time=0.375000
best_effort_timestamp=375
best_effort_timestamp_time=0.375000
duration=41
duration_time=0.041000
pkt_pos=123959
pkt_size=556
width=3840
height=2160
crop_top=0
crop_bottom=0
crop_left=0
crop_right=0
pix_fmt=yuv420p10le
sample_aspect_ratio=1:1
pict_type=B
interlaced_frame=0
top_field_first=0
repeat_pict=0
color_range=tv
color_space=bt2020nc
color_primaries=bt2020
color_transfer=smpte2084
chroma_location=topleft
[SIDE_DATA]
side_data_type=Mastering display metadata
red_x=35400/50000
red_y=14600/50000
green_x=8500/50000
green_y=39850/50000
blue_x=6550/50000
blue_y=2300/50000
white_point_x=15635/50000
white_point_y=16450/50000
min_luminance=50/10000
max_luminance=40000000/10000
[/SIDE_DATA]
[SIDE_DATA]
side_data_type=Content light level metadata
max_content=683
max_average=136
[/SIDE_DATA]
i hope this is what you are looking for ?>?
i tried on different kinds of media with dovi enabled, if i use hevc or av1, when dovi is involved the speed drops,
if needed, i can let it run overnight and capture a debug log of it ?
I will include the file of the output of that ffprobe command on the source file.
Only thing i noticed during the command is this:
Dont know if it has something to do with it.?
HDR10+ does work with hevc, so i will experiment with that if that satisfies my needs,
How about Hybrid files, will that work properly with qsvenc or do you have an opinion about those ?
I cropped the file, as it didnt got allowed to upload.
frames_info.txt
Yes, so you've got
side_data_type=HDR Dynamic Metadata SMPTE2094-40 (HDR10+)
in the frames, so the HDR10+ metadata is inserted to the output file, but somehow not detected in some application.
It might be the problem of QSVEnc, but the output of svt-av1-psy with HDR10+ looks the same, so might no be problem of QSVEnc, and I'm not sure.
As I've mentioned before, I can't see any more improvement to do with the output at this point, so I'm sorry but I'll put this task on hold.
Skipping NAL unit 63
I think it's EL of dolby vision being skipped.
How about Hybrid files
You mean file with dolby vision and HDR10+? Are there such kind of files? I haven't tested that at all, I haven't got such kind of file.
speed drop
I might have find out the cause, and I've created a test build trying to improve the decode speed, would you please download from the link and have a test and check if it changes the encode speed?
https://nightly.link/rigaya/QSVEnc/actions/runs/11739559533/QSVEncC_release_r3495_x64.zip
Hi there,
thnx for the quick response,
So i have experienced the same with svt-av1-psy
So i guess we have to wait untill there is some kind of update to the codec or the applications to properly get it to work on av1..
this error occured two times:
I did some testings on the same file, same commands issued as before provided in the previous comment.
8x i did succeed in encoding the file. i used hevc
it copied over the DV and HDR10+ over as expected.
I will do some testing on AV1 with dovi only content.
See how that will go with version.
Don't know what you have changed But i have a boost in fps its nice to see, it went from average 75ish to almost 100 :)
I will report back here when i have tested the AV1 part
I did some testing let the nodes run through some content ( two nodes did the fileset in to HEVC and two other nodes did AV1 )
AV1 or HEVC they performed both the same performance wise, all jobs finished at around 100fps within a reasonable expected time to complete.
This is the command used:
QSVEncC64 --device auto --codec hevc --avhw --qvbr 12500 --qvbr-quality 25 --output-depth 10 --fixed-func --d3d11 --quality best --la-depth 80 --la-window-size 0 --la-quality auto --tune perceptual --scenario-info archive --extbrc --i-adapt --b-adapt --bframes 10 --b-pyramid --adapt-ltr --adapt-cqm --ref 8 --gop-len 350 --gop-ref-dist 16 --trellis auto --level auto --profile auto --colorrange auto --colormatrix auto --colorprim auto --transfer auto --chromaloc auto --max-cll copy --master-display copy --atc-sei auto --sao auto --dhdr10-info copy --dolby-vision-profile 8.1 --dolby-vision-rpu copy --video-metadata copy --audio-copy --audio-disposition copy --audio-metadata copy --chapter-copy --sub-copy --sub-disposition copy --sub-metadata copy --avsync auto --gpu-copy --output-thread -1 --timer-period-tuning --task-perf-monitor --log-level info -i someinput.mkv -o someoutput.mkv
they produce both files with DoVi p7 converted to 8.1 but how ever,
The files in HEVC have 0 issues, all worked fine, with dovi no stutters and very good filesize output (expected filesizes).
The files produced by the AV1 encoder do stutter, and in occasional cases the files dont even play. They get 4 times the size of the HEVC files, where i expected them to be on par or even better compressed since AV1 should outshine hevc on 4k and higher resolutions.
The source files are the highest quality possible as they are my own BluRay Disc collection ripped to my desktop for testing purposes.
I will try to capture some logs later on and attach these to here, maybe they can help diagnose the issue,
other then this, the application performs much more better in all cases, haven't encountered any other issues then described with dovi on AV1.
QSVEnc 7.73 includes performance improvement for --dolby-vision-rpu copy.
I don't have problem with AV1 playback using the latest mpc-hc 2.3.7 + MPC Video Renderer.
sorry for the late reaction, had a few very busy days i couldnt test no further..
Well i think i narrowed down the issue, it happens with av1 in combination with dovi involved.
If i use AV1 without dovi ir behaves as expected. All files play fine, and the filesize reduce more as what hevc does.
But however when i involve dovi in to av1 the stuttering begins, i have tested it on a few devices but it does the same,
overall, i have had 0 issues with the new release, processed over 750+ files already various inuts from sd to 4k uhd
performance is better as with previous versions, it seems that the most improvement happend on hevc source files they do seems over 50fps more when doing hevc decoding.. In hevc all hdr10+ and dovi work correctly with the copy function without involving external metadata or RPU data ..
i will capture the av1 dovi logs this weekend and will provide them here, and might aswell my samples and output files.
might help diagnose further ..
So I'm still experiencing issues with QSVEncc, which I've got no clue how to solve. I've tried both an Ubuntu 24.04.01 LTS virtual machine and a Windows 11 virtual machine. QSVEncc worked in the Windows VM, but I wasn't even able to get intel_gpu_top
to work in the Linux VM.
At this point I'm certain it's something QSVEncc is doing which is different than Handbrake/ffmpeg in terms of accessing the GPU, as those two programs work fine. But I can't figure out what, as I get no error logs anywhere except a generic device operation failure
.
I did some more testing, and i does work correctly, i had some issues with some input files and a device with playback,
can say DoVi works correctly on AV1, with qvbr. The files play just fine the dovi rpu is also copied over.
For now my issue is solved for dovi stuff.
I think i just stick with hevc for now, as the hevc encoder get the files smaller for the same perceptual quality delivered, and av1 is not mature enough to handle hdr10+, and mostly the newer files come in some kind of hybrid for where HDr10+ and DV P8 are mixed to gether.
But i have an other question, but for that i will start a new thread as it is not related to this dovi and hdr10+ issues
Thnx for all the effort you put in solving these issues