Dolby Vision now possible through MP4 Mux.

Please post here for issues related to UHD discs
quietvoid
Posts: 371
Joined: Sun Apr 19, 2020 4:15 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by quietvoid »

johnjon94 wrote:
Sun Jan 22, 2023 11:42 pm
I would love to test a 64 bit build! I'm not sure if its because the Shield isn't compatible with this version, but when I install the Plex addon I just get an endless loading bar with the Plex logo
The Shield is indeed 64 bits. But also most addons are not Kodi 21 compatible.
So it might be the reason. I've never tried the Plex addon, but PlexKodiConnect doesn't support 21 officially.
As it is still early for 21, it's possible things still work fine.

I guess I'll make a 64 bits version later.
afarvvik
Posts: 14
Joined: Mon Jan 23, 2023 8:16 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by afarvvik »

hi

apologize if this question has been asked but the search excludes 2 letter terms like "lg" & "c8"

i want to mux dolby vision profile 5 & profile 8 mkv's to mp4 so that they can play on my lg c8 internal player/jellyfin.

i came across ffmpeg command from here
https://www.reddit.com/r/ffmpeg/comment ... fmpeg_and/

but the command

Code: Select all

ffmpeg -y -i input.mkv -map 0:v:0 -c copy -map 0:a -c copy -strict unofficial output.mp4 
did not work.

after a lot of tries i realised that the files were being muxed to "isom" codec for some reason even though the video codec was supposed to be copied. so when i added "-brand mp42" flag it worked & now i can mux profile 5 web-dl rips to mp4 using that (or at least the 1 file i've tried).

but profile 8 videos don't work.

for eg a file like this

Code: Select all

Format                                   : Matroska
Format version                           : Version 4
File size                                : 20.4 GiB
Duration                                 : 2 h 43 min
Overall bit rate                         : 17.9 Mb/s
Encoded date                             : UTC 2021-12-15 10:54:31
Writing application                      : mkvmerge v61.0.0 ('So') 64-bit
Writing library                          : libebml v1.4.2 + libmatroska v1.6.4

Video
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main 10@L5.1@High
HDR format                               : Dolby Vision, Version 1.0, dvhe.08.03, BL+RPU, HDR10 compatible / SMPTE ST 2086, HDR10 compatible
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 2 h 43 min
Bit rate                                 : 16.3 Mb/s
Width                                    : 1 920 pixels
Height                                   : 800 pixels
Display aspect ratio                     : 2.40: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.443
Stream size                              : 18.7 GiB (91%)
Writing library                          : x265 3.5+20-17839cc0d:[Windows][MSVC 1930][64 bit] 10bit
Encoding settings                        : cpuid=1111039 / frame-threads=4 / numa-pools=24 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=1920x800 / interlace=0 / total-frames=235628 / level-idc=51 / high-tier=1 / uhd-bd=0 / ref=6 / no-allow-non-conformance / repeat-headers / annexb / aud / no-eob / no-eos / hrd / info / hash=0 / no-temporal-layers / open-gop / min-keyint=23 / keyint=250 / gop-lookahead=0 / bframes=16 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=60 / lookahead-slices=0 / scenecut=40 / no-hist-scenecut / radl=0 / no-splice / no-intra-refresh / ctu=64 / min-cu-size=8 / no-rect / no-amp / max-tu-size=32 / tu-inter-depth=4 / tu-intra-depth=4 / limit-tu=4 / rdoq-level=2 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / max-merge=5 / limit-refs=1 / limit-modes / me=3 / subme=7 / merange=57 / temporal-mvp / no-frame-dup / no-hme / weightp / weightb / no-analyze-src-pics / deblock=-3:-3 / no-sao / no-sao-non-deblock / rd=6 / selective-sao=0 / no-early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=2.00 / no-rd-refine / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=crf / crf=12.5 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / vbv-maxrate=160000 / vbv-bufsize=160000 / vbv-init=0.9 / min-vbv-fullness=50.0 / max-vbv-fullness=80.0 / crf-max=0.0 / crf-min=0.0 / ipratio=1.30 / pbratio=1.20 / aq-mode=3 / aq-strength=1.00 / no-cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=0 / 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(8500,39850)B(6550,2300)R(35400,14600)WP(15635,16450)L(100000000,50) / cll=500,200 / min-luma=0 / max-luma=1023 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / hist-threshold=0.03 / no-opt-cu-delta-qp / no-aq-motion / hdr10 / hdr10-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=0 / analysis-save-reuse-level=0 / analysis-load-reuse-level=0 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=1 / 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 / no-field / qp-adaptation-range=1.00 / scenecut-aware-qp=0conformance-window-offsets / right=0 / bottom=0 / decoder-max-rate=0 / no-vbv-live-multi-pass
Default                                  : Yes
Forced                                   : No
Color range                              : Limited
Color primaries                          : BT.2020
Transfer characteristics                 : PQ
Matrix coefficients                      : BT.2020 non-constant
Mastering display color primaries        : BT.2020
Mastering display luminance              : min: 0.0050 cd/m2, max: 10000 cd/m2
Maximum Content Light Level              : 500 cd/m2
Maximum Frame-Average Light Level        : 200 cd/m2

Audio
ID                                       : 2
Format                                   : E-AC-3
Format/Info                              : Enhanced AC-3
Commercial name                          : Dolby Digital Plus
Format profile                           : Blu-ray Disc
Codec ID                                 : A_EAC3
Duration                                 : 2 h 43 min
Bit rate mode                            : Constant
Bit rate                                 : 1 536 kb/s
Channel(s)                               : 8 channels
Channel layout                           : L R C LFE Ls Rs Lb Rb
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Stream size                              : 1.76 GiB (9%)
Language                                 : English
Service kind                             : Complete Main
Default                                  : Yes
Forced                                   : No

Text
ID                                       : 3
Format                                   : UTF-8
Codec ID                                 : S_TEXT/UTF8
Codec ID/Info                            : UTF-8 Plain Text
Duration                                 : 2 h 26 min
Bit rate                                 : 27 b/s
Count of elements                        : 1104
Stream size                              : 29.8 KiB (0%)
Language                                 : English
Default                                  : No
Forced                                   : No

Menu
00:00:00.000                             : :Chapter 01
00:12:50.269                             : :Chapter 02
00:23:43.380                             : :Chapter 03
00:37:14.983                             : :Chapter 04
00:43:04.415                             : :Chapter 05
00:49:38.601                             : :Chapter 06
00:58:49.651                             : :Chapter 07
01:04:24.778                             : :Chapter 08
01:16:01.390                             : :Chapter 09
01:25:26.580                             : :Chapter 10
01:36:29.158                             : :Chapter 11
01:51:09.204                             : :Chapter 12
02:01:48.259                             : :Chapter 13
02:08:54.477                             : :Chapter 14
02:16:56.583                             : :Chapter 15
02:28:00.830                             : :Chapter 16

i came across @RESET_9999 spreadsheet & tried using tsmuxer. now those work in DV in m2ts format (ts format does not work) but issue is i cannot seek (rewind, FF etc) which is an issue if i want to go back or stop the movie & resume later. is there a particular tsmuxer flag or version that has to be used so that it works?

another user posted this but that google drive link is dead so dont know which version @tommo8 used.
viewtopic.php?p=89086#p89086

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

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

afarvvik wrote:
Mon Jan 23, 2023 8:53 pm
hi
apologize if this question has been asked but the search excludes 2 letter terms like "lg" & "c8"
i want to mux dolby vision profile 5 & profile 8 mkv's to mp4 so that they can play on my lg c8 internal player/jellyfin.
take a look at the script in my signature, there is an MP4 workflow for older LG TV... PM if you need help finding the tools that work with it.

IIRC you wont be able to FF/RW in a mp4 container because your file is encoded with "open-gop". Not sure about the C8 but that's how my C2 plex behaves.
TS/M2ts container will let you FF/RW open-gop encode but it will freeze a couple of seconds, you just have to be patient and give it time to resume.
Edworld
Posts: 15
Joined: Sat Apr 09, 2016 2:50 am

Re: Dolby Vision now possible through MP4 Mux.

Post by Edworld »

RESET_9999 wrote:
Fri Jan 20, 2023 6:16 pm
Edworld wrote:
Fri Jan 20, 2023 5:42 pm
Is there alternative way to have audio work? My makemkv only has one audio track

Thanks
you can disable the muxing at line 21 but later today i will post a new version that can mux all the audio/sub from the input (will only be for MKV though, tsmuxer is much more complicated)
Will the current beta work? and do I continue to do 4, 3?

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

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

Edworld wrote:
Mon Jan 23, 2023 11:02 pm
Will the current beta work? and do I continue to do 4, 3?
Thanks
the latest version should be able to mux all the input audio/subs if you take the TS version of the script and set line 23 - 25 to YES.
you must have this file in the tools folder and the input language must be supported. if your language is not in this file, it's not very complicated to edit it with notepad and add any tongue you wish.
https://drive.google.com/file/d/1xDMNcf ... share_link

anyway, if none of this work, as I said before, disable the muxing at line 21. Then when 4/3 has been completed, you can mux any audio/sub you want with tsmuxer. This will work for sure and for any input.
quietvoid
Posts: 371
Joined: Sun Apr 19, 2020 4:15 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by quietvoid »

johnjon94 wrote:
Sun Jan 22, 2023 11:42 pm
I would love to test a 64 bit build! I'm not sure if its because the Shield isn't compatible with this version, but when I install the Plex addon I just get an endless loading bar with the Plex logo
I've made new builds available here: https://github.com/quietvoid/xbmc/releases/tag/v21-dovi
There are both 32 bits and 64 bits APKs.

The only change from the last build is that the new build also fixes grey letterbox bars when playing cropped Dolby Vision videos for FireTV.

Info thread: https://forum.kodi.tv/showthread.php?tid=371557
caelar900
Posts: 4
Joined: Mon Jan 23, 2023 11:44 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by caelar900 »

RESET_9999 wrote:
Thu Jan 05, 2023 4:40 pm
I doubt this will ever be fixed and the different L1/L2 responses doesnt seem to affect actual content. Also, I don't think it's related to CMV2.9 vs CMV4.0 devices.

Here's my observations so far...
X800m2/x700:
L1 low contrast and L2 offset 0.75 doesnt work
no issue with "multi" pattern

Shield:
L2 offset 0.75 doesnt work
color issues (bug still there, checked recently)
issues with "multi" pattern (blue banding and clipping conversion issues)

C2 internal player:

all the L1/L2 metadata works
issues with "multi" pattern ( clipping conversion issues)
Movies with source max_pq 3696 (MDL 4000nits) look a lot darker than the x800/x700/shield: https://www.youtube.com/watch?v=sl_wopsmdmc

C8 internal player:
all the L1/L2 metadata works
No issue with "multi" pattern

FireTV cube latest gen and probably firestick max:
all the L1/L2 metadata works
issues with "multi" pattern (tracking issue)
overall darker image

Chromecast GTV (cmv2.9 device):
L1 optimal doesnt work
L2 looks quite different in LLDV than in tv-led
the first test showed that it produced a brighter image but I still have more tests to do.
https://slow.pics/c/pEEQBJJD
no issue with "multi" pattern but if you FF/RW, the pattern start flickering.



I know @quietvoid found out that the "multi" pattern "may" have luma issues but I'm not sure about that because I checked the other versions of the pattern and they all behave exactly the same.
So unless Stacey Spears did the same mistake for all the patterns, I believe this is just how the pattern is supposed to work and it truly exposes issues on devices (shield and C2)
They also all show 10 000 nits but it's only because of a couple of pixels in the middle of the frame. The pattern are really 600/1000/4000 or 10 000 nits so I redid all the versions without trim passes and with proper source_max pq and maxcll/fall. You can find them here: https://drive.google.com/drive/u/1/fold ... 52Ja3JEc7c
RESET_9999 wrote:
Mon Jan 09, 2023 11:59 pm
I made some new L1 test files. Something is definitely not working on the x800m2/x700, will do a side-by-side comparison video later...

The files have nine L1 metadata changes, it goes from max_pq 100nits to 10 000nits.
P5 version (≈700nits): https://drive.google.com/file/d/1AzIA9e ... share_link
P8 version (≈3600nits): https://drive.google.com/file/d/1yY33Df ... share_link
** you may have to remux them to TS or MKV

Image
So what's your latest opinion on L1 in real world content on the x700/x800m2. I can see the issues on the test patterns but want to know how much it really affects actual films.I personally have a 5.1.4 atmos setup so dont really wanna sacrifice audio and use the internal player on my cx but if T1 issues are truly causing perceptible issues with DV then maybe the trade off is worthwhile. Are you still personally exclusively using your c8/c2 over the x800m2? Thanks.
afarvvik
Posts: 14
Joined: Mon Jan 23, 2023 8:16 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by afarvvik »

RESET_9999 wrote:
Mon Jan 23, 2023 10:27 pm
afarvvik wrote:
Mon Jan 23, 2023 8:53 pm
hi
apologize if this question has been asked but the search excludes 2 letter terms like "lg" & "c8"
i want to mux dolby vision profile 5 & profile 8 mkv's to mp4 so that they can play on my lg c8 internal player/jellyfin.
take a look at the script in my signature, there is an MP4 workflow for older LG TV... PM if you need help finding the tools that work with it.

IIRC you wont be able to FF/RW in a mp4 container because your file is encoded with "open-gop". Not sure about the C8 but that's how my C2 plex behaves.
TS/M2ts container will let you FF/RW open-gop encode but it will freeze a couple of seconds, you just have to be patient and give it time to resume.
thanks for the reply @RESET_9999.

i'll check out the mp4 workflow.

TS/M2ts container is not letting me FF/RW at all. Jellyfin just freezes, the webos player says "function not available right now". is there a particular tsmuxer version that needs to be used?
afarvvik
Posts: 14
Joined: Mon Jan 23, 2023 8:16 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by afarvvik »

afarvvik wrote:
Mon Jan 23, 2023 8:53 pm

after a lot of tries i realised that the files were being muxed to "isom" codec for some reason even though the video codec was supposed to be copied. so when i added "-brand mp42" flag it worked & now i can mux profile 5 web-dl rips to mp4 using that (or at least the 1 file i've tried).
also i was too quick too make this conclusion, 1 profile 5 file worked with ffmpeg conversion another did not.
RESET_9999
Posts: 1853
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

caelar900 wrote:
Tue Jan 24, 2023 12:57 am
So what's your latest opinion on L1 in real world content on the x700/x800m2. I can see the issues on the test patterns but want to know how much it really affects actual films.I personally have a 5.1.4 atmos setup so dont really wanna sacrifice audio and use the internal player on my cx but if T1 issues are truly causing perceptible issues with DV then maybe the trade off is worthwhile. Are you still personally exclusively using your c8/c2 over the x800m2? Thanks.
since most movies have l2 trim passes, not much difference. The problem seem to be with L1 high max_pq values that have no effect.
ragico
Posts: 257
Joined: Fri Feb 15, 2019 1:09 am

Re: Dolby Vision now possible through MP4 Mux.

Post by ragico »

quietvoid wrote:
Tue Jan 24, 2023 12:42 am
johnjon94 wrote:
Sun Jan 22, 2023 11:42 pm
I would love to test a 64 bit build! I'm not sure if its because the Shield isn't compatible with this version, but when I install the Plex addon I just get an endless loading bar with the Plex logo
I've made new builds available here: https://github.com/quietvoid/xbmc/releases/tag/v21-dovi
There are both 32 bits and 64 bits APKs.

The only change from the last build is that the new build also fixes grey letterbox bars when playing cropped Dolby Vision videos for FireTV.

Info thread: https://forum.kodi.tv/showthread.php?tid=371557
I have installed your latest build on my firestick 4k max and the .ts files p5, p8 and p7 do not work anymore.
When I try to open any of them Kodi closes. Still works with mkv.
Before this update everything worked perfectly.
quietvoid
Posts: 371
Joined: Sun Apr 19, 2020 4:15 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by quietvoid »

ragico wrote:
Tue Jan 24, 2023 4:46 pm
I have installed your latest build on my firestick 4k max and the .ts files p5, p8 and p7 do not work anymore.
When I try to open any of them Kodi closes. Still works with mkv.
Before this update everything worked perfectly.
Thanks, I also get the crash for .ts.
I'll look into it later.

I found the issue, it seems I can't convert the RPU from .ts for now.
The arm-v7a release was updated, I'll do the other later.
It should fix the crash but .ts profile 7 won't be converted.
MastaG
Posts: 90
Joined: Thu Aug 08, 2019 11:40 am

Re: Dolby Vision now possible through MP4 Mux.

Post by MastaG »

Just a quick question.
Without using RESET_9999's scripts..

Lets say I have created my final hevc file.
And I want to pack it into a m2ts file with audio.
Can I just use tsmuxerGui to add the movie.hevc as the first track.
And then open the main playlist from the original bluray disc and add the TrueHD+ac3 core audio as second track.
Then just mux both tracks into a m2ts container.

The reason I'm asking is because my movie 1917 triggers DV on all devices but doesn't play audio.
Even when selecting the core ac3 one its all silent.

I notice many people are using eac3to but what for?
The audio is on the original bluray disc, why should I mess with it?
RESET_9999
Posts: 1853
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

afarvvik wrote:
Tue Jan 24, 2023 10:29 am
thanks for the reply @RESET_9999.
i'll check out the mp4 workflow.
TS/M2ts container is not letting me FF/RW at all. Jellyfin just freezes, the webos player says "function not available right now". is there a particular tsmuxer version that needs to be used?
then it's a jellyfin bug because you can FF/RW on the plex app with TS/m2ts files.

MastaG wrote:
Tue Jan 24, 2023 6:15 pm
Can I just use tsmuxerGui to add the movie.hevc as the first track.
And then open the main playlist from the original bluray disc and add the TrueHD+ac3 core audio as second track.
Then just mux both tracks into a m2ts container.
yes thats how you do it.
ragico
Posts: 257
Joined: Fri Feb 15, 2019 1:09 am

Re: Dolby Vision now possible through MP4 Mux.

Post by ragico »

quietvoid wrote:
Tue Jan 24, 2023 5:05 pm
ragico wrote:
Tue Jan 24, 2023 4:46 pm
I have installed your latest build on my firestick 4k max and the .ts files p5, p8 and p7 do not work anymore.
When I try to open any of them Kodi closes. Still works with mkv.
Before this update everything worked perfectly.
Thanks, I also get the crash for .ts.
I'll look into it later.

I found the issue, it seems I can't convert the RPU from .ts for now.
The arm-v7a release was updated, I'll do the other later.
It should fix the crash but .ts profile 7 won't be converted.
Yes working again but not P7 as you said.
Curious because before, everything was working perfectly, including P7 as I said a few posts before.
Post Reply