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 7th January 2019, 11:37   #1  |  Link
kabelbrand
Compression mode: Lousy
 
kabelbrand's Avatar
 
Join Date: Mar 2009
Location: Hamburg, Germany
Posts: 72
x265 3.0 Dolby Vision encoding

Did someone manage to get an encode up and running with the new --dolby-vision-rpu option?

This is what the command line looks so far:
Code:
ffmpeg -loglevel quiet -i Cosmos_Laundromat_Dolby_Vision_24p_2048x858.mxf -pix_fmt yuv420p10 -f rawvideo - | x265-10b - --input-res 2048x858 --input-depth 10 --input-csp i420 --fps 24/1 --profile main10 --level-idc 5.1 --bitrate 30000 --vbv-maxrate 40000 --vbv-bufsize 40000 --repeat-headers --colorprim bt2020 --transfer smpte2084 --colormatrix bt2020nc --master-display G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,1) --max-cll 1000,400 --dolby-vision-profile 8.1 --dolby-vision-rpu cosmos_laundromat_vdm_hdr_p3d65_pq_20160525_01_2048x858_dovi_4000nit_metadata.xml --output Cosmos_Laundromat_Dolby_Vision_24p_2048x858.265
Is there something wrong with the metadata? I always get this error:
Code:
x265 [error]: Invalid Dolby Vision RPU startcode in POC 0
Thanks.

Last edited by kabelbrand; 7th January 2019 at 11:41.
kabelbrand is offline   Reply With Quote
Old 7th January 2019, 12:21   #2  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,336
Judging from the error, it wants a binary encoded RPU file, and not a metadata XML.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is offline   Reply With Quote
Old 7th January 2019, 12:49   #3  |  Link
kabelbrand
Compression mode: Lousy
 
kabelbrand's Avatar
 
Join Date: Mar 2009
Location: Hamburg, Germany
Posts: 72
Quote:
Originally Posted by nevcairiel View Post
Judging from the error, it wants a binary encoded RPU file, and not a metadata XML.
Thanks, it's plain XML indeed. So how do I get a binary presentation of this? "metafier" does not seem to support it.

Btw. the source assets are linked in the command line.

Last edited by kabelbrand; 7th January 2019 at 15:02. Reason: added note about metafier
kabelbrand is offline   Reply With Quote
Old 12th January 2019, 11:41   #4  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,255
Would be interested in that too.
Also is there a way to extract the data somehow?

As a side note: does using
Code:
--master-display G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,1) --max-cll 1000,400
make sense here?
I thought those were HDR-10 settings and shouldn't be used with Dolby Vision.

Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 14th January 2019, 10:53   #5  |  Link
kabelbrand
Compression mode: Lousy
 
kabelbrand's Avatar
 
Join Date: Mar 2009
Location: Hamburg, Germany
Posts: 72
Quote:
Originally Posted by Selur View Post
I thought those were HDR-10 settings and shouldn't be used with Dolby Vision.
I guess when aiming for Dolby Vision profile 8.1 these should be included to also have HDR10 playback compatibility:
http://x265.org/x265-delivers-dolby-vision-streams/
kabelbrand is offline   Reply With Quote
Old 14th January 2019, 18:24   #6  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,255
Ah didn't know that.
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 14th January 2019, 19:30   #7  |  Link
halls
Registered User
 
Join Date: Jun 2010
Posts: 19
Hi!

There is any way to extract metadata from an existing file into RPU file?
halls is offline   Reply With Quote
Old 15th January 2019, 23:01   #8  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,736
Quote:
Originally Posted by kabelbrand View Post
I guess when aiming for Dolby Vision profile 8.1 these should be included to also have HDR10 playback compatibility:
http://x265.org/x265-delivers-dolby-vision-streams/
Yes, you should include the 2086 metadata if you want to use it. A device that can't use the 8.1 DoVi metadata will fall back to HDR-10 static metadata (or HDR10+ dynamic metadata if available and supported)
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 13th February 2019, 16:35   #9  |  Link
djloewen
Registered User
 
Join Date: Aug 2007
Posts: 112
Am I correct in understanding that there's currently no way to extract the RPU information from the secondary Dolby Vision HEVC track on a commercially-produced UHD Blu-Ray, and use that data to encode in X.265?
djloewen is offline   Reply With Quote
Old 13th February 2019, 19:06   #10  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,986
I don't believe there is, at least not publicly available.

Also, it's x265 not X.265
Blue_MiSfit is offline   Reply With Quote
Old 13th February 2019, 19:20   #11  |  Link
djloewen
Registered User
 
Join Date: Aug 2007
Posts: 112
Got it, thanks .
djloewen is offline   Reply With Quote
Old 16th April 2019, 12:05   #12  |  Link
nghiabeo20
Registered User
 
Join Date: Jun 2013
Posts: 32
Quote:
Originally Posted by benwaggoner View Post
Yes, you should include the 2086 metadata if you want to use it. A device that can't use the 8.1 DoVi metadata will fall back to HDR-10 static metadata (or HDR10+ dynamic metadata if available and supported)
Does DoVi file encoded with previous version of x265 (specifically 2.5) still has this fallback capability? Thanks!
nghiabeo20 is offline   Reply With Quote
Old 18th April 2019, 16:45   #13  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,736
Quote:
Originally Posted by nghiabeo20 View Post
Does DoVi file encoded with previous version of x265 (specifically 2.5) still has this fallback capability? Thanks!
It should, but I've never tried.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 10th November 2020, 22:28   #14  |  Link
Balling
Registered User
 
Join Date: Feb 2020
Posts: 538
>or HDR10+ dynamic metadata if available and supported

Actually HDR10+ is preferred usually.
Balling is offline   Reply With Quote
Old 11th November 2020, 17:00   #15  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,736
Quote:
Originally Posted by Balling View Post
>or HDR10+ dynamic metadata if available and supported

Actually HDR10+ is preferred usually.
Yeah, anything that supports Profile 8.1 or HDR10+ will use one of those before falling back to using the (pretty lame and vestigial) 2086 static metadata.

I don't know of any devices that have shipped with BOTH DoVi 8.1 and HDR10+, and it would be up to the device to pick which one to use if both are available. I don't know if there would be any practical advantage of one over the other. DoVi Profile 5 can, in theory, provide less banding and somewhat more efficiency due to its non-backwards compatible base layer and YCtCp. I've not tested that myself yet, though. It's be a pain to evaluate without a single display that can use both modes. Probably feasible with a couple of reference displays driven by a ColorFront Transcoder...
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 20th November 2020, 17:11   #16  |  Link
Stacey Spears
Registered User
 
Join Date: Nov 2009
Location: Sammamish, WA
Posts: 66
Quote:
Originally Posted by kabelbrand View Post
Thanks, it's plain XML indeed. So how do I get a binary presentation of this? "metafier" does not seem to support it.

Btw. the source assets are linked in the command line.
Dolby Encoding Engine is available for $500 per year per node and can create a binary RPU from a Dolby Vision XML.
__________________
Stacey Spears
Co-Creator, Spears & Munsil Ultra HD Benchmark
Stacey Spears is offline   Reply With Quote
Old 21st November 2020, 00:10   #17  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,986
Quote:
Originally Posted by Stacey Spears View Post
Dolby Encoding Engine is available for $500 per year per node and can create a binary RPU from a Dolby Vision XML.
DEE is a solid tool. I've used this for several projects using Dolby tech.
Blue_MiSfit is offline   Reply With Quote
Old 21st November 2020, 23:10   #18  |  Link
quietvoid
Registered User
 
Join Date: Jan 2019
Location: Canada
Posts: 568
Posting in this thread as it's the oldest.

I made a first release of my tool: https://github.com/quietvoid/dovi_to.../tag/0.1.0-fix
It can be used to create an RPU file from a profile 5, 7 or 8 HEVC encoded file.

Commands:
demux: Demuxes single track dual layer Dolby Vision into Base layer and Enhancement layer files.
extract-rpu: Extracts Dolby Vision RPU from an HEVC encoded file.

More info in the README.
Enjoy.

Last edited by quietvoid; 22nd November 2020 at 02:23.
quietvoid is offline   Reply With Quote
Old 21st November 2020, 23:50   #19  |  Link
ghostshadow
Registered User
 
Join Date: Jan 2020
Posts: 34
Hello Quietvoid, thank you for your work
I used it on an El.hevc file containing the RPU and I have this error message
thread 'main' has overflowed its stack
ghostshadow is offline   Reply With Quote
Old 22nd November 2020, 01:53   #20  |  Link
quietvoid
Registered User
 
Join Date: Jan 2019
Location: Canada
Posts: 568
It might be related to the memory, buffer allocations..
My stack size on linux was limited to 8MB, and I was using 4MB in the code.
I have lowered it way down, please try again.

Last edited by quietvoid; 22nd November 2020 at 02:15.
quietvoid is offline   Reply With Quote
Reply

Tags
dolby vision, dovi, hdr, rpu, x265

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 04:52.


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