Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > High Efficiency Video Coding (HEVC)

Reply
 
Thread Tools Search this Thread Display Modes
Old 28th December 2024, 17:01   #1001  |  Link
Grimm
Registered User
 
Join Date: Jun 2022
Posts: 5
Please add an option to skip unsupported subtitles when converting mkv to mp4 and convert the video instead
Grimm is offline   Reply With Quote
Old 30th December 2024, 11:32   #1002  |  Link
matey
Registered User
 
Join Date: May 2024
Posts: 6
Quote:
Originally Posted by Fuso View Post
Sure...

1. I use the latest tsmuxer (Nightly build from 2024-06-06-02-00-53) to extract the video and audio from MKV source.

2. Mux the .hevc and .ec3/.ac3 to profile 5 mp4

this is the script that I use
Code:
mp4muxer --dv-profile 5 --input-file 1.hevc --input-video-frame-rate 24000/1001 --input-file 1.ec3 --media-lang eng --output-file MOVIE.mp4
pause
you can change the framerate depending on the source, also the audio file extension to ac3.
I can't remember which version of the mp4muxer I use.

3. Then I rename the output file from .mp4 to .mkv. The output file is profile 5 with codec ID dvhe which will not play on non-DoVi TV like Samsung.

4. I use the DDVT_MKVTOMP4 script to convert the renamed file again to mp4, but this time it will have codec ID hev1.

I'm sure this not the perfect or correct way to do this, but for my needs it's enough.
Maybe someone can tell me a way of directly muxing the video and audio to Profile 5 mp4 with codec ID hev1.
thanks very much for that.

when you get the chance if you could please let me know which version of mp4muxer you use so i can be sure and use that version.

appreciate it, cheers.
matey is offline   Reply With Quote
Old 30th December 2024, 15:58   #1003  |  Link
-QfG-
QfG Group Germany
 
-QfG-'s Avatar
 
Join Date: Oct 2018
Location: Germany
Posts: 275
Quote:
The output file is profile 5 with codec ID dvhe which will not play on non-DoVi TV like Samsung.
Profile 5 files will never played correctly on non-dv TVs like samsung. The base layer from L5 profiles uses not the HDR10 colorrrange BT.2020. L5 uses the DoVi specific colorrange ICtCp.

Quote:
Please add an option to skip unsupported subtitles when converting mkv to mp4 and convert the video instead
I don't know the switches for FFMPEG to skip all non text subtitles, sorry

Also new release with many bugfixes:

Quote:
-v0.64.2
*Major Bugfixes.
*FIXED MediaInfo bugs with AV1/VP1
-QfG- is offline   Reply With Quote
Old 31st December 2024, 01:17   #1004  |  Link
Fuso
Registered User
 
Join Date: Dec 2010
Posts: 36
Quote:
Originally Posted by matey View Post
thanks very much for that.

when you get the chance if you could please let me know which version of mp4muxer you use so i can be sure and use that version.

appreciate it, cheers.
Here, I will upload it.


Quote:
Originally Posted by -QfG- View Post
Profile 5 files will never played correctly on non-dv TVs like samsung. The base layer from L5 profiles uses not the HDR10 colorrrange BT.2020. L5 uses the DoVi specific colorrange ICtCp.
I know that. But my output has HDR10 as a base layer.

Code:
HDR format                  : Dolby Vision, Version 1.0, dvhe.05.06, BL+RPU / SMPTE ST 2086, HDR10 compatible
Codec ID                    : hev1
Attached Files
File Type: rar mp4muxer.rar (92.2 KB, 135 views)
Fuso is offline   Reply With Quote
Old 31st December 2024, 08:05   #1005  |  Link
GodzilaAvenger
Registered User
 
GodzilaAvenger's Avatar
 
Join Date: Jul 2022
Posts: 140
Quote:
Originally Posted by Fuso View Post
I know that. But my output has HDR10 as a base layer.
Are you sure that the DV is played and interpreted correcrly? Because as QfG said a P5 RPU is not compatible with a BT.2020 (HDR10) base layer. You can inject the RPU into the base layer but the result would be all mangled up as far as brightness and color accuracy are concerned.

What happens if you convert the P5 RPU to a P8 RPU using dovi_tool and inject that into the base layer? Can you spot any differences?
GodzilaAvenger is offline   Reply With Quote
Old 31st December 2024, 11:21   #1006  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,295
Quote:
Originally Posted by Fuso View Post
Here, I will upload it.
Microsoft 'Windows Security' has detected a virus...
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 2nd January 2025, 17:25   #1007  |  Link
-QfG-
QfG Group Germany
 
-QfG-'s Avatar
 
Join Date: Oct 2018
Location: Germany
Posts: 275
Quote:
Originally Posted by Fuso View Post
But my output has HDR10 as a base layer.

Code:
HDR format                  : Dolby Vision, Version 1.0, dvhe.05.06, BL+RPU / SMPTE ST 2086, HDR10 compatible
Codec ID                    : hev1
HDR10 layers and P5 RPUs incompatible. Why not simply transform Profile 5 from RPU to Profile 8 and mux this correct RPU into HDR10 stream?

Also the mp4muxer.exe from @Fuso is clean, false positives from Windows Security:
https://www.virustotal.com/gui/file/...49b4d1da47d1b3

Quote:
Are you sure that the DV is played and interpreted correcrly? Because as QfG said a P5 RPU is not compatible with a BT.2020 (HDR10) base layer.
That says Dolby Laboratories, not QfG
https://professionalsupport.dolby.co...language=en_US
page 13

Quote:
For profile 5:
• VUI information is optional for a profile 5 bitstream. If VUI are present, as of this specification, there
are two options that may be used: 1,2,2,2,0 and 1,9,16,15,0. The values of 2 are compliant with the
VUI definition in ITU-T H.265, where the 2s represent unspecified.
• Within the Dolby Vision context, a profile 5 bitstream must use perceptual quantization with reshaping
for the transfer characteristic, even if setting the transfer characteristic value to 16, uses Dolby Vision
previously proprietary IPT color space (now known as IPT-PQ-C2) for color primaries, uses full range
for range, and, by default, uses center-left siting for chroma sample location.
As defined in SMPTE ST 2128:2023, IPT-PQ-C2, previously a Dolby Vision proprietary color space, is
similar to BT.2100 ICtCp, where I is similar to I, P similar to Cp, and T similar to Ct
. As of the date of this
specification, the MPEG Joint Video Experts Team (JVET) working group has standardized the code
point for this previously proprietary color space, also known as IPT-PQ-C2, using code point 15
btw. little bugfix in DDVT:

Quote:
-v0.64.3a
*FIXED Problems with files that contains "()" in filename.

Last edited by -QfG-; 2nd January 2025 at 17:55.
-QfG- is offline   Reply With Quote
Old 2nd January 2025, 21:23   #1008  |  Link
matey
Registered User
 
Join Date: May 2024
Posts: 6
can anyone who had downloaded the mp4muxer from @fuso please let me know which version it is, i will be needed the linux arm64 version so I want to look for & download that version. thanks
matey is offline   Reply With Quote
Old 4th January 2025, 20:33   #1009  |  Link
Fuso
Registered User
 
Join Date: Dec 2010
Posts: 36
Quote:
Originally Posted by matey View Post
can anyone who had downloaded the mp4muxer from @fuso please let me know which version it is, i will be needed the linux arm64 version so I want to look for & download that version. thanks
MP4muxer version: v1.3.3 (build: Aug 6 2023)


The RPU is P8, I think the files that I "produce" are the so called "fake profile 5".

The source MKV has this info:
Code:
Video
ID                          : 1
Format                      : HEVC
Format/Info                 : High Efficiency Video Coding
Format profile              : Main 10@L5@Main
HDR format                  : Dolby Vision, Version 1.0, dvhe.08.06, BL+RPU, HDR10 compatible / SMPTE ST 2094 App 4, Version 1, HDR10+ Profile B compatible
Codec ID                    : V_MPEGH/ISO/HEVC
1. I demux the video and the audio with tsmuxer.
2. The extracted .hevc and .ec3 files I mux with the following line:
Code:
mp4muxer --dv-profile 5 --input-file 1.hevc --input-video-frame-rate 24000/1001 --input-file 1.ec3 --media-lang eng --output-file MOVIE.mp4
pause
The ouptut MOVIE.mp4 looks like that:
Code:
Video
ID                          : 1
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 / SMPTE ST 2094 App 4, Version 1, HDR10+ Profile B compatible
Codec ID                    : dvhe
Codec ID/Info               : High Efficiency Video Coding with Dolby Vision
3. And since files with Codec ID: dvhe can't be playes on a Samsung TVs (I haven't tested other brands), I rename the MOVIE.mp4 to MOVIE.mkv and then use the QfG's script DDVT_MKVTOMP4

Code:
 powered by quietvoids tools                                                                  Copyright (c) 2021-2024 QfG

                                        ====================================
                                             Dolby Vision Tool MKVtoMP4
                                        ====================================


 == VIDEO INPUT =========================================================================================================

Filename   = [MOVIE.mkv]
Video Info = [Resolution = 3840x1600] [Codec = HEVC-10Bit-YUV-4:2:0] [Frames = 199736] [FPS = 23.976]
HDR Info   = [HDR, HDR10+, Dolby Vision Profile 5]

HDR10+ Metadata found.
Dolby Vision Profile 5 found.

Be sure that there no picture based subtitles in your MKV file (PGS or VobSub)
Only textbased subtitles supported.

Please check your Audio Codec and the MP4 specifications. You can switch the
Audio Codec if the source is not compatible with MP4 container.

 == MENU ================================================================================================================

1. Audio Codec                    : [Untouched]

S. START

Change Settings and press [S] to start Converting
Select a Letter 1,[S]tart
and the final ouput MOVIE.mp4:
Code:
Video
ID                          : 1
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 / SMPTE ST 2094 App 4, Version 1, HDR10+ Profile B compatible
Codec ID                    : hev1
Codec ID/Info               : High Efficiency Video Coding
I did try to mux directly to Codec ID: hev1 at step 2, but it didn't work with one of the following (or both) - --dv-bl-compatible-id, --hvc1flag.

I've asked many times before not only on this forum but no one could give me a solution for playing HDR10/HDR10+/DoVi hybrid files on both Samsung and LG (old and new). The whole shenanigans is needed because the old LGs can't play DoVi Profile 8 with Codec ID: hev1, it plays in regular HDR. But when the file is DoVi Profile 5 with Codec ID: hev1 it plays in Dolby Vision, and the same file plays on Samsung TV in HDR10/HDR10+, and if video is real Profile 5 will play in green and purple colors.
So I figured out for myself and so far I haven't noticed anything wrong when playing on all of the TVs.

Last edited by Fuso; 4th January 2025 at 20:48.
Fuso is offline   Reply With Quote
Old 4th January 2025, 23:18   #1010  |  Link
GodzilaAvenger
Registered User
 
GodzilaAvenger's Avatar
 
Join Date: Jul 2022
Posts: 140
That's really interesting, thanks for sharing!
GodzilaAvenger is offline   Reply With Quote
Old 5th January 2025, 04:09   #1011  |  Link
skydalimit
Registered User
 
Join Date: Aug 2024
Posts: 2
I've got a Hybrid MP4 movie that contains HDR + DV Profile 7. I need to convert the DV to Profile 8 (keeping HDR). Do I use the Hybrid Script and add the same file twice, or do I need to use the Demuxer script and do extra steps?
skydalimit is offline   Reply With Quote
Old 5th January 2025, 11:35   #1012  |  Link
cool advertise
Registered User
 
cool advertise's Avatar
 
Join Date: Aug 2008
Location: Italy
Posts: 51
@-QfG-
Bug (v0.64.3b).
If you try to demux with DDVT_DEMUXER, the single Enhancement Layer of a dolby vision profile 7, and want to convert it to profile 8 (cropping it) you will not get the rpu, but an error.
In previous versions it worked, but now it doesn't.
cool advertise is offline   Reply With Quote
Old 5th January 2025, 23:50   #1013  |  Link
mikeq
Hidef Junkie
 
Join Date: Dec 2007
Location: San Jose, CA
Posts: 11
Question about the various MaxCLLs

So if I look at Jaws remux
MaxCLL in MediaInfo is 1000,259
and from the RPU summary:
RPU content Light Level (L1) is 9977,251
L6 Metadata is 4001,597

Why are these numbers all different?
mikeq is offline   Reply With Quote
Old 6th January 2025, 18:15   #1014  |  Link
-QfG-
QfG Group Germany
 
-QfG-'s Avatar
 
Join Date: Oct 2018
Location: Germany
Posts: 275
Quote:
-v0.64.3c
*FIXED Errors in demuxing combinations in DEMUXER script.
*FIXED Some errors in MediaInfo with DL files.
*FIXED L6 Error (L6 SWITCH) in Injector script.
*FIXED If changing FPS with Injector and EL is input, FPS from EL changed, too.
*ADDED Option in Injector script for writing RPU L6 Data as HDR bitstream data.
*Minor Bugfixes.
Quote:
Bug (v0.64.3b).
If you try to demux with DDVT_DEMUXER, the single Enhancement Layer of a dolby vision profile 7, and want to convert it to profile 8 (cropping it) you will not get the rpu, but an error.
In previous versions it worked, but now it doesn't.
Thanks, fixed in 0.64.3c
-QfG- is offline   Reply With Quote
Old 6th January 2025, 18:44   #1015  |  Link
cool advertise
Registered User
 
cool advertise's Avatar
 
Join Date: Aug 2008
Location: Italy
Posts: 51
Bug (v0.64.3b).
If you try to demux with DDVT_DEMUXER, the single Enhancement Layer of a dolby vision profile 7, and want to convert it to profile 8 (cropping it) you will not get the rpu, but an error.
In previous versions it worked, but now it doesn't.
Quote:
Originally Posted by -QfG- View Post
Thanks, fixed in 0.64.3c
I just tried version 0.64.3c but the bug I described is still there.
I get an error instead of rpu.
cool advertise is offline   Reply With Quote
Old 6th January 2025, 19:54   #1016  |  Link
matey
Registered User
 
Join Date: May 2024
Posts: 6
Quote:
Originally Posted by Fuso View Post
MP4muxer version: v1.3.3 (build: Aug 6 2023)


The RPU is P8, I think the files that I "produce" are the so called "fake profile 5".

The source MKV has this info:
Code:
Video
ID                          : 1
Format                      : HEVC
Format/Info                 : High Efficiency Video Coding
Format profile              : Main 10@L5@Main
HDR format                  : Dolby Vision, Version 1.0, dvhe.08.06, BL+RPU, HDR10 compatible / SMPTE ST 2094 App 4, Version 1, HDR10+ Profile B compatible
Codec ID                    : V_MPEGH/ISO/HEVC
1. I demux the video and the audio with tsmuxer.
2. The extracted .hevc and .ec3 files I mux with the following line:
Code:
mp4muxer --dv-profile 5 --input-file 1.hevc --input-video-frame-rate 24000/1001 --input-file 1.ec3 --media-lang eng --output-file MOVIE.mp4
pause
The ouptut MOVIE.mp4 looks like that:
Code:
Video
ID                          : 1
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 / SMPTE ST 2094 App 4, Version 1, HDR10+ Profile B compatible
Codec ID                    : dvhe
Codec ID/Info               : High Efficiency Video Coding with Dolby Vision
3. And since files with Codec ID: dvhe can't be playes on a Samsung TVs (I haven't tested other brands), I rename the MOVIE.mp4 to MOVIE.mkv and then use the QfG's script DDVT_MKVTOMP4

Code:
 powered by quietvoids tools                                                                  Copyright (c) 2021-2024 QfG

                                        ====================================
                                             Dolby Vision Tool MKVtoMP4
                                        ====================================


 == VIDEO INPUT =========================================================================================================

Filename   = [MOVIE.mkv]
Video Info = [Resolution = 3840x1600] [Codec = HEVC-10Bit-YUV-4:2:0] [Frames = 199736] [FPS = 23.976]
HDR Info   = [HDR, HDR10+, Dolby Vision Profile 5]

HDR10+ Metadata found.
Dolby Vision Profile 5 found.

Be sure that there no picture based subtitles in your MKV file (PGS or VobSub)
Only textbased subtitles supported.

Please check your Audio Codec and the MP4 specifications. You can switch the
Audio Codec if the source is not compatible with MP4 container.

 == MENU ================================================================================================================

1. Audio Codec                    : [Untouched]

S. START

Change Settings and press [S] to start Converting
Select a Letter 1,[S]tart
and the final ouput MOVIE.mp4:
Code:
Video
ID                          : 1
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 / SMPTE ST 2094 App 4, Version 1, HDR10+ Profile B compatible
Codec ID                    : hev1
Codec ID/Info               : High Efficiency Video Coding
I did try to mux directly to Codec ID: hev1 at step 2, but it didn't work with one of the following (or both) - --dv-bl-compatible-id, --hvc1flag.

I've asked many times before not only on this forum but no one could give me a solution for playing HDR10/HDR10+/DoVi hybrid files on both Samsung and LG (old and new). The whole shenanigans is needed because the old LGs can't play DoVi Profile 8 with Codec ID: hev1, it plays in regular HDR. But when the file is DoVi Profile 5 with Codec ID: hev1 it plays in Dolby Vision, and the same file plays on Samsung TV in HDR10/HDR10+, and if video is real Profile 5 will play in green and purple colors.
So I figured out for myself and so far I haven't noticed anything wrong when playing on all of the TVs.
thanks for the detailed reply @fuso

just 1 clarification - for playing on old & new LG (2018 & 2023 models) the mp4 got after step 2 is enough to play in DV, right? the additional 2 steps you are doing is only for samsung tv's to play in HDR, correct?

Last edited by matey; 6th January 2025 at 19:56.
matey is offline   Reply With Quote
Old 6th January 2025, 22:05   #1017  |  Link
Fuso
Registered User
 
Join Date: Dec 2010
Posts: 36
Quote:
Originally Posted by matey View Post
thanks for the detailed reply @fuso

just 1 clarification - for playing on old & new LG (2018 & 2023 models) the mp4 got after step 2 is enough to play in DV, right? the additional 2 steps you are doing is only for samsung tv's to play in HDR, correct?
If you just want to play DoVi on both old and new models LG only, there's no need for my method. Profile 8 DoVi mp4 with Codec ID set to dvhe is enough. And it's also the official way which meets the Dolby standarts.

@QfG is it possible to implement my way into the script of the DDVT_MKVTOMP4? You can add it to be set as an option [NO/YES] - something like Fake Profile 5 with explanation and also clarify that is expiremental.
I don't know if I'm the only one that needs this but it will be much easier to just convert MKV with HDR10/DoVi P8 to MP4 with HDR10/DoVi "P5" with Codec ID: hev1.
Also can you add an option to select the Codec ID - hev1 or dvhe for P8 mp4? That is what @matey needs in his case I think...

Last edited by Fuso; 6th January 2025 at 22:12.
Fuso is offline   Reply With Quote
Old 6th January 2025, 22:09   #1018  |  Link
-QfG-
QfG Group Germany
 
-QfG-'s Avatar
 
Join Date: Oct 2018
Location: Germany
Posts: 275
Yes, i can add in the next update a "Fake P5 Switch". That's no problem
The target file must have - DV Profile 5 Tag (but contains P8) / hev1 instead dvhe / mp4 container, correct?

Quote:
Originally Posted by cool advertise View Post
Bug (v0.64.3b).
If you try to demux with DDVT_DEMUXER, the single Enhancement Layer of a dolby vision profile 7, and want to convert it to profile 8 (cropping it) you will not get the rpu, but an error.
In previous versions it worked, but now it doesn't.


I just tried version 0.64.3c but the bug I described is still there.
I get an error instead of rpu.
Have you this entries in line 1166?

Code:
:RPU_EXTRACT
if "!ELSTREAM!"=="" (
	set "ELSTREAM=!INPUTSTREAM!"
	%WHITE%
	echo  == DEMUXING ============================================================================================================
	echo.
)
%CYAN%
echo Please wait. Demuxing DV Reference Processing Unit...
%WHITE%
"!DO_VI_TOOLpath!" %CROPSTRING% %CONVERTSTRING% extract-rpu "!ELSTREAM!" -o "!TARGET_FOLDER!\%INPUTFILENAMEO%_[RPU].bin"
if exist "!TARGET_FOLDER!\%INPUTFILENAMEO%_[RPU].bin" (
	%GREEN%
	echo Done.
	echo.
) else (
	%RED%
	echo Error.
	set "ERRORCOUNT=1"
	echo.
)
goto :eof
if not, please reload the tool.

Last edited by -QfG-; 6th January 2025 at 22:21.
-QfG- is offline   Reply With Quote
Old 6th January 2025, 23:15   #1019  |  Link
Fuso
Registered User
 
Join Date: Dec 2010
Posts: 36
Quote:
Originally Posted by -QfG- View Post
Yes, i can add in the next update a "Fake P5 Switch". That's no problem
The target file must have - DV Profile 5 Tag (but contains P8) / hev1 instead dvhe / mp4 container, correct?
Yes. The ouput mp4 file must look like this:
Code:
Video
HDR format                  : Dolby Vision, Version 1.0, dvhe.05.06, BL+RPU / SMPTE ST 2086, HDR10 compatible
Codec ID                    : hev1

Last edited by Fuso; 6th January 2025 at 23:18.
Fuso is offline   Reply With Quote
Old 7th January 2025, 03:52   #1020  |  Link
-QfG-
QfG Group Germany
 
-QfG-'s Avatar
 
Join Date: Oct 2018
Location: Germany
Posts: 275
Quote:
-v0.64.3d
*ADDED Function in MKVtoMP4 script for creating "fake" Profile 5 files.
Function is only available if input file is Profile 8.
-QfG- is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 16:38.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.