TSmuxermulucy wrote: ↑Fri Jul 23, 2021 2:27 amThis explains a lot. Thank you! Another question as X700 owner, what container did you choose for your converted Star Wars movie? AFAIK, X700 does not support MKV. And for creating a container, did you use TSmuxer or another MKV tool? I noticed you mentioned skipping and adding 30 frames, plus delating the ATMOS track.
Dolby Vision now possible through MP4 Mux.
-
RESET_9999
- Posts: 2407
- Joined: Mon Aug 05, 2019 7:12 pm
Re: Dolby Vision now possible through MP4 Mux.
Re: Dolby Vision now possible through MP4 Mux.
So you are taking a streaming/web-dl version of a movie that has an HDR10 base layer plus RPU and just extracting the RPU and applying that to the HDR10 only (non-DV) blu-ray version of the same movie? Am I understanding this correctly?RESET_9999 wrote: ↑Fri Jul 23, 2021 2:14 amI just did myself a DV version of the Star Wars New Hope UHD bluray and it looks great!! Very noticeable upgrade in quality(even on the camera comparison) and the luminance /color looks the same as the original profile 5.
Re: Dolby Vision now possible through MP4 Mux.
Streaming Web-DL Profile 5 lacks the HDR10. That's why you need to convert it to Profile 8, which is HDR10 backwards compatible. Then use the RPU from Profile 8 and inject it to HDR10 base layer from the UHD Disk. This will retain the same color and luminance, but it will increase the bitrate since the base layer is from UHD Disk.glc650 wrote: ↑Fri Jul 23, 2021 3:47 amSo you are taking a streaming/web-dl version of a movie that has an HDR10 base layer plus RPU and just extracting the RPU and applying that to the HDR10 only (non-DV) blu-ray version of the same movie? Am I understanding this correctly?RESET_9999 wrote: ↑Fri Jul 23, 2021 2:14 amI just did myself a DV version of the Star Wars New Hope UHD bluray and it looks great!! Very noticeable upgrade in quality(even on the camera comparison) and the luminance /color looks the same as the original profile 5.
Re: Dolby Vision now possible through MP4 Mux.
RESET_9999 please tell me where did you get Star Wars New Hope WEB-DL DV?RESET_9999 wrote: ↑Fri Jul 23, 2021 2:14 amI just did myself a DV version of the Star Wars New Hope UHD bluray and it looks great!! Very noticeable upgrade in quality(even on the camera comparison) and the luminance /color looks the same as the original profile 5.
https://screenshotcomparison.com/comparison/16048
for those who want to do the same, you have to remove 39 frames from the beginning and add 39 frames at the end. Then the lossless Atmos needs a negative 1627MS delay.
It plays flawlessly on the x700, the shield, and the C8 internal app. I only watched a couple of minutes though but I plan to watch the whole movie this weekend.
The first scene with all the bright white walls is great to expose the shield red push as well, I noticed it right away. The original P5 is clean.
amazing work @Quietvoid
Code: Select all
Video ID : 4117 (0x1015) Menu ID : 1 (0x1) Format : HEVC Format/Info : High Efficiency Video Coding Format profile : Main 10@L5.1@High HDR format : Dolby Vision, Version 1.0, dvhe.08.06, BL+RPU, HDR10 compatible / SMPTE ST 2086, HDR10 compatible Codec ID : 36 Duration : 2 h 4 min Bit rate : 51.3 Mb/s Width : 3 840 pixels Height : 2 160 pixels Display aspect ratio : 16:9 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.258 Stream size : 44.6 GiB (91%) 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.0001 cd/m2, max: 1000 cd/m2 Audio #1 ID : 4352 (0x1100) Menu ID : 1 (0x1) Format : MLP FBA AC-3 16-ch Format/Info : Meridian Lossless Packing FBA with 16-channel presentation Commercial name : Dolby TrueHD with Dolby Atmos Muxing mode : Stream extension Codec ID : 131 Duration : 2 h 4 min Bit rate mode : Variable Bit rate : 640 kb/s Maximum bit rate : 3 705 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 : Lossless Stream size : 571 MiB (1%) Language : English Service kind : Complete Main Number of dynamic objects : 13 Bed channel count : 1 channel Bed channel configuration : LFE
Re: Dolby Vision now possible through MP4 Mux.
As always I am behind with technicals.RESET_9999 wrote: ↑Fri Jul 23, 2021 2:14 amI just did myself a DV version of the Star Wars New Hope UHD bluray and it looks great!! Very noticeable upgrade in quality(even on the camera comparison) and the luminance /color looks the same as the original profile 5.
https://screenshotcomparison.com/comparison/16048
for those who want to do the same, you have to remove 39 frames from the beginning and add 39 frames at the end. Then the lossless Atmos needs a negative 1627MS delay.
It plays flawlessly on the x700, the shield, and the C8 internal app. I only watched a couple of minutes though but I plan to watch the whole movie this weekend.
The first scene with all the bright white walls is great to expose the shield red push as well, I noticed it right away. The original P5 is clean.
amazing work @Quietvoid
Code: Select all
Video ID : 4117 (0x1015) Menu ID : 1 (0x1) Format : HEVC Format/Info : High Efficiency Video Coding Format profile : Main 10@L5.1@High HDR format : Dolby Vision, Version 1.0, dvhe.08.06, BL+RPU, HDR10 compatible / SMPTE ST 2086, HDR10 compatible Codec ID : 36 Duration : 2 h 4 min Bit rate : 51.3 Mb/s Width : 3 840 pixels Height : 2 160 pixels Display aspect ratio : 16:9 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.258 Stream size : 44.6 GiB (91%) 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.0001 cd/m2, max: 1000 cd/m2 Audio #1 ID : 4352 (0x1100) Menu ID : 1 (0x1) Format : MLP FBA AC-3 16-ch Format/Info : Meridian Lossless Packing FBA with 16-channel presentation Commercial name : Dolby TrueHD with Dolby Atmos Muxing mode : Stream extension Codec ID : 131 Duration : 2 h 4 min Bit rate mode : Variable Bit rate : 640 kb/s Maximum bit rate : 3 705 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 : Lossless Stream size : 571 MiB (1%) Language : English Service kind : Complete Main Number of dynamic objects : 13 Bed channel count : 1 channel Bed channel configuration : LFE
I want to try this, Can you explain in easy words how to add 39 frames and remove 39 frames? And these frames add/remove should be done on HDR 10 track? Which program you need to add/remove frames?
And also how do you know that you had to remove/add 39 frames? Is this for this particular film or it applies to all films?
Thanks
-
RESET_9999
- Posts: 2407
- Joined: Mon Aug 05, 2019 7:12 pm
Re: Dolby Vision now possible through MP4 Mux.
yeah, this is the complicated part and I'm not sure my English is good enough to write a step-by-step procedure and maybe there's an easier way. If so please someone share the method. Perhaps it would be easier just to screen-capture myself doing it ? I'll do that if you don't understand what I'm trying to explain here.ragico wrote: ↑Fri Jul 23, 2021 9:31 am
As always I am behind with technicals.
I want to try this, Can you explain in easy words how to add 39 frames and remove 39 frames? And these frames add/remove should be done on HDR 10 track? Which program you need to add/remove frames?
And also how do you know that you had to remove/add 39 frames? Is this for this particular film or it applies to all films?
Thanks
anyway, AFAIK, you can only split a video stream at keyframes and the chances that frame #39 is a keyframe are low.
So roughly:
First, you find out if there's a frame difference between the disc and the web-dl. I use MPC-BE and control left/right arrow and control-G for that.
Then you have to split the first few seconds and re-encode it which allows you to remove as much frame as you want(i use staxrip/x265 for that).
for some movies , you will have to add frames, in some other movies it will be the same. For the encoding part I tried to use bluray compliant settings (based on AVC bluray specs):
Code: Select all
--crf 15 --preset slower --output-depth 10 --master-display "G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,0)" --max-cll "0,0" --hdr10 --colorprim bt2020 --colormatrix bt2020nc --transfer smpte2084 --max-luma 1023 --hdr10-opt --no-info --chromaloc 2 --keyint 24 --min-keyint 1 --profile main10 --level-idc 51 --high-tier --aud --sar 1 --hrd --repeat-headers --no-open-gop --ref 5 --rc-lookahead 24 --aq-mode 1 --vbv-maxrate 98000 --vbv-bufsize 98000Code: Select all
clip2 = core.ffms2.Source(r"%source_file%", cachefile = r"%source_temp_file%.ffindex")
clip1 = core.std.BlankClip(clip2,length=25)
clip = clip1+clip2
Re: Dolby Vision now possible through MP4 Mux.
Thanks for this.RESET_9999 wrote: ↑Fri Jul 23, 2021 2:14 amI just did myself a DV version of the Star Wars New Hope UHD bluray and it looks great!! Very noticeable upgrade in quality(even on the camera comparison) and the luminance /color looks the same as the original profile 5.
https://screenshotcomparison.com/comparison/16048
To me there seems to be a slight tint change (so maybe whitebalance difference).
Would be pretty complicated to tell if it's just because the HDR10 version was encoded differently.
Also, you shouldn't be reencoding anything at all!
The dovi_tool editor can be used to remove and duplicate metadata so that it matches your second video.
For your example:
This can be done with an edit JSON like this:you have to remove 39 frames from the beginning and add 39 frames at the end
Code: Select all
{
"remove": [
"0-38"
],
"duplicate": [
{
"source": last_frame - 1,
"offset": last_frame - 1,
"length": 40
}
]
}Offset is where the metadata is added back (inclusive) and length is the number of times the same metadata is added.
You can play with the edit until the RPU length matches the video file you're injecting into.
-
RESET_9999
- Posts: 2407
- Joined: Mon Aug 05, 2019 7:12 pm
Re: Dolby Vision now possible through MP4 Mux.
damn I wish I knew that last night lol
thank you so much.
thank you so much.
Re: Dolby Vision now possible through MP4 Mux.
Shouldn't the "length" value be 39 instead of 40?quietvoid wrote: ↑Fri Jul 23, 2021 12:45 pmThanks for this.RESET_9999 wrote: ↑Fri Jul 23, 2021 2:14 amI just did myself a DV version of the Star Wars New Hope UHD bluray and it looks great!! Very noticeable upgrade in quality(even on the camera comparison) and the luminance /color looks the same as the original profile 5.
https://screenshotcomparison.com/comparison/16048
To me there seems to be a slight tint change (so maybe whitebalance difference).
Would be pretty complicated to tell if it's just because the HDR10 version was encoded differently.
Also, you shouldn't be reencoding anything at all!
The dovi_tool editor can be used to remove and duplicate metadata so that it matches your second video.
For your example:This can be done with an edit JSON like this:you have to remove 39 frames from the beginning and add 39 frames at the endFor duplicating, the source is a frame number to use the metadata from.Code: Select all
{ "remove": [ "0-38" ], "duplicate": [ { "source": last_frame - 1, "offset": last_frame - 1, "length": 40 } ] }
Offset is where the metadata is added back (inclusive) and length is the number of times the same metadata is added.
You can play with the edit until the RPU length matches the video file you're injecting into.
Or is it necessary to apply +1 to the "length" value because the "offset" frame is removed (it is replaced by the new generated frames)?
And another question:
Why are the new frames added before the last frame (and the last frame remains intact) instead of being added at the end of the RPU? (In other words, why last_frame - 1 instead of just last_frame)
Thank you so much for everything!
Re: Dolby Vision now possible through MP4 Mux.
I just wrote a quick example so it might not be totally correct.
Maybe that's weird? I don't really expect people to add totally different metadata in the middle of a scene, so replacing shouldn't be an issue.
Edit: I'm not quite sure the above is correct
I think the metadata is still appended, without replacing anything. This should be simple to test..
Really need to start documenting the editor.
Since the indices start at 0, the last frame is usually frame count - 1.
Otherwise you would get an error when trying to edit.
I should probably have worded the last_frame as frame_count instead.
Last edited by quietvoid on Fri Jul 23, 2021 1:59 pm, edited 2 times in total.
-
RESET_9999
- Posts: 2407
- Joined: Mon Aug 05, 2019 7:12 pm
Re: Dolby Vision now possible through MP4 Mux.
I asked @manix to provide lldv capture sample with his Shogun, this will be a more accurate way of comparing the colors/tint.
Re: Dolby Vision now possible through MP4 Mux.
Thanks everybody.
Too difficult for me.
I surrender.
Too difficult for me.
I surrender.
-
RESET_9999
- Posts: 2407
- Joined: Mon Aug 05, 2019 7:12 pm
Re: Dolby Vision now possible through MP4 Mux.
@quietvoid,
I get this error for the movie ''Soul'' no matter what I do. any idea why? Could it be because of the seamless branching disc? I tried to mux the m2ts parts with tsmuxer and mkvtoolnix, no difference.
Also, once the rpu is injected into an HDR10 hevc stream, if I use the mp4muxer, the frame rate goes from 23.976 to 30 fps
If I use Tsmuxer, no problem at all, the fps remain 23.976.
EDIT: the fps problem seems to be caused when the hdr10 stream is 23.976 instead of 23.976 (24000/1001)
I get this error for the movie ''Soul'' no matter what I do. any idea why? Could it be because of the seamless branching disc? I tried to mux the m2ts parts with tsmuxer and mkvtoolnix, no difference.
Code: Select all
range end index 18446744073709551612 out of range for slice of length 1If I use Tsmuxer, no problem at all, the fps remain 23.976.
EDIT: the fps problem seems to be caused when the hdr10 stream is 23.976 instead of 23.976 (24000/1001)
Re: Dolby Vision now possible through MP4 Mux.
The error happens when doing what? Injecting or extracting the RPU?RESET_9999 wrote: ↑Fri Jul 23, 2021 4:32 pm@quietvoid,
I get this error for the movie ''Soul'' no matter what I do. any idea why? Could it be because of the seamless branching disc? I tried to mux the m2ts parts with tsmuxer and mkvtoolnix, no difference.Also, once the rpu is injected into an HDR10 hevc stream, if I use the mp4muxer, the frame rate goes from 23.976 to 30 fpsCode: Select all
range end index 18446744073709551612 out of range for slice of length 1
If I use Tsmuxer, no problem at all, the fps remain 23.976.
EDIT: the fps problem seems to be caused when the hdr10 stream is 23.976 instead of 23.976 (24000/1001)
-
RESET_9999
- Posts: 2407
- Joined: Mon Aug 05, 2019 7:12 pm
Re: Dolby Vision now possible through MP4 Mux.
injecting...
if I use the same RPU and encode it with x265.exe, then no problem.