x265 10 and 12 bit fixed 2.1 or 2.2 version

HandBrake for Windows support
Forum rules
Activity Log is required for support requests. See Must Read: How To Get Questions Answered on These Forums for details
Post Reply
hubocan
Posts: 8
Joined: Sat May 14, 2016 8:24 pm

x265 10 and 12 bit fixed 2.1 or 2.2 version

Post by hubocan » Thu Feb 16, 2017 11:38 am

Where is the x265 10 and 12 bit proper 2.1 or 2.2 DLL?

It was reported several months ago, that the last x265 DLL update contains a bug, that encoded video with 2.1 version is reported as 0.0 (quite annoying bug and should be fixed easily). There is already x265 2.2 released more than a month ago and still no update to DLL. Can you update the DLL, please? Pretty please...

tyw
Posts: 9
Joined: Wed Jul 06, 2016 1:24 pm

Re: x265 10 and 12 bit fixed 2.1 or 2.2 version

Post by tyw » Fri Feb 17, 2017 8:59 am

http://www.msystem.waw.pl/x265/
Image
0.xx , 1.xx ,Nightly

WhatZit
Posts: 35
Joined: Sat Feb 13, 2016 2:45 am

Re: x265 10 and 12 bit fixed 2.1 or 2.2 version

Post by WhatZit » Sat Feb 18, 2017 2:17 am

hubocan wrote:
Thu Feb 16, 2017 11:38 am
There is already x265 2.2 released more than a month ago and still no update to DLL. Can you update the DLL, please? Pretty please...
There's nothing stopping you from compiling your own version of HandBrake that includes the latest x265. See...

Code: Select all

General
Unique ID                      : 138802152603612272928732840795123168945 (0x686C527BFDFED336B37AAEE2B6BB36B1)
Complete name                  : E:\Special\Wet_Weather  ---1_preview.mkv
Format                         : Matroska
Format version                 : Version 4 / Version 2
File size                      : 5.81 MiB
Duration                       : 30 s 80 ms
Overall bit rate               : 1 621 kb/s
Encoded date                   : UTC 2017-02-18T01:55:24Z
Writing application            : HandBrake 20170217191142-fe77123-master 2017021801
Writing library                : Lavf57.7.2 / Lavf57.7.2

Video
ID                             : 1
Format                         : HEVC
Format/Info                    : High Efficiency Video Coding
Format profile                 : Main 10@L3.1@Main
Codec ID                       : V_MPEGH/ISO/HEVC
Duration                       : 30 s 72 ms
Width                          : 1 024 pixels
Height                         : 576 pixels
Display aspect ratio           : 16:9
Frame rate mode                : Constant
Frame rate                     : 23.976 (24000/1001) FPS
Color space                    : YUV
Chroma subsampling             : 4:2:0
Bit depth                      : 10 bits
Writing library                : x265 2.3+7-c15f8bce9f4b:[Windows][GCC 6.3.0][64 bit] 10bit
Encoding settings              : cpuid=1050111 / frame-threads=3 / numa-pools=8 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=1024x576 / interlace=0 / total-frames=0 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=3 / no-allow-non-conformance / no-repeat-headers / annexb / no-aud / no-hrd / info / hash=0 / no-temporal-layers / open-gop / min-keyint=24 / keyint=240 / bframes=4 / b-adapt=0 / b-pyramid / bframe-bias=0 / rc-lookahead=15 / lookahead-slices=0 / scenecut=40 / no-intra-refresh / ctu=64 / min-cu-size=8 / no-rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=0 / dynamic-rd=0.00 / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / no-strong-intra-smoothing / max-merge=2 / limit-refs=3 / no-limit-modes / me=1 / subme=2 / merange=57 / temporal-mvp / weightp / no-weightb / no-analyze-src-pics / deblock=-6:-6 / no-sao / no-sao-non-deblock / rd=2 / no-early-skip / no-rskip / fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / rdpenalty=0 / psy-rd=4.00 / psy-rdoq=0.00 / no-rd-refine / analysis-mode=0 / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=crf / crf=21.0 / qcomp=0.60 / qpstep=1 / stats-write=0 / stats-read=0 / ipratio=1.10 / pbratio=1.00 / aq-mode=0 / aq-strength=0.00 / no-cutree / zone-count=0 / no-strict-cbr / qg-size=64 / rc-grain / qpmax=69 / qpmin=0 / sar=1 / overscan=0 / videoformat=5 / range=0 / colorprim=1 / transfer=1 / colormatrix=1 / chromaloc=0 / display-window=0 / max-cll=0,0 / min-luma=0 / max-luma=1023 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / opt-qp-pps / opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / no-opt-cu-delta-qp / no-aq-motion / no-hdr / no-hdr-opt / Capture-colorprim=3
Default                        : Yes
Forced                         : No
Color range                    : Limited
Color primaries                : BT.709
Transfer characteristics       : BT.709
Matrix coefficients            : BT.709

Audio
ID                             : 2
Format                         : AAC
Format/Info                    : Advanced Audio Codec
Format profile                 : LC
Codec ID                       : A_AAC
Duration                       : 30 s 80 ms
Channel(s)                     : 6 channels
Channel positions              : Front: L C R, Side: L R, LFE
Sampling rate                  : 48.0 kHz
Frame rate                     : 46.875 FPS (1024 spf)
Compression mode               : Lossy
Delay relative to video        : 3 ms
Title                          : Surround
Language                       : English
Default                        : Yes
Forced                         : No
Works beautifully!

All you have to do is follow these instructions, but add a trivial Step 7.5 and do something completely different for Step 12.

I'm not going to tell you what those alterations are, because this is something you need to figure out for yourself.

Why?

Because when something goes wrong, and it will, you'll also need to figure out the solution for yourself. Don't come here asking why your modified nightly code doesn't work.

ByteShare
Posts: 30
Joined: Fri Aug 07, 2015 1:21 am

Re: x265 10 and 12 bit fixed 2.3+ & FDK

Post by ByteShare » Fri Feb 24, 2017 3:40 pm

Modification from: https://trac.handbrake.fr/wiki/CompileOnWindows
--Note-- The HandBrake team will NOT support any custom build of HandBrake, be warned.

I found the easiest thing to do was:

Fresh Ubuntu 14.04 install:

sudo apt-get install subversion yasm build-essential autoconf libtool \

zlib1g-dev libbz2-dev libogg-dev libtheora-dev libvorbis-dev \

libsamplerate-dev libxml2-dev libfribidi-dev libfreetype6-dev \

libfontconfig1-dev libass-dev intltool libglib2.0-dev libdbus-glib-1-dev \

libgtk2.0-dev libgudev-1.0-dev libwebkit-dev libnotify-dev \

libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libappindicator-dev \

gcc-multilib


Or:
sudo apt-get install subversion yasm build-essential autoconf libtool

sudo apt-get install zlib1g-dev libbz2-dev libogg-dev libtheora-dev libvorbis-dev

sudo apt-get install libsamplerate-dev libxml2-dev libfribidi-dev libfreetype6-dev

sudo apt-get install libfontconfig1-dev libass-dev intltool libglib2.0-dev libdbus-glib-1-dev

sudo apt-get install libgtk2.0-dev libgudev-1.0-dev libwebkit-dev libnotify-dev

sudo apt-get install libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libappindicator-dev

sudo apt-get install gcc-multilib

>then:

sudo apt-get install git yasm libtool intltool cmake

>then:

Extract mingw-w64-bin_x86_64-linux_20131228.tar.bz2 to home folder as mingw

*-------------------------------------*
After those steps:

Then edit the file: libstdc++.la

Located: /home/User/mingw/x86_64-w64-mingw32/lib

Last option from: /home/mingw-w64/mingw-w64/linux-x86_64-x86_64/build/build/root/x86_64-w64-mingw32/lib/../lib

Change To: /home/User/mingw/x86_64-w64-mingw32/lib

Run:

export PATH=~/mingw/bin:$PATH

(to test mingw) Run: x86_64-w64-mingw32-gcc -v

>then:
git clone https://github.com/HandBrake/HandBrake.git

-Outside of terminal go to the HandBrake folder and edit the file:
HandBrake/contrib/x265/module.defs
Using https://bitbucket.org/multicoreware/x265/downloads/ for recent link you should change the fetch and extract info to look like:
X265.FETCH.url = https://bitbucket.org/multicoreware/x26 ... 2.3.tar.gz
X265.FETCH.basename = x265_2.3.tar.gz
X265.EXTRACT.tarbase = x265_2.3
manually add new x265 tar to /home/test/HandBrake/download and extract

>then:
cd HandBrake

>then:
./configure --cross=x86_64-w64-mingw32 --enable-x265 --enable-qsv --enable-hwd --launch-jobs=1 --launch --enable-fdk

Files:
/home/User/HandBrake/build/HandBrakeCLI.exe
/home/User/HandBrake/build/libhb/hb.dll

------------------------------------
For GUI:

Compiling the Windows GUI

Install Microsoft Visual Studio Community edition from ​https://www.visualstudio.com/en-us/prod ... ty-vs.aspx

Download zip: ​https://github.com/HandBrake/HandBrake.git The source code for the GUI is in the Win/CS folder. The solution file is named HandBrake.sln

Please make sure HandBrakeWPF is set as the startup project in the "Solution Explorer". Right click it and choose "Set as startup project" if it is not.

change under HandBrake WPF > Converters > AUdio > AudioEncoderConverter.cs
Remove the if statment for: if (!HandBrakeEncoderHelpers.AudioEncoders.Any(a => a.ShortName.Contains("fdk")))

Save all

Now simply go to the Build Menu and click "Build Solution"

Please note, you will need to copy hb.dll into the output folder where HandBrake.exe is compiled to. Depending on the build profile you select, you will find it in a folder under: trunk\win\CS\HandBrakeWPF\bin\...

You'll also need the x265 .DLLs for the version you installed which you can get from http://msystem.waw.pl/x265/
Get the GCC 6.3 version
Last edited by ByteShare on Fri Feb 24, 2017 8:14 pm, edited 1 time in total.

User avatar
s55
HandBrake Team
Posts: 8682
Joined: Sun Dec 24, 2006 1:05 pm

Re: x265 10 and 12 bit fixed 2.1 or 2.2 version

Post by s55 » Fri Feb 24, 2017 7:03 pm

Code: Select all

change under HandBrake WPF > Converters > AUdio > AudioEncoderConverter.cs
Remove the if statment for: if (!HandBrakeEncoderHelpers.AudioEncoders.Any(a => a.ShortName.Contains("fdk")))
Do not do this. This is here for a reason and will NOT enable the FDK encoder for you. It either won't work, or it'll fallback to libavaac.

That code checks if FDK is available in the compile. So if its not, it doesn't show the menu option for it.


Also, the x265 included in HandBrake will show 2.1, not 0.0. We corrected this in the package so it's a non issue.

Finally, I'll warn people again, you will not get any support for using custom versions. If you get crashing or problems because of it, your very much on your own. We will probably upgrade to 2.3 in the not so distant future in the nightly builds.

ByteShare
Posts: 30
Joined: Fri Aug 07, 2015 1:21 am

Re: x265 10 and 12 bit fixed 2.1 or 2.2 version

Post by ByteShare » Fri Feb 24, 2017 8:10 pm

s55 wrote:
Fri Feb 24, 2017 7:03 pm
Do not do this. This is here for a reason and will NOT enable the FDK encoder for you. It either won't work, or it'll fallback to libavaac.
That is why I say to build the hb.dll with "--enable-fdk"
I updated my instructions with a warning at the top.
s55 wrote:
Fri Feb 24, 2017 7:03 pm
the x265 included in HandBrake will show 2.1, not 0.0. We corrected this in the package so it's a non issue.
My instructions are to get it (x265) up to date, not to correct the 0.0 issue. Looking forward to the nightlies having 2.3

User avatar
s55
HandBrake Team
Posts: 8682
Joined: Sun Dec 24, 2006 1:05 pm

Re: x265 10 and 12 bit fixed 2.1 or 2.2 version

Post by s55 » Fri Feb 24, 2017 8:15 pm

My comments were directed at many people, not just you.

You still don't have to remove that code. If the encoder is not appearing, it's not available. (i.e not compiled in)

ByteShare
Posts: 30
Joined: Fri Aug 07, 2015 1:21 am

Re: x265 10 and 12 bit fixed 2.1 or 2.2 version

Post by ByteShare » Fri Feb 24, 2017 8:29 pm

s55 wrote:
Fri Feb 24, 2017 8:15 pm
My comments were directed at many people, not just you.

You still don't have to remove that code. If the encoder is not appearing, it's not available. (i.e not compiled in)
Okay, makes sense. Thank you.

Post Reply