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. |
|
|
Thread Tools | Search this Thread | Display Modes |
8th September 2022, 15:32 | #382 | Link |
Registered User
Join Date: Dec 2013
Posts: 639
|
Mkv container doesn't really carry a header for "FPS", but for "default duration" instead. Therefore, "VFR 23.951 fps" could indeed be MediaInfo's misinterpretation of "regular CFR 23.976 fps" video. Which could be caused by some flawed timestamps.
Maybe a two-step is worth a try here. First remux the source HDR video (without RPU) using MKVToolNix with "Default duration/FPS" set to 24000/1001p. Drop that result on the DDVT_INJECTOR. |
8th September 2022, 22:07 | #383 | Link | |
Registered User
Join Date: Jun 2022
Posts: 5
|
Quote:
|
|
9th September 2022, 04:36 | #384 | Link | |
Registered User
Join Date: Jul 2022
Posts: 126
|
Quote:
I wrote the following Python script for adding positive or negative delay to HDR10+ metadata. Let me know if I missed anything, or if there is a better way of doing this. @-QfG-: when injecting HDR10+ metadata into a file that already has one, is the previous one completely overwritten? Or should I first remove the previous one, then inject the new one? Code:
import argparse import json import copy # Parse the input arguments. parser = argparse.ArgumentParser() parser.add_argument('-i', '--input', nargs = '?', default = 'HDR10Plus.json', help = 'input HDR10+ JSON file') parser.add_argument('-d', '--delay', nargs = '?', type = int, default = 0, help = 'desired delay (in number of frames)') parser.add_argument('-o', '--output', nargs = '?', default = 'HDR10PlusEdited.json', help = 'output HDR10+ JSON file') args = parser.parse_args() with open(args.input, 'r') as hdr10plus: # Load the input file data. print("Reading the input file...") data = json.load(hdr10plus) print("Done!\n") if args.delay > 0: print("Applying delay...") # Add delay to SceneFrameIndex for each frame of the first scene. for i in range(data["SceneInfoSummary"]["SceneFrameNumbers"][0]): data["SceneInfo"][i]["SceneFrameIndex"] += args.delay # Add delay to SequenceFrameIndex of each frame. for frame in data["SceneInfo"]: frame["SequenceFrameIndex"] += args.delay # Duplicate the first frame, then correct SceneFrameIndex and SequenceFrameIndex. for i in range(args.delay): data["SceneInfo"].insert(0, copy.deepcopy(data["SceneInfo"][0])) data["SceneInfo"][0]["SceneFrameIndex"] -= 1 data["SceneInfo"][0]["SequenceFrameIndex"] -= 1 # Add delay to SceneFrameNumbers for the first scene. data["SceneInfoSummary"]["SceneFrameNumbers"][0] += args.delay # Add delay to SceneFirstFrameIndex of every scene apart from the first one. for i in range(1, len(data["SceneInfoSummary"]["SceneFirstFrameIndex"])): data["SceneInfoSummary"]["SceneFirstFrameIndex"][i] += args.delay print("Done!\n") elif args.delay < 0: print("Applying delay...") # Remove frames from the beginning. Note the SceneId and SceneFrameIndex of the first # remaining frame. del data["SceneInfo"][:-args.delay] frameZero = data["SceneInfo"][0]["SceneFrameIndex"] sceneZero = data["SceneInfo"][0]["SceneId"] # Add delay to SequenceFrameIndex of each frame and correct SceneId. for frame in data["SceneInfo"]: frame["SceneId"] -= sceneZero frame["SequenceFrameIndex"] += args.delay # Correct SceneFrameIndex for each frame of the first scene. for i in range(data["SceneInfoSummary"]["SceneFrameNumbers"][sceneZero] - frameZero): data["SceneInfo"][i]["SceneFrameIndex"] -= frameZero # Remove SceneFrameNumbers of any scene that has been removed, correct the value for the # first remaining scene. del data["SceneInfoSummary"]["SceneFrameNumbers"][:sceneZero] data["SceneInfoSummary"]["SceneFrameNumbers"][0] -= frameZero # Remove SceneFirstFrameIndex of any scene that has been removed, add delay to every # remaining scene apart from the first one. del data["SceneInfoSummary"]["SceneFirstFrameIndex"][1:sceneZero + 1] for i in range(1, len(data["SceneInfoSummary"]["SceneFirstFrameIndex"])): data["SceneInfoSummary"]["SceneFirstFrameIndex"][i] += args.delay print("Done!\n") with open(args.output, 'w') as edited: # Write the output file data. print("Writing the output file...") json.dump(data, edited, indent = 2, separators=(", ", ": ")) print("Done!\n") Last edited by GodzilaAvenger; 9th September 2022 at 04:46. |
|
9th September 2022, 15:06 | #385 | Link | |
Registered User
Join Date: Sep 2022
Posts: 3
|
Quote:
Last edited by LV8; 9th September 2022 at 17:46. |
|
11th September 2022, 11:48 | #387 | Link |
Registered User
Join Date: Dec 2013
Posts: 639
|
@-QfG-
I've read back the recent issue @panni mentioned. Am I correct when I think that in your scripts, you don't force mkvmerge with setting --default-duration header to proper value? If so, wouldn't it be a good idea to always do this? |
11th September 2022, 18:02 | #388 | Link | |||
QfG Group Germany
Join Date: Oct 2018
Location: Germany
Posts: 247
|
Quote:
Quote:
Quote:
__________________
Last edited by -QfG-; 11th September 2022 at 18:04. |
|||
12th September 2022, 19:28 | #389 | Link |
Registered User
Join Date: Sep 2022
Posts: 1
|
Hello,
Thank you very much for your tools, it will save me a lot of time, i used to do everything manually with dovi tool from quietvoid, i mainly use for a little more than 1 year the p5_to_p81.json to make a dv-hdr compatible for my Lg tv, I then used mp4muxer and ffmpeg to convert to mp4 and add the subtitles. I wanted to test by curiosity the conversion mkv to mp4 (DDVT Tool-v0.48c), it works very well but just for information, the country of the secondary languages as well as the subtitles do not correspond any more to the country of the mkv and are put in English, as if it were by default. |
13th September 2022, 22:56 | #390 | Link | |
Registered User
Join Date: Jul 2022
Posts: 22
|
Quote:
|
|
24th September 2022, 06:31 | #393 | Link |
Registered User
Join Date: Jul 2022
Posts: 126
|
Dude, chill... it's volunteer work so it's done when it's done. The project is open source (though not updated in a few months) so feel free to fork it and make the changes you need.
|
2nd October 2022, 17:38 | #394 | Link |
Registered User
Join Date: May 2009
Posts: 334
|
The author said they CAN, not they will.
If you want something specific done by them, donate to their cause if they have a link on their github. All open source projects are done in the author's "spare" time, and money always helps to ensure they have more "spare: time as they can then dedicate more time to the project instead of real life things. |
3rd October 2022, 01:06 | #395 | Link |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,856
|
The Apple DoVi HLG + dynamic metadata profile was largely created by Apple, not Dolby. I imagine it could be harder to find documentation or reference code. Plus it's only testable on Apple devices AFAIK.
|
4th October 2022, 21:11 | #396 | Link |
Registered User
Join Date: Oct 2003
Posts: 157
|
I'm back on this topic. Thank you for the XML -> RPU conversion support!
I'm trying to make a Blu-Ray with a Dolby Vision stream. Profile 7 is required for this. However, when converting the XML generated by DaVinci to the RPU binary, the software mentions it as a Profile 8.1. That's the same whatever the CMU I use (2.9 or 4.0). DDVT Tools converts from 7 to 8.1 but not the opposite. What should I do? At the moment, I can only achieve Blu-Ray UHD HDR authoring with HDR10. Thanks. |
4th October 2022, 21:53 | #397 | Link |
Registered User
Join Date: Jan 2019
Location: Canada
Posts: 574
|
There currently isn't a public/free solution for authoring UHD Blu-ray compatible profile 7, as it requires a second HEVC stream aligned with the base HDR10 video.
__________________
LG C2 OLED | GitHub Projects |
4th October 2022, 22:15 | #398 | Link |
Registered User
Join Date: Dec 2013
Location: Berlin, Germany
Posts: 394
|
Well if one uses x265 one could disable scenecut detection and adaptive B-Frames, like run a fixed GOP structure, and 2 streams with the same picture count will be aligned? Am I missing something?
|
4th October 2022, 22:43 | #399 | Link |
Registered User
Join Date: Jan 2019
Location: Canada
Posts: 574
|
It's probably possible that way, but suboptimal.
__________________
LG C2 OLED | GitHub Projects |
Thread Tools | Search this Thread |
Display Modes | |
|
|