Dolby Vision now possible through MP4 Mux.

Please post here for issues related to UHD discs
Kaan_
Posts: 4
Joined: Fri Mar 29, 2024 8:39 am

Re: Dolby Vision now possible through MP4 Mux.

Post by Kaan_ »

RESET_9999 wrote:
Fri Mar 29, 2024 4:31 pm

I think you have a C1?

pattern: https://drive.google.com/file/d/1OhnEb_ ... drive_link
I have a Philips 808 and I think it's pretty much the same as C3. My tv shows colour space as RGB when the signal is RGB, probably a bug. I tried your pattern video and bt2020, bt.709 makes no difference again. The only thing I haven't tried is not signaling the flag at all, I think that's only in a special Coreelec build.

I took some photos:

Image
Image
Image
RESET_9999
Posts: 2093
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

bbeny123 wrote:
Sat Mar 30, 2024 6:23 pm
https://slow.pics/c/Hn8RGz0x - unfortunately i don't have a better camera than a smartphone.
To the naked eye they look the same to me.

And as for the color space, in reality there are only 2 squares of green more, the camera cuts off a few red ones.
Okay, the multi pattern image video comparison was done on 20.5 nightly 20240322 before the real content comparison.
For the real content comparison it was done on 20.5 nightly 20240329 and this build has no longer the tracking issue I saw in 20240322.

I flashed another drive to 21 and it's fine on this build too. So the pattern matches the output of the x800m2 and I'll edit out that part of the youtube video

EDIT: just to confirm, this is the tracking on 20.5 20240329
https://slow.pics/c/NBQVuXQw
Trees
Posts: 41
Joined: Sat Sep 03, 2022 8:04 am

Re: Dolby Vision now possible through MP4 Mux.

Post by Trees »

Does anyone know of any software that can losslessly splice P5 DV HEVC streams while keeping the P5 DV metadata in tact? Splicing on I-frames, obviously.

I tried to splice out advertisements from a Chinese WEB-DL with the latest version of Avidemux (v2.8.1) but the P5 DV metadata got lost so my TV just showed me the raw purple and green IPTPQC2 colour space. It went from:
MediaInfo wrote:[Video
ID : 256
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L5@Main
HDR format : Dolby Vision, Version 1.0, dvhe.05.06, BL+RPU
Codec ID : dvhe
Codec ID/Info : High Efficiency Video Coding with Dolby Vision
Duration : 43 min 42 s
Bit rate : 6 235 kb/s
Maximum bit rate : 54.5 Mb/s
Width : 3 840 pixels
Height : 1 634 pixels
Display aspect ratio : 2.35:1
Frame rate mode : Variable
Frame rate : 25.000 FPS
Minimum frame rate : 24.993 FPS
Maximum frame rate : 25.007 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.040
Stream size : 1.90 GiB (93%)
Title : mp4:stype=dvhe@GPAC2.1-DEV-revUNKNOWN_REV
Encoded date : UTC 2023-02-01 12:17:32
Tagged date : UTC 2023-02-01 12:18:09
Color range : Full
mdhd_Duration : 2622280
Codec configuration box : hvcC+dvcC
to:
MediaInfo wrote:Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L5@Main
Codec ID : hvc1
Codec ID/Info : High Efficiency Video Coding
Duration : 42 min 32 s
Source duration : 42 min 32 s
Bit rate : 5 952 kb/s
Maximum bit rate : 6 221 kb/s
Width : 3 840 pixels
Height : 1 634 pixels
Display aspect ratio : 2.35:1
Frame rate mode : Constant
Frame rate : 25.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.038
Stream size : 1.77 GiB (89%)
Source stream size : 1.85 GiB (93%)
Color range : Full
mdhd_Duration : 2552120
Codec configuration box : hvcC
RESET_9999
Posts: 2093
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

Kaan_ wrote:
Sat Mar 30, 2024 6:29 pm
The only thing I haven't tried is not signaling the flag at all, I think that's only in a special Coreelec build.
All the CE versions I tried are not sending any color flags. It's either a bt2020 flag or no flag. I don't think there is a build that send a bt709 flag, that wouldn't make sense.
BTW, I just tested the latest nightly CE-21 and my vertex and tv osd are not signaling any flag as they should just like my x800m2 and the colors are 100% identical.

The people saying it requires a bt2020 flag is basically the same as saying that all these devices are wrong :x700 x800m2 oppo shield AppleTV, firestick/cube, chromecast gtv ... Sounds very unlikely to me.
Kaan_
Posts: 4
Joined: Fri Mar 29, 2024 8:39 am

Re: Dolby Vision now possible through MP4 Mux.

Post by Kaan_ »

I stand corrected. :D So great to hear we have a great device on our hands.

Still on 20.5 latest nightly though, 21 is not stable with some movies. Like 1917.
cpm00
Posts: 5
Joined: Sun Mar 31, 2024 9:47 am

Re: Dolby Vision now possible through MP4 Mux.

Post by cpm00 »

Hello,

Thanks for testing this out.

On the face of it HDMI is just 0's and 1's so the same will be the same - finding the cause of diff is the fun bit / or maybe the cause of madness :D

Could I ask how you are determining no colorimetry / extended colorimetry is being sent in your tests? Are you peeking the data using an HDFurry or some other such device between the box and the TV?

From a code perspective if not explicitly setting for bt.2020 it will fall back to logic which will set the HDMI AVI Info Frame (sent before each image frame to the TV) to be bt.709

You can see this also in Kodi - on screen or looking into the AMLogic driver parameters that bt.709 is being set - I see no-where where it would strip that again before sending out the box.

What I would suspect is the older TV where still respecting this flag somewhere in the processing, newer TV and DoVi implementations should ignore it and likely not confuse people by showing it on screen either once duly ignored.

The interesting point for me is in the AMLogic code, there is also an explicit note/comment to set this, appears to be coming directly from Dolby (possibly to cater for the older TV / implementations - or ones they knew would not ignore this TV side) though yet to find a copy of that doc and what it actually say under section 4.4.1.

/* Dolby Vision Source System-on-Chip Platform Kit Version 2.6: * 4.4.1 Expected AVI-IF for Dolby Vision output, need BT2020 for DV */
Along side explicit code to then make sure it is set for Tunnelling IPT.

Side note: When i changed the code to clear out the flag completely - the TV looked the same as when it was set code-side to bt.709.

Check page 34 in the below pdf for details on why it would default to bt.709 from an HDMI perspective (note - this is the exact resolution based logic which is making it set to bt.709 in the AMLogic implementation, if not setting to bt.2020), obviously though Dolby knows better and just using HDMI as a Tunnel for its own IPT 12bit data.

https://picture.iczhiku.com/resource/ee ... prgNxm.pdf

One other thing not yet looked into is the content type flag in the Info Frame - I doubt TV's take this into consideration these days with all the TV side controls but maybe worth checking.
Last edited by cpm00 on Sun Mar 31, 2024 3:12 pm, edited 1 time in total.
cpm00
Posts: 5
Joined: Sun Mar 31, 2024 9:47 am

Re: Dolby Vision now possible through MP4 Mux.

Post by cpm00 »

See from your pervious post you have a HDFury Vertex

In the Vertex Utility - you can grab the AVI InfoFrame (as per page 34 here: https://www.hdfury.com/docs/HDfuryVertex.pdf)
(Which I am sure you know)

Could you please ping over the values in the captured AVI InfoFrame for when setting the flag to Y and for N i.e.:

echo Y > /sys/module/hdmitx20/parameters/dovi_tv_led_bt2020

echo N > /sys/module/hdmitx20/parameters/dovi_tv_led_bt2020

thanks.
RESET_9999
Posts: 2093
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

cpm00 wrote:
Sun Mar 31, 2024 10:31 am

Could I ask how you are determining no colorimetry / extended colorimetry is being sent in your tests? Are you peeking the data using an HDFurry or some other such device between the box and the TV?
Yes, all the tests I did were with the hdfury vertex in the chain and the ugoos reports the same RGB 8bit DV signal as all my devices.
I don't know from a code perspective and maybe it doesn't matter for the newer TVs but in the tests I did years ago on my LG C8, a RGB signal without FLAG matched the colors of the TV's internal app while the signal with bt2020 introduced some slight color shift in RED and Yellow.

This is on CE-21 connected to the LG C2:

Image


And this is CE-20.5 connected to the 2023 Hisense u8 TV. I suspect this TV(and some others) is just guessing REC709 on its OSD because there's no information on the actual signal it's receiving:

Image

EDIT. last pics on is actually the atv, shield or x800m2, I don't remember...
this is on ugoos + Hisense:

Image
bbeny123
Posts: 12
Joined: Tue Aug 01, 2023 6:33 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by bbeny123 »

There is one more difference between the signal from x800m2 and Ugoos, at least according to the Sony A95L OSD.
The signal from the x800m2 shows neither color space nor color depth - with the signal from Ugoos OSD shows 8bit.
RESET_9999
Posts: 2093
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

yep, there's a difference in the signal...

see: https://discourse.coreelec.org/t/dolby- ... /24273/960
sw5163
Posts: 146
Joined: Sat Jun 25, 2022 7:28 am

Re: Dolby Vision now possible through MP4 Mux.

Post by sw5163 »

Trees wrote:
Sat Mar 30, 2024 10:08 pm
Does anyone know of any software that can losslessly splice P5 DV HEVC streams while keeping the P5 DV metadata in tact? Splicing on I-frames, obviously.
You could try:

Code: Select all

ffmpeg -f concat -i "filelist.txt" -c copy -strict -2 test.mp4
filelist.txt:

Code: Select all

file 1.mp4
file 2.mp4
I won't guarantee it will work though.
Trees wrote:
Fri Mar 29, 2024 8:17 pm
Edit: Bonus question; does MP4 only support one subtitle track? I've remuxed numerous files however ffmpeg only seems to be copying over one subtitle track; is the subtitle part of the command incorrect or does MP4 just not support more than one subtitle track?
Your command is redundant btw. To include all tracks and keep DV just use:

Code: Select all

ffmpeg -i dv.mkv -map 0 -c copy -c:s mov_text -strict -2 dv.mp4
RESET_9999 wrote:
Sun Mar 31, 2024 4:28 pm
yep, there's a difference in the signal...
Backward compatibility for Dolby RGB tunneling is really a mess.
Donpoku
Posts: 62
Joined: Wed Jul 03, 2019 3:43 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by Donpoku »

RESET_9999 wrote:yep, there's a difference in the signal...

see: https://discourse.coreelec.org/t/dolby- ... /24273/960
Hi I have DV remux mkv, I want to test it on my lg c6 (old i know), what's the simplest way to do it? Thank you.

Sent from my SM-F946B using Tapatalk

RESET_9999
Posts: 2093
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

Donpoku wrote:
Mon Apr 01, 2024 12:34 pm
Hi I have DV remux mkv, I want to test it on my lg c6 (old i know), what's the simplest way to do it? Thank you.

Sent from my SM-F946B using Tapatalk
AFIAK, 2016-2017 TVs only support profile 5 and 7 so for an mkv remux , you want to convert it to dual-track dual-layer MP4. You can do that with my script workflow 4-3.
I think the C6 internal player also have green screen issues with certain files, P3 MDL IIRC. It was discussed in this thread years ago.
Donpoku
Posts: 62
Joined: Wed Jul 03, 2019 3:43 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by Donpoku »

RESET_9999 wrote:
Donpoku wrote:
Mon Apr 01, 2024 12:34 pm
Hi I have DV remux mkv, I want to test it on my lg c6 (old i know), what's the simplest way to do it? Thank you.

Sent from my SM-F946B using Tapatalk
AFIAK, 2016-2017 TVs only support profile 5 and 7 so for an mkv remux , you want to convert it to dual-track dual-layer MP4. You can do that with my script workflow 4-3.
I think the C6 internal player also have green screen issues with certain files, P3 MDL IIRC. It was discussed in this thread years ago.
Thanks buddy.

Btw what are the steps and installs I need to do to use your scripts? Thanks I'm on Windows.

Sent from my SM-F946B using Tapatalk

RESET_9999
Posts: 2093
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

Donpoku wrote:
Mon Apr 01, 2024 3:57 pm

Btw what are the steps and installs I need to do to use your scripts? Thanks I'm on Windows.

Sent from my SM-F946B using Tapatalk
If you just want to make DT-DL MP4, the installation is very easy... Create a folder without space or special characters and put it on a non-OS drive preferably.
Download the tools pack and MP4 bat file and put them in the folder you just created. Run the bat file, select 4-3, drag and drop input and that's it
Post Reply