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 29th January 2022, 10:48   #41  |  Link
von Suppé
Registered User
 
von Suppé's Avatar
 
Join Date: Dec 2013
Posts: 638
Quote:
Originally Posted by -QfG- View Post
how i understand the --crop function...

Source: 3840 x 2160 Letterboxed - Target 3840 x 1608 none Letterboxed = no crop switch needed
Can you tell me why no crop would be needed here? Please read from here: https://github.com/quietvoid/dovi_to...ent-1010640787
If I understand quietvoid correctly, the crop values don't matter to dovitool. It would set the size of letterbox bars to zero.
Which does make me wonder if "undercropping" would cause issues. With undercropping I mean cropping, but not entirely removing the black bars.

Last edited by von Suppé; 29th January 2022 at 10:51.
von Suppé is offline   Reply With Quote
Old 29th January 2022, 11:47   #42  |  Link
-QfG-
QfG Group Germany
 
-QfG-'s Avatar
 
Join Date: Oct 2018
Location: Germany
Posts: 245
Wrong Informations. Correct answer here:
https://forum.doom9.org/showpost.php...6&postcount=45

Last edited by -QfG-; 29th January 2022 at 21:34.
-QfG- is offline   Reply With Quote
Old 29th January 2022, 17:31   #43  |  Link
Ryushin
Registered User
 
Ryushin's Avatar
 
Join Date: Mar 2011
Posts: 433
Quote:
Originally Posted by von Suppé View Post
@Ryushin

Yes. When extracting RPU from letterboxed source (black bars are part of video), for injecting it back in a cropped version, the crop option is required.
Quote:
Originally Posted by -QfG- View Post
how i understand the --crop function:

Source: 3840 x 2160 Letterboxed - Target 3840 x 2160 Letterboxed = no crop switch needed
Source: 3840 x 2160 Letterboxed - Target 3840 x 1608 none Letterboxed = no crop switch needed
Source: 3840 x 2160 Letterboxed - Target 1920 x 1080 Letterboxed = no crop switch needed
Source: 3840 x 2160 Letterboxed - Target 1920 x 704 none Letterboxed = crop switch needed
LOL. So some say yes to and some say no cropping. Just to get more clarification I'll ask again Github so I can know what cropping is intended for.
Ryushin is offline   Reply With Quote
Old 29th January 2022, 17:36   #44  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,752
My assumption is that whenever the final result doesn't have any black borders, you use the cropping option for the RPU.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 29th January 2022, 21:23   #45  |  Link
quietvoid
Registered User
 
Join Date: Jan 2019
Location: Canada
Posts: 574
Quote:
Originally Posted by Boulder View Post
My assumption is that whenever the final result doesn't have any black borders, you use the cropping option for the RPU.
Yes that's correct.
__________________
LG C2 OLED | GitHub Projects
quietvoid is offline   Reply With Quote
Old 29th January 2022, 22:00   #46  |  Link
GZZ
Registered User
 
Join Date: Jan 2002
Posts: 581
Quote:
Originally Posted by quietvoid View Post
Yes that's correct.

I makes sense, but how do you know how it crops the RPU?. I mean you will need to crop the end result just like the Crop function works on the RPU file. But as you dont set any crop resolution, how do you know how it cropped it ?

Ex.
Source UHD: 3840 x 2160 -> Crop RPU = Resolution ? - Reencoded and cropped movie: 3840 x 1680.

So what if the Cropped RPU has a resultion of 3840 x 1685 and the reencoded is 3840 x 1680, then its off by 5 pixel (not sure you can see that).

Wouldnt it be better if Dovi_tool took crop (Top, Bottom, Left, Right) values, so the RPU matches the Reencoded movie ?
GZZ is offline   Reply With Quote
Old 29th January 2022, 22:12   #47  |  Link
quietvoid
Registered User
 
Join Date: Jan 2019
Location: Canada
Posts: 574
Quote:
Originally Posted by GZZ View Post
I makes sense, but how do you know how it crops the RPU?. I mean you will need to crop the end result just like the Crop function works on the RPU file. But as you dont set any crop resolution, how do you know how it cropped it ?

Ex.
Source UHD: 3840 x 2160 -> Crop RPU = Resolution ? - Reencoded and cropped movie: 3840 x 1680.

So what if the Cropped RPU has a resultion of 3840 x 1685 and the reencoded is 3840 x 1680, then its off by 5 pixel (not sure you can see that).
The RPU contains active area offsets, which are set according to the size of the letterbox bars.
For example, a source file with resolution 3840x2160 might have an actual aspect ratio of 2.4 without letterbox bars, so the active area is 3840x1600.
In that case, the RPU has a L5 metadata entry with top and bottom offsets set to 280 pixels.
In playback, some devices would use this offset to apply tone mapping to the active area only.

If the RPU is "cropped", the 280 pixel offsets are set to zero. That indicates to the decoder that the video has no letterbox bars.
If the offsets were kept the same as the original, and the letterbox bars are not in the final video, then some players might overcrop the video on playback.


Quote:
Originally Posted by GZZ View Post
Wouldnt it be better if Dovi_tool took crop (Top, Bottom, Left, Right) values, so the RPU matches the Reencoded movie ?
You can already do this with the editor. The crop argument is only for convenience.

Say you have a final video of resolution 1920x1080 which contains letterbox bars. And the source is the example above, with actual active area of 3840x1600.
That means the offsets need to be halved to match the new resolution, giving us 140 pixels.

You could edit the RPU active area with this:
Code:
{
  "mode": 2,
  "active_area": {
    "presets": [
      {
        "id": 0,
        "left": 0,
        "right": 0,
        "top": 140,
        "bottom": 140
      }
    ],
    "edits": {
      "all": 0
    }
  }
}
__________________
LG C2 OLED | GitHub Projects
quietvoid is offline   Reply With Quote
Old 29th January 2022, 23:08   #48  |  Link
-QfG-
QfG Group Germany
 
-QfG-'s Avatar
 
Join Date: Oct 2018
Location: Germany
Posts: 245
Dolby_Vision_Tool_v0.34 Online:

-v0.34
*Added Options Menu (you can create Shell Extensions).
*Added info string to crop function.
*Fixed bad FPS settings by muxing in mkv.

-QfG- is offline   Reply With Quote
Old 30th January 2022, 00:03   #49  |  Link
cool advertise
Registered User
 
cool advertise's Avatar
 
Join Date: Aug 2008
Location: Italy
Posts: 46
Quote:
Originally Posted by quietvoid View Post
You could edit the RPU active area with this:
Code:
{
  "mode": 2,
  "active_area": {
    "presets": [
      {
        "id": 0,
        "left": 0,
        "right": 0,
        "top": 140,
        "bottom": 140
      }
    ],
    "edits": {
      "all": 0
    }
  }
}
@-QfG-
Since I am not able to edit the crop values of the rpu, it would be of great use if a future version of the -QfG- tool would allow, after enabling the crop, to set the crop values (left, right, top, bottom) before creating the rpu, in order to adapt it exactly to each encoding.
And I think the left and top crop values are positive, and what to do with the right and bottom crop values? Positive or negative?
Not sure but maybe they all have to be positive (if different from 0).
And finally hdr10plus_tool.exe contained in the -QfG- tool is obsolete (1.2.1), the new version has been released (1.2.2).
By the way, great job to both of you, quietvoid and -QfG-

Last edited by cool advertise; 30th January 2022 at 00:20.
cool advertise is offline   Reply With Quote
Old 30th January 2022, 00:24   #50  |  Link
quietvoid
Registered User
 
Join Date: Jan 2019
Location: Canada
Posts: 574
Quote:
Originally Posted by cool advertise View Post
And I think the left and top crop values are positive, and what to do with the right and bottom crop values? Positive or negative?
Not sure but maybe they all have to be positive (if different from 0).
All active area offset values are positive.
They simply represent the size of the letterbox bars, in pixels.
__________________
LG C2 OLED | GitHub Projects
quietvoid is offline   Reply With Quote
Old 30th January 2022, 02:28   #51  |  Link
cool advertise
Registered User
 
cool advertise's Avatar
 
Join Date: Aug 2008
Location: Italy
Posts: 46
OK, maybe now I understand.
So if I want to do an x265 encode and crop the top and bottom (or left and right) letterbox bars, dovi_tool allows this via the -c command or the CROP RPU "YES" option of the -QfG- tool. If you don't cut letterbox bars then don't use -c or use CROP RPU "NO" of the -QfG- tool.
There is no way or need to specify how many pixels these letterbox bars are via dovi_tool, if coding using crop.
The editor allows via a json configuration file, in case the encoding has letterbox bars and is therefore not cropped to specify the pixel size of these bars by skipping the default ones, or something like that.
I'm writing because I don't have a Dolby Vision TV, and I can't do tests, but I think I understand this.

Last edited by cool advertise; 30th January 2022 at 02:34.
cool advertise is offline   Reply With Quote
Old 30th January 2022, 10:48   #52  |  Link
halls
Registered User
 
Join Date: Jun 2010
Posts: 19
Hi!

Sorry, worng thread

Last edited by halls; 30th January 2022 at 15:03.
halls is offline   Reply With Quote
Old 30th January 2022, 16:13   #53  |  Link
-QfG-
QfG Group Germany
 
-QfG-'s Avatar
 
Join Date: Oct 2018
Location: Germany
Posts: 245
v0.35 Online
-v0.35
*Added Active Area Editor in Injector.
*Updated hdr10plus_tool.exe to v1.2.2.


Last edited by -QfG-; 30th January 2022 at 16:22.
-QfG- is offline   Reply With Quote
Old 30th January 2022, 17:20   #54  |  Link
halls
Registered User
 
Join Date: Jun 2010
Posts: 19
Hi!

I know this isn't the specific thread, but i need a little help.

How can i extract the dolby vision meta datas to .xml format?

I have rpu.bin and .json files with using dovi_tool

I need this format /.xml/ for an program.

Thank You!
halls is offline   Reply With Quote
Old 30th January 2022, 17:30   #55  |  Link
quietvoid
Registered User
 
Join Date: Jan 2019
Location: Canada
Posts: 574
Quote:
Originally Posted by halls View Post
Hi!

I know this isn't the specific thread, but i need a little help.

How can i extract the dolby vision meta datas to .xml format?

I have rpu.bin and .json files with using dovi_tool

I need this format /.xml/ for an program.

Thank You!
You can't.
__________________
LG C2 OLED | GitHub Projects
quietvoid is offline   Reply With Quote
Old 30th January 2022, 19:41   #56  |  Link
cool advertise
Registered User
 
cool advertise's Avatar
 
Join Date: Aug 2008
Location: Italy
Posts: 46
Quote:
Originally Posted by -QfG- View Post
v0.35 Online
-v0.35
*Added Active Area Editor in Injector.
*Updated hdr10plus_tool.exe to v1.2.2.
Perfect, but your injector tool is still missing one main function, namely injecting hdr10+ metadata into a hevc or mkv file.
cool advertise is offline   Reply With Quote
Old 30th January 2022, 21:12   #57  |  Link
-QfG-
QfG Group Germany
 
-QfG-'s Avatar
 
Join Date: Oct 2018
Location: Germany
Posts: 245
This is a Dolby Vision Tool, not a HDR10+ Tool. . I will look to add HDR10+ Injector support on the next Update.
-QfG- is offline   Reply With Quote
Old 30th January 2022, 21:14   #58  |  Link
GZZ
Registered User
 
Join Date: Jan 2002
Posts: 581
Quote:
Originally Posted by halls View Post
Hi!

I know this isn't the specific thread, but i need a little help.

How can i extract the dolby vision meta datas to .xml format?

I have rpu.bin and .json files with using dovi_tool

I need this format /.xml/ for an program.

Thank You!

You can use a online converter to convert from JSON to XML.
It might work, it might not.
https://www.freeformatter.com/json-t...converter.html
GZZ is offline   Reply With Quote
Old 30th January 2022, 22:43   #59  |  Link
-QfG-
QfG Group Germany
 
-QfG-'s Avatar
 
Join Date: Oct 2018
Location: Germany
Posts: 245
-v0.35a
*Minor Bugfixes
*Changed colors of any strings
-QfG- is offline   Reply With Quote
Old 30th January 2022, 23:17   #60  |  Link
halls
Registered User
 
Join Date: Jun 2010
Posts: 19
Quote:
Originally Posted by GZZ View Post
You can use a online converter to convert from JSON to XML.
It might work, it might not.
https://www.freeformatter.com/json-t...converter.html

Hi!

Yes, i tried.

.JSON file is to big.....

But Thank You!
halls 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 14:55.


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