Dolby Vision now possible through MP4 Mux.

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

Re: Dolby Vision now possible through MP4 Mux.

Post by quietvoid »

NiCE77 wrote:
Fri Jan 20, 2023 7:51 am
Can this conversion code under Kodi be found in one of the github repos?
https://github.com/quietvoid/xbmc/tree/libdovi_build
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:
Thu Jan 12, 2023 4:35 pm
Edworld wrote:
Thu Jan 12, 2023 4:32 am
I ran the tool using 4-3 once with DD+ and once without, and I get no audio with BTTF. The video does play in Dolby Vision.
Your input must have lossless audio(THD or DTS) i think. Also , no need to convert DDP audio for the x800m2.
Is there alternative way to have audio work? My makemkv only has one audio track

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 »

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)
sw5163
Posts: 146
Joined: Sat Jun 25, 2022 7:28 am

Re: Dolby Vision now possible through MP4 Mux.

Post by sw5163 »

sw5163 wrote:
Tue Jan 17, 2023 5:41 pm
I would also like to ask if there is a way to merge 12 single channel WAV files into 7.1.4 multi-channel PCM or WAV.
I tried FFmpeg's amerge but I don't know how to merge the over head channel.
To be honest, I don't know anything about audio encoding, and I have no idea what I'm doing.
Feel free to test this 7.1.4.wav on ATV or QuickTime.
5.1.4.wav

I'm still struggling on experimenting FFmpeg's command.
The current command I used to get that file

Code: Select all

ffmpeg -i "12_Channel_ID 1.wav" -i "12_Channel_ID 2.wav" -i "12_Channel_ID 3.wav" -i "12_Channel_ID 4.wav" -i "12_Channel_ID 5.wav" -i "12_Channel_ID 6.wav" -i "12_Channel_ID 7.wav" -i "12_Channel_ID 8.wav" -i "12_Channel_ID 9.wav" -i "12_Channel_ID 10.wav" -i "12_Channel_ID 11.wav" -i "12_Channel_ID 12.wav" -c pcm_s32le -filter_complex "join=inputs=12:channel_layout=7.1+TFL+TFR+TBL+TBR:map=0.0-FL|1.0-FR|2.0-FC|3.0-LFE|4.0-BL|5.0-BR|6.0-SL|7.0-SR|8.0-TFL|9.0-TFR|10.0-TBL|11.0-TBR" 7.1.4.wav
The last four "front left, front right, back left, back right" should play in TFL, TFR, TBL, TBR.
ChromePlanet
Posts: 7
Joined: Sat Dec 03, 2022 11:24 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by ChromePlanet »

Forgive me if I sound like an idiot, but I thought I was already getting Dolby Vision-encoded MKV files from MakeMKV. They are showing up in my Plex Media Server as having both Dolby Vision and HDR-10. This was ripped from MakeMKV with an LG drive to a TS folder for archiving, then used MakeMKV again to rip the TS folder into MKV files.
Attachments
Screenshot 2023-01-21 at 7.58.35 AM.png
Screenshot 2023-01-21 at 7.58.35 AM.png (1.85 MiB) Viewed 29753 times
DylanValenti
Posts: 36
Joined: Sat Dec 19, 2020 9:42 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by DylanValenti »

Anyone know what I'm doing wrong here?

Code: Select all

 Choose a mode...

1) MODE.I=  DoVi Convert/Edit/Sync/Inject two inputs (P8 Hybrid maker)
2) MODE.F=  DoVi Fix/Extract/Info/Edit/Verify 1 input (doesn't convert the profile)
3) MODE.H=  DoVi Maker (from HDR10 madVR or HDR10plus)
4) MODE.P=  Profile 7 Input (MKV/BDMV)
5) MODE.B=  Dovi Batch tsMuxer: MKV/MP4 to TS
6) MODE.M=  MIXED: Remover/Measurer/Plotter/Audio/Player and more...
7) MODE.M4= MP4 Workflows
8) Exit

Choice? [1,2,3,4,5,6,7,8]?1
                                         *********************
                                         * CHOOSE A WORKFLOW *
                                         *********************

1) Workflow.1= Base Layer file + ST P5/P8/P7 DoVi file (can also mux and convert audio)
2) Workflow.2= Batch convert/inject to Profile 8 up to 13 Profile 5 videos + MUX
3) Workflow.3= back to the main menu

Choice? [1,2,3]?1
A subdirectory or file C:\Users\dylanvalenti\Desktop\Script_Stuff\TEMP_folder already exists.
--------------------------------------------------------------------------------------------------
-- This workflow inject / convert / edit DV from any P5/P8/P7 source to an HDR10 BL
-- Can do BL + P5_DV / BL + P8_DV / BL + P7_DV and the output will always be Profile 8
-- Can Crop, Edit L5/L6/min.max_pq and Resync
-- If selected, it converts THD(if present) to THD+ac3 and lossless audio to DDP(can be disable)
-- Will mux to TS if you decide to convert the audio.(can be disable)
-- Input can be MKV/TS/M2TS/MP4/HEVC/H265/RPU/XML
--------------------------------------------------------------------------------------------------
  Drag and drop an HDR10 file(BL)(MKV/TS/M2TS/HEVC/H265)and press enter...
"Z:\DV Hybrid Projects\Baby_Driver\Baby_Driver_HDR10.hevc"
  Drag and drop a Dolby Vision file (RPU/XML/MKV/MP4/TS/M2TS/HEVC/H265) and press enter...
"Z:\DV Hybrid Projects\Baby_Driver\Baby_Driver_DV.hevc"
  Do you want to re-sync the RPU? choices are duplicate=d or remove=r and/or press enter...

  Do you want to edit L6 and source max/min_pq... y or n ? (Default=n) and/or press enter...
y
mkvmerge v71.1.0 ('Fortitude') 64-bit
'Z:\DV Hybrid Projects\Baby_Driver\Baby_Driver_DV.hevc': Using the demultiplexer for the format 'HEVC/H.265'.
'Z:\DV Hybrid Projects\Baby_Driver\Baby_Driver_DV.hevc' track 0: Using the output module for the format 'HEVC/H.265 (unframed)'.
The file 'C:\Users\dylanvalenti\Desktop\Script_Stuff\TEMP_folder\1.mkv' has been opened for writing.
'Z:\DV Hybrid Projects\Baby_Driver\Baby_Driver_DV.hevc' track 0: Extracted the aspect ratio information from the video bitstream and set the display dimensions to 3840/2160.
Progress: 0%
The cue entries (the index) are being written...
Multiplexing took 0 seconds.
Extracting track 0 with the CodecID 'V_MPEGH/ISO/HEVC' to the file 'C:\Users\dylanvalenti\Desktop\Script_Stuff\TEMP_folder\temp.vid.hevc'. Container format: HEVC/H.265 elementary stream
Progress: 100%
Reordering metadata... Done.
  Do you want to crop RPU... y or n ? (Default=n) and/or press enter...



        **************
        * INPUT INFO *
        **************

--> L5 Left offset: L5_is_missing_you_should_edit...
--> L5 Right offset: L5_is_missing_you_should_edit...
--> L5 Top offset: L5_is_missing_you_should_edit...
--> L5 Bottom offset: L5_is_missing_you_should_edit...
--> DoVi Profile: 8
--> L2 trims: YES (100nits)
--> DoVi source min_pq: 50 nits
--> DoVi source max_pq: 4000 nits
--> HDR10 BL input MDL: "min: 0.0050 cd/m2, max: 4000 cd/m2"


  Manual or Auto L5... a or m ? and/or press enter...
m
  Set the left border... choose a number and press enter...
0
  Set the right border... choose a number and press enter...
0
  Set the top border... choose a number and press enter...
276
  Set the bottom border... choose a number and press enter...
276
Parsing RPU file...
Exporting metadata...
Done.
[{"dovi_profile":8
Reordering metadata... Done.
min: 0.0050 cd/m2, max: 4000 cd/m2
Error: unknown field `length`, expected one of `mode`, `remove_cmv4`, `remove_mapping`, `min_pq`, `max_pq`, `active_area`, `remove`, `duplicate`, `scene_cuts`, `level6`, `level9`, `level11`, `level255`, `source_rpu`, `rpu_levels` at line 5 column 12
Press any key to continue . . .
RESET_9999
Posts: 2093
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

DylanValenti wrote:
Sun Jan 22, 2023 2:28 pm
update to the latest version of the script (beta).
some functions(like L6 editing) dont work with the latest Dovi_tool version and dovi_script 1.7.1 or older...
or downgrade dovi_tool
DylanValenti
Posts: 36
Joined: Sat Dec 19, 2020 9:42 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by DylanValenti »

RESET_9999 wrote:
Sun Jan 22, 2023 2:36 pm
DylanValenti wrote:
Sun Jan 22, 2023 2:28 pm
update to the latest version of the script (beta).
some functions(like L6 editing) dont work with the latest Dovi_tool version and dovi_script 1.7.1 or older...
or downgrade dovi_tool
Will do, thanks! I’ll report back later if that worked
quietvoid
Posts: 373
Joined: Sun Apr 19, 2020 4:15 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by quietvoid »

ragico wrote:
Thu Jan 19, 2023 11:37 pm
Thanks. When ready, pls share your 21 build.
Here's a build on top of https://github.com/xbmc/xbmc/pull/22546, which also disables HDR10+.
https://mega.nz/file/pZln1IhT#QlMIyPOhW ... 6LidHO1Xqg

There's a setting in the Video section named "Convert Dolby Vision for compatibility".
It converts profile 7 only RPUs to profile 8.1, and also ignores the EL (in case of single track).

This solves the blank screens when playing FEL files on FireTV Stick (4K and 4K Max), and possibly also the Cube.

If anyone's interested in testing on other devices, I could do a 64 bits build.
ragico
Posts: 258
Joined: Fri Feb 15, 2019 1:09 am

Re: Dolby Vision now possible through MP4 Mux.

Post by ragico »

quietvoid wrote:
Sun Jan 22, 2023 4:22 pm
ragico wrote:
Thu Jan 19, 2023 11:37 pm
Thanks. When ready, pls share your 21 build.
Here's a build on top of https://github.com/xbmc/xbmc/pull/22546, which also disables HDR10+.
https://mega.nz/file/pZln1IhT#QlMIyPOhW ... 6LidHO1Xqg

There's a setting in the Video section named "Convert Dolby Vision for compatibility".
It converts profile 7 only RPUs to profile 8.1, and also ignores the EL (in case of single track).

This solves the blank screens when playing FEL files on FireTV Stick (4K and 4K Max), and possibly also the Cube.

If anyone's interested in testing on other devices, I could do a 64 bits build.
Thank you very much. Your build works like a charm and the "Convert Dolby Vision for compatibility" is really amazing.
johnjon94
Posts: 35
Joined: Thu Nov 11, 2021 5:59 am

Re: Dolby Vision now possible through MP4 Mux.

Post by johnjon94 »

quietvoid wrote:
Sun Jan 22, 2023 4:22 pm
ragico wrote:
Thu Jan 19, 2023 11:37 pm
Thanks. When ready, pls share your 21 build.
Here's a build on top of https://github.com/xbmc/xbmc/pull/22546, which also disables HDR10+.
https://mega.nz/file/pZln1IhT#QlMIyPOhW ... 6LidHO1Xqg

There's a setting in the Video section named "Convert Dolby Vision for compatibility".
It converts profile 7 only RPUs to profile 8.1, and also ignores the EL (in case of single track).

This solves the blank screens when playing FEL files on FireTV Stick (4K and 4K Max), and possibly also the Cube.

If anyone's interested in testing on other devices, I could do a 64 bits build.
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
quietvoid
Posts: 373
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: 2093
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
Post Reply