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 15th February 2022, 16:40   #141  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
Quote:
Who cares.
Everybody that isn't a mpv fanboy,...
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 15th February 2022, 16:43   #142  |  Link
Balling
Registered User
 
Join Date: Feb 2020
Posts: 539
Quote:
Originally Posted by Selur View Post
Everybody that isn't a mpv fanboy,...
What else? VLC is very buggy even in 601 vs 709 matrix, no one except mpv supports color managmnet of PAL and SMPTE C primaries. Only mpc-hc support color managment with icc besides mpv, and last only mpv can output PQ swapchain with Dolby Vision. Only mpv supports bt.2020-cl matrix, only mpv supports ICtCp... Etc. It still does not support superwhite though.

Mpv uses only nvidia decoder of YCbCr by default, which is correct compared to Intel's.

Last edited by Balling; 22nd March 2022 at 12:27.
Balling is offline   Reply With Quote
Old 15th February 2022, 17:08   #143  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
You are aware that this is the video encoding forum, right?
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 13th April 2022, 06:49   #144  |  Link
Balling
Registered User
 
Join Date: Feb 2020
Posts: 539
Quote:
Originally Posted by Selur View Post
You are aware that this is the video encoding forum, right?
We are far from encoding reshaped content...
Balling is offline   Reply With Quote
Old 27th May 2022, 06:01   #145  |  Link
LazyNcoder
Registered User
 
Join Date: Feb 2015
Posts: 33
I've got one question about the -c option in dovi tool.

How does that work? I mean, sometimes I'm not certain about the exact amount of the letter box, so I maybe leave 2px or 4px up and down.
Does this mess up the encode? I mean, I rather encode in 3120x1616 or 3120x1608 rather than 3120x1606 3120x1604
Does this ruin it? if so, Is there any ways to fix it?

Thanks
LazyNcoder is offline   Reply With Quote
Old 27th May 2022, 11:50   #146  |  Link
von Suppé
Registered User
 
von Suppé's Avatar
 
Join Date: Dec 2013
Posts: 629
-c zeroes L5 metadata. You use it when you have video without black borders being part of it. Should you have a few px left after recoding, you have to set L5 to those values. -QfG-'s scripts can help with this.
See https://forum.doom9.org/showthread.php?t=183479
Depending on your playback equipment, there is a chance that these small black bars will display differently than the black areas that are created to make it fullscreen.

May I ask why you use 3120 width?

Last edited by von Suppé; 27th May 2022 at 11:55.
von Suppé is offline   Reply With Quote
Old 27th May 2022, 12:07   #147  |  Link
LazyNcoder
Registered User
 
Join Date: Feb 2015
Posts: 33
Quote:
Originally Posted by von Suppé View Post
-c zeroes L5 metadata. You use it when you have video without black borders being part of it. Should you have a few px left after recoding, you have to set L5 to those values. -QfG-'s scripts can help with this.
See https://forum.doom9.org/showthread.php?t=183479
Depending on your playback equipment, there is a chance that these small black bars will display differently than the black areas that are created to make it fullscreen.
Thank you very much. Is there any way to see from what pixel the DV metadata is being applied when it's fullscreen? so I can crop the image very precisely.


Quote:
May I ask why you use 3120 width?
This is embrassing. I meant 3840. didn't noticed it and copy/pasted it multiple times
LazyNcoder is offline   Reply With Quote
Old 27th May 2022, 14:23   #148  |  Link
von Suppé
Registered User
 
von Suppé's Avatar
 
Join Date: Dec 2013
Posts: 629
I think RPU is applied in the so-called 'active area', which I would wildly guess to be the videoresolution minus the L5 offset values. But I can be horribly wrong here; RPU carries a lot of data of which I don't know their meaning. Maybe more knowledgable people want to step in.

Anyways, if I wanna crop very precisely, I load a screenshot in an image editor. Using rectangular selection tool and zoom function, it's easy to determine the black bar sizes with one-pixel-precision.
von Suppé is offline   Reply With Quote
Old 28th July 2022, 13:45   #149  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,843
As far as I know Dolby processing should be always applied to active area only, so in case of aspect ratios different to UHD frame (so anything like 2.35 etc.) always require specifying crop/active area or whatever is needed by given tool to work on active area only.
Same applies to mastering when you create Dolby masters with XML metadata.
kolak is offline   Reply With Quote
Old 19th October 2022, 22:39   #150  |  Link
ShortKatz
Registered User
 
Join Date: Aug 2018
Location: Germany
Posts: 118
Quote:
Originally Posted by quietvoid View Post
For Dolby Vision, same principle: https://github.com/quietvoid/dovi_tool#extract-rpu
Feed to x265 with: https://x265.readthedocs.io/en/maste...lby-vision-rpu
Also have to specify the profile.
May I ask a question to this. I now extracted the RPU using
Code:
ffmpeg -i input.mkv -c:v copy -vbsf hevc_mp4toannexb -f hevc - | dovi_tool extract-rpu - -o RPU.bin
This worked nicely and gave me a 90MB file.
But how do I get the RPU into my encoded video?

First, I have tried it in HandBrake directly (which would be the perfect way). I've added
Code:
vbv-bufsize=160000:vbv-maxrate=160000:dolby-vision-profile=8.1:dolby-vision-rpu=/Filepath/RPU.bin
as additional options. But this did not work because of:
Code:
encx265: unknown option 'dolby-vision-rpu'
Then I've tried to first encode the video with HandBrake and then inject the RPU back into the final video with:
Code:
ffmpeg -i video.m4v -c:v copy -c:a copy -vbsf hevc_mp4toannexb -f hevc - | dovi_tool inject-rpu -i - --rpu-in /Filepath/RPU.bin -o final.mp4
But this did not work because of:
Code:
Error: RpuInjector: Must be a raw HEVC bitstream file
ShortKatz is offline   Reply With Quote
Old 20th October 2022, 01:00   #151  |  Link
quietvoid
Registered User
 
Join Date: Jan 2019
Location: Canada
Posts: 570
Quote:
Originally Posted by ShortKatz View Post
May I ask a question to this. I now extracted the RPU using
Code:
ffmpeg -i input.mkv -c:v copy -vbsf hevc_mp4toannexb -f hevc - | dovi_tool extract-rpu - -o RPU.bin
This worked nicely and gave me a 90MB file.
But how do I get the RPU into my encoded video?

First, I have tried it in HandBrake directly (which would be the perfect way). I've added
Code:
vbv-bufsize=160000:vbv-maxrate=160000:dolby-vision-profile=8.1:dolby-vision-rpu=/Filepath/RPU.bin
as additional options. But this did not work because of:
Code:
encx265: unknown option 'dolby-vision-rpu'
Then I've tried to first encode the video with HandBrake and then inject the RPU back into the final video with:
Code:
ffmpeg -i video.m4v -c:v copy -c:a copy -vbsf hevc_mp4toannexb -f hevc - | dovi_tool inject-rpu -i - --rpu-in /Filepath/RPU.bin -o final.mp4
But this did not work because of:
Code:
Error: RpuInjector: Must be a raw HEVC bitstream file
x265 supposedly only supports RPU files from CLI, so if Handbrake is using the library it might not be able to.
I think I've seen people use ffmpeg, but I'm not sure if it actually works.

For injecting, you need to be using the raw bitstream, it can't be piped.
So demux first, inject, remux. You also can't output in mp4, it'll just be HEVC with no container.
__________________
LG C2 OLED | GitHub Projects

Last edited by quietvoid; 20th October 2022 at 01:03.
quietvoid is offline   Reply With Quote
Old 20th October 2022, 20:04   #152  |  Link
ShortKatz
Registered User
 
Join Date: Aug 2018
Location: Germany
Posts: 118
Thanks. This turned out to be more complicated than I thought. I was hoping to get an mp4 at the end, that I can play on my AppleTV.
ShortKatz 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 05:46.


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