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 11th October 2017, 20:52   #5641  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,336
x265 has no support for anything Dolby Vision, you would need external tools that support this, including writing the required metadata for Dolby Vision.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is offline   Reply With Quote
Old 11th October 2017, 22:43   #5642  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,746
... yet?
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 12th October 2017, 00:07   #5643  |  Link
x265_Project
Guest
 
Posts: n/a
Quote:
Originally Posted by nevcairiel View Post
x265 has no support for anything Dolby Vision, you would need external tools that support this, including writing the required metadata for Dolby Vision.
All dynamic HDR requires external tools to analyze the color volume of the video, frame by frame, saving this metadata to a file. For example, Samsung contributed code to x265 enabling us to parse this metadata and insert it into the HEVC bitstream as SEI messages. We are always working with partners in the video ecosystem to find ways to make these kinds of integrations easier and more reliable for our mutual end-users.
  Reply With Quote
Old 12th October 2017, 06:46   #5644  |  Link
jlpsvk
Registered User
 
Join Date: Dec 2014
Posts: 240
if i will mux the second dolby layer to encoded mkv...will it work?
jlpsvk is offline   Reply With Quote
Old 12th October 2017, 07:15   #5645  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,336
Quote:
Originally Posted by jlpsvk View Post
if i will mux the second dolby layer to encoded mkv...will it work?
No. MKV has no support for Dolby Vision. Not to mention the additional metadata to even identify the streams as Dolby Vision.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is offline   Reply With Quote
Old 12th October 2017, 18:51   #5646  |  Link
byteshare
ByteShare
 
byteshare's Avatar
 
Join Date: Sep 2014
Location: On the Internet
Posts: 560
@x265_Project, is it possible to have metric data, such as SSIM scores put into the media info like the encoding settings are?
byteshare is offline   Reply With Quote
Old 12th October 2017, 19:40   #5647  |  Link
d3rd3vil
Registered User
 
Join Date: Jun 2016
Posts: 92
Quote:
Originally Posted by x265_Project View Post
All dynamic HDR requires external tools to analyze the color volume of the video, frame by frame, saving this metadata to a file. For example, Samsung contributed code to x265 enabling us to parse this metadata and insert it into the HEVC bitstream as SEI messages. We are always working with partners in the video ecosystem to find ways to make these kinds of integrations easier and more reliable for our mutual end-users.
Well that sounds very good. Hopefully you can achieve sth. sooner or later

With mkv not supporting DV you mean Matroska as the stream, right? Cause there are mkv containers with mpeg-ts Dolby Vision streams, that seems to work. But the matroska stream doesnt work?!

For example this one is an mkv: https://drive.google.com/file/d/0Bwx...dZaGtaVm8/view

Last edited by d3rd3vil; 12th October 2017 at 19:42.
d3rd3vil is offline   Reply With Quote
Old 12th October 2017, 21:22   #5648  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,217
Oh jeez @d3rd3vil,

That so-called 'sample' is a classic example where some idiot has simply changed the file extension from .ts to .mkv

The sample has not been muxed into the .mkv container!
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 16th October 2017, 12:23   #5649  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,746
Just in case you do not yet know already: The intel C++ compiler under Linux is not compatible with glibc 2.24-9 and newer, because:

Quote:
According to x86-64 psABI, xmm0-xmm7 can be used to pass function parameters. But ICC also uses xmm8-xmm15 to pass function parameters which violates x86-64 psABI.

As a workaround, you can set environment variable LD_BIND_NOW=1 by

# export LD_BIND_NOW=1
This seems to be exposed especially on CPU's with AVX support. Of course, x265 will mainly use hand-crafted assembly where possible. But where this is not yet available ... you may have to be aware of possible risks if a recent version of glibc is used (well, I am not sure if x265 uses that, but I believe it is a quite basic library).

There are bug reports from the glibc project and RedHat.

Please don't mind me if this issue is irrelevant for x265. I just assumed that a cross-platform project using AVX instructions may be among the possibly affected.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 18th October 2017, 19:24   #5650  |  Link
Archimondro
Registered User
 
Join Date: Nov 2016
Posts: 2
Hey Guys

Im encoding some Videos to h.265 using megui and x265 Encoder.
In 95% everything runs smooth, but from time to time i encounter an error. Half of the time when i restart the encode, it works, withouth changing anything.

Here is the Log:
Code:
[Error] Log for job3 (video, Matrix.(03).2003.Revolutions.German.AAC51.DL.1080p.BluRay.x264-Kristallprinz.mkv.avs -> Matrix.(03).2003.Revolutions.German.AAC51.DL.1080p.BluRay.hevc)
-[Information] [18.10.2017 10:08:19] Started handling job
-[Information] [18.10.2017 10:08:19] Preprocessing
-[Information] [18.10.2017 10:08:19] AviSynth input script
--[NoImage] global MeGUI_darx = 120
--[NoImage] global MeGUI_dary = 49
--[NoImage] #resize
--[NoImage] LoadPlugin("C:\Users\Gandolf\Desktop\meGUI\tools\lsmash\LSMASHSource.dll")
--[NoImage] LWLibavVideoSource("F:\MeguiWorking\1g2hykjs.0bm\Matrix.(03).2003.Revolutions.German.AAC51.DL.1080p.BluRay.x264-Kristallprinz.mkv")
-[Information] [18.10.2017 10:08:30] resolution: 1920x784
-[Information] [18.10.2017 10:08:30] frame rate: 24000/1001
-[Information] [18.10.2017 10:08:30] frames: 185956
-[Information] [18.10.2017 10:08:30] aspect ratio (avs): 120:49 (2.449)
-[Information] [18.10.2017 10:08:30] custom command line: --bframes 6 --pmode --pools 24,0 --pme --wpp --me star
-[Information] [18.10.2017 10:08:31] Job command line: "C:\Users\Gandolf\Desktop\meGUI\tools\x265\avs4x26x.exe" --x26x-binary "C:\Users\Gandolf\Desktop\meGUI\tools\x265\x64\x265.exe" --preset slow --crf 24.0 --bframes 6 --pmode --pools 24,0 --pme --wpp --me star --sar 1:1 --output "F:\MeguiWorking\1g2hykjs.0bm\Matrix.(03).2003.Revolutions.German.AAC51.DL.1080p.BluRay.hevc" "F:\MeguiWorking\1g2hykjs.0bm\Matrix.(03).2003.Revolutions.German.AAC51.DL.1080p.BluRay.x264-Kristallprinz.mkv.avs"
-[Information] [18.10.2017 10:08:31] Process started
-[Information] [18.10.2017 10:08:31] Standard output stream
--[Information] [18.10.2017 15:44:42] avs [info]: AviSynth 2.60, build:Mar 31 2015 [16:38:54]
--[Information] [18.10.2017 15:44:42] avs [info]: Video colorspace: YV12
--[Information] [18.10.2017 15:44:42] avs [info]: Video resolution: 1920x784
--[Information] [18.10.2017 15:44:42] avs [info]: Video framerate: 24000/1001
--[Information] [18.10.2017 15:44:42] avs [info]: Video framecount: 185956
--[Information] [18.10.2017 15:44:42] avs4x26x [info]: "C:\Users\Gandolf\Desktop\meGUI\tools\x265\x64\x265.exe" - --preset slow --crf 24.0 --bframes 6 --pmode --pools 24,0 --pme --wpp --me star --sar 1:1 --output F:\MeguiWorking\1g2hykjs.0bm\Matrix.(03).2003.Revolutions.German.AAC51.DL.1080p.BluRay.hevc  --frames 185956 --fps 24000/1001 --input-res 1920x784 --input-csp i420
-[Error] [18.10.2017 10:08:31] Standard error stream
--[Information] [18.10.2017 10:08:42] yuv  [info]: 1920x784 fps 24000/1001 i420p8 sar 1:1 unknown frame count
--[Information] [18.10.2017 10:08:42] raw  [info]: output file: F:\MeguiWorking\1g2hykjs.0bm\Matrix.(03).2003.Revolutions.German.AAC51.DL.1080p.BluRay.hevc
--[Information] [18.10.2017 10:08:42] x265 [info]: HEVC encoder version 2.5+2-18fa144d453e
--[Information] [18.10.2017 10:08:42] x265 [info]: build info [Windows][GCC 7.1.0][64 bit] 8bit+10bit+12bit
--[Information] [18.10.2017 10:08:42] x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
--[Warning] [18.10.2017 10:08:42] x265 [warning]: Limit reference options 2 and 3 are not supported with pmode. Disabling limit reference
--[Information] [18.10.2017 10:08:42] x265 [info]: Main profile, Level-4 (Main tier)
--[Information] [18.10.2017 10:08:42] x265 [info]: Thread pool 0 using 24 threads on numa nodes 0
--[Information] [18.10.2017 10:08:42] x265 [info]: Slices                              : 1
--[Information] [18.10.2017 10:08:42] x265 [info]: frame threads / pool features       : 4 / wpp(13 rows)+pmode+pme 
--[Information] [18.10.2017 10:08:42] x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
--[Information] [18.10.2017 10:08:42] x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
--[Information] [18.10.2017 10:08:42] x265 [info]: ME / range / subpel / merge         : star / 57 / 3 / 3
--[Information] [18.10.2017 10:08:42] x265 [info]: Keyframe min / max / scenecut / bias: 23 / 250 / 40 / 5.00
--[Information] [18.10.2017 10:08:42] x265 [info]: Lookahead / bframes / badapt        : 25 / 6 / 2
--[Information] [18.10.2017 10:08:42] x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0
--[Information] [18.10.2017 10:08:42] x265 [info]: References / ref-limit  cu / depth  : 4 / off / off
--[Information] [18.10.2017 10:08:42] x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 1.0 / 32 / 1
--[Information] [18.10.2017 10:08:42] x265 [info]: Rate Control / qCompress            : CRF-24.0 / 0.60
--[Information] [18.10.2017 10:08:42] x265 [info]: tools: rect limit-modes rd=4 psy-rd=2.00 rdoq=2 psy-rdoq=1.00
--[Information] [18.10.2017 10:08:42] x265 [info]: tools: rskip signhide tmvp strong-intra-smoothing lslices=4
--[Information] [18.10.2017 10:08:42] x265 [info]: tools: deblock sao
--[Error] [18.10.2017 15:44:42] avs [error]: Error occurred while writing frame 149307
--[Information] [18.10.2017 15:44:42] (Maybe x26x closed)
-[Error] [18.10.2017 15:44:42] Process exits with error: 0xC0000025 STATUS_NONCONTINUABLE_EXCEPTION (-1073741787)
-[Information] [18.10.2017 15:44:42] Job completed
My System:
-WIndows 10 64bit
-64gb RAM
-2x Xeon e5-2697-v3 (36C/72T)
&
-WIndows 10 64bit
-64gb RAM
-2x Xeon e5-2670-v3 (24C/48T)

There is more than enough free HDD space, that cant be the problem.

I run two Workers simulatneously, one with --pools 36,0 and the other --pools 0,36

It also happens when i set --pools 36,36 (running two or a single worker)

If you need any more information, let me know.

Cheers
Archimondro is offline   Reply With Quote
Old 18th October 2017, 22:21   #5651  |  Link
microchip8
ffx264/ffhevc author
 
microchip8's Avatar
 
Join Date: May 2007
Location: /dev/video0
Posts: 1,843
@Archimondro

no help on pirated content. Read the rules!
__________________
ffx264 || ffhevc || ffxvid || microenc
microchip8 is offline   Reply With Quote
Old 19th October 2017, 08:49   #5652  |  Link
Archimondro
Registered User
 
Join Date: Nov 2016
Posts: 2
@froggy1 Not illegal where i live, but ok.
Archimondro is offline   Reply With Quote
Old 20th October 2017, 18:16   #5653  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,738
Quote:
Originally Posted by d3rd3vil View Post
If I have an m2ts file with 2 layers and HDR10 PLUS Dolby Vision but the TV only recognizes HDR10, is there a way to force Dolby Vision somehow?
Wow, a lot of Dolby Vision questions!

First off, there aren't any extant Dolby Vision titles that use HDR10 as a base layer. The two modes you'll see in streaming or discs today are:

SDR base layer + enhancement layer + dynamic metadata
Non-backwards compatible base layer + dynamic metadata

The enhancement layer is quarter res of the base layer, so a 2160p title would have a 1080p base layer.

The non-backwards compatible base layer dynamically shifts the code values to make maximal use of the 10-bit space, and is in ICtCp. Playing it back as itself would be very trippy, but sub VideoCD quality.

In both cases, the layers and metadata are combined to render a 12-bit ICtCp frame. From there it gets tone mapped to the actual display's characteristics using yet more metadata. Lots of science and tricks go into the playback process, including dynamic backlight control for non-OLED displays.

As far as reusing or reencoding these streams, that would require a LOT of tooling. There's a lot of metadata (both for rendering out the source to the intermediate space, and then rendering from that to the current display) that needs to get transferred correctly for DoVi playback. And you'd need to be able to feed that content back into a DoVi player.

Reencoding is going to be even more fraught. By default DoVi uses ICtCp instead of Y'CbCr color space; that's what the non-backwards compatible stream is in. And for dual layer, the enhancement layer is its own thing that doesn't look like natural images at all. So reencoding using traditional psychovisual tuning may result in...issues.

Dolby Vision has a whole lot of other modes, some implemented in shipping devices, some not. But AFAIK everything available to consumers today uses one of the above.

If 12-bit decoders become broadly available in CE devices someday (NVidia starting with Pascal is the only thing I know of doing it today), then DoVi could just use 12-bit ICtCp + playback metadata, which would make for simpler implementations. The content would already be in the intermediate format, leaving the (highly complex) tone mapping to display stage.

I don't know if anything particularly interesting or useful could be done with DoVi today without licensing the Dolby Vision SDK.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 20th October 2017, 18:18   #5654  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,738
Quote:
Originally Posted by d3rd3vil View Post
Yeah well but it doesnt. MKVToolNix shows 2 streams one with 4k and one with 1080p. Ofc thats not really accurate cause MKVToolNix doesnt support Dolby Vision but both standards are there. The TV doesnt play the m2ts.

So I have to convert the m2ts to mkv which THEN only seems to support HDR10.

As an example this one: http://4kmedia.org/lg-dolby-vision-uhd-4k-demo/

Once I've used MKVToolNix, the Dolby Vision is gone

Is there at least a way to see if I am using Dolby Vision or not? The TS and the MKV files look pretty much the same in MediaInfo for example. But one has DV the other doesnt....
Per my previous post, it is extremely unlikely that any existing open-source tools would be able to preserve all the required DoVi metadata. I haven't heard about a MKV mapping for DoVi. A whole lot of spec would need to be available for both the muxing and the playback for this work, even running on an app where there is an OS-level DoVi decoder and display tone mapper.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 20th October 2017, 21:59   #5655  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,217
Quote:
Originally Posted by benwaggoner View Post
Wow, a lot of Dolby Vision questions!
Indeed... Perhaps they would be better merged into one topic
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 21st October 2017, 10:09   #5656  |  Link
d3rd3vil
Registered User
 
Join Date: Jun 2016
Posts: 92
Thank you very much benwaggoner for the detailed information. Its interesting and YET disappointing its thats difficult meaning no Dolby Vision for us noses soon Cant be helped aparently.

At least Dolby itself could release a DV software that would be nice
d3rd3vil is offline   Reply With Quote
Old 22nd October 2017, 16:36   #5657  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,738
Quote:
Originally Posted by d3rd3vil View Post
Thank you very much benwaggoner for the detailed information. Its interesting and YET disappointing its thats difficult meaning no Dolby Vision for us noses soon Cant be helped aparently.

At least Dolby itself could release a DV software that would be nice
Dolby Vision is a quite complex set of technologies. In essence,
  • Starts with 12-bit Y'CtCp PQ 2020 HDR content, typically 4000 nits peak and using the P3 subset of color volume.
  • Plus creative intent metadata where a colorist indicates what parts of what frames are important to preserve on displays that are less than 4000 nit P3 (like blue sky or bright sky)
  • Encodes it into one or two lower precision layers with metadata so it can be decoded with existing HW decoders
  • On a device, decodes and then reverses the 1/2 layer coding to the native 12-bit Y'CtCp color space
  • Then uses information about the particulars of the display it is being played back, combined with the creative intent metadata, to determine the optional way to map the 4000 nit P3 into whatever the display is capable of, so the sky comes out in the right mix of bright and blue
  • And some even more complex pixel mapping and metadata stuff to make it work over HDMI

This isn't a simple incremental technology, but a complex set of interlocking technologies that need to get implemented together to be useful.

If one already has DoVi elementary streams and wants to play them back on a device that's enabled with DoVi playback, that seems potentially feasible as a pure muxing project. But even then there is a whole lot of metadata that needs to be handled correctly. I don't know of any open-source muxers are capable of this. Not that I've tried personally.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 25th October 2017, 15:48   #5658  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,746
Trying to switch from MSYS (XhmikosR) to MSYS2 (MABS); it's not so simple, using separate runs in MinGW32 and MinGW64 as workaround for now to avoid patching the cross compilation toolchain file.

x265 2.5+27-0e168bdeb48b (GCC 7.2.0)
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid

Last edited by LigH; 26th October 2017 at 15:53.
LigH is offline   Reply With Quote
Old 26th October 2017, 12:01   #5659  |  Link
Barough
Registered User
 
Barough's Avatar
 
Join Date: Feb 2007
Location: Sweden
Posts: 481
x265 v2.5+31-df2de6ea407d (GCC 7.2.0, 32 & 64-bit 8/10/12bit Multilib Windows Binaries)

x265 [info]: HEVC encoder version 2.5+31-df2de6ea407d
x265 [info]: build info [Windows][GCC 7.2.0][32/64 bit] 8bit+10bit+12bit


Code:
https://bitbucket.org/multicoreware/x265/commits/branch/default
Barough is online now   Reply With Quote
Old 26th October 2017, 15:53   #5660  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,746
x265 2.5+31-df2de6ea407d

Support for more monochrome video source formats; plus a few fixed nits.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH 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 09:34.


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