Opened 4 years ago

Closed 3 years ago

#59860 closed defect (fixed)

x265 v3.2.1 does not build 10-bit (yuv420p10le, yuv422p10le or yuv444p10le)

Reported by: janngobble Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: jeremyhu (Jeremy Huddleston Sequoia), dbevans (David B. Evans)
Port: x265

Description (last modified by janngobble)

I installed ffmpeg @4.1.3_0+gpl2+nonfree. This installed (among other things) x264 & x265.

x264 installed and included all 10-bit support:

bash-3.2$ ffmpeg -h encoder=libx264 | grep pixel
    Supported pixel formats: yuv420p yuvj420p yuv422p yuvj422p yuv444p yuvj444p nv12 nv16 nv21 yuv420p10le yuv422p10le yuv444p10le nv20le gray gray10le

x265 installed and did not include ANY 10-bit support:

bash-3.2$ ffmpeg -h encoder=libx264 | grep pixel
   Supported pixel formats: yuv420p yuvj420p yuv422p yuvj422p yuv444p yuvj444p gbrp gray

bash-3.2$ x265 -V
x265 [info]: HEVC encoder version 3.2.1+1-b5c86a64bbbe
x265 [info]: build info [Mac OS X][clang 10.0.1][64 bit] 8bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2

How do we fix this? Thanks!

Change History (12)

comment:1 Changed 4 years ago by mf2k (Frank Schima)

Keywords: x265 removed

comment:2 Changed 4 years ago by janngobble

Description: modified (diff)

comment:3 Changed 4 years ago by Haravikk

Came to report the same problem; tried to encode 10-bit video in ffmpeg but the necessary pixel format (yuv420p10le) isn't available. Is there some way I can build this through Macports?

comment:4 Changed 4 years ago by jmroot (Joshua Root)

Cc: jeremyhu dbevans added

comment:5 Changed 4 years ago by kencu (Ken)

It looks like x265 needs to be compiled with an extra configure argument

configure.args-append -DHIGH_BIT_DEPTH=ON

to enable > 8 bit video.

There are a few more options in the CMakeLists.txt file as well, perhaps you know if they are valuable enough to include.

Let me see if it builds with 10bit support enabled.

comment:6 Changed 4 years ago by kencu (Ken)

Seems to build without any trouble 10 bit. I didn't try 12 bit.

$ port -v installed x265
The following ports are currently installed:
  x265 @3.2.1_0 (active) platform='darwin 11' archs='x86_64' date='2020-08-27T23:41:38-0700'

$ x265 -V
x265 [info]: HEVC encoder version 3.2.1+1-b5c86a64bbbe
x265 [info]: build info [Mac OS X][clang 4.2.0][64 bit] 10bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64 SlowShuffle

comment:7 Changed 4 years ago by kencu (Ken)

There is no maintainer, so I guess I can throw up a commit with a variant for 10 bit (and perhaps 12 bit) and we can see where that takes you.

Hope it will help you. Some feedback as to how it works, whether it's all good, etc, would be nice.

comment:8 Changed 4 years ago by kencu (Ken)

BTW -- are these all mutually exclusive? ie you get 8 bit or 10 bit or 12 bit but not all three?

comment:9 Changed 4 years ago by kencu (Ken)

There is a different option as well, HDR10 PlUS, that looks perhaps useful and I think it may be more versatile in that it is an added library that appears to be optionally used. I'd appreciate a bit of input from someone who uses this stuff to comment on what is the best configuration to help you out.

See <http://hg.videolan.org/x265/file/tip/source/CMakeLists.txt> for all the options available.

comment:10 Changed 3 years ago by llamafilm

I don't know how to edit a port file. Can this argument be specified in the port install command?

comment:11 Changed 3 years ago by llamafilm

Okay I figured it out and made my first Portfile to add a variant. I'm not making this variant the default because it will not run on 32-bit CPU. https://github.com/macports/macports-ports/pull/9225

comment:12 Changed 3 years ago by kencu (Ken)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.