VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 57
Thread

Threaded View

  1. Introduction: As you are likely aware, the FDK-AAC encoder was removed from Handbrake (https://www.videohelp.com/software/HandBrake) from version 0.10.5 onwards, as it can no longer be publicly distributed due to GPL licensing issues (see: https://forum.handbrake.fr/viewtopic.php?f=33&t=34143).

    The default AAC encoder Libav (https://www.videohelp.com/software/Libav) is lacking in quality compared to FDK (especially at lower bitrates) as its only a basic AAC encoder, however from version 1.2.0 onwards, HandBrake uses the FFmpeg AAC encoder which is better than Libav but still not as good as FDK (see this website for more info about AAC encoders: http://wiki.hydrogenaud.io/index.php?title=AAC_encoders). The Mac version of HandBrake uses Apple’s Core Audio AAC encoder, which is better than FDK but cannot be provided on Windows as its a proprietary library.

    Fortunately, you can still compile HandBrake from source and enable FDK as an optional compile-time option, this guide will tell you how this can be done for the Windows version of HandBrake:


    Warning: This process is not easy and is only recommended to more advanced users!

    Note: This also works with VidCoder since it uses HandBrake as its encoding engine!


    1. Fresh install Ubuntu (18.04.3 LTS is recommended due to a known set of packages and is easier for new users who want to attempt this process, later versions and other distros may work as well!), either on a PC via dual booting (or on a separate PC!), or on a Virtual Machine through software such as VirtualBox or VMware (recommended HDD space: 15-20GB with an allocated 2GB or more of RAM).

    Ubuntu download: https://www.ubuntu.com/download/desktop
    VirtualBox download: https://www.virtualbox.org/wiki/Downloads

    See this guide if you need help installing Ubuntu in VirtualBox: https://linus.nci.nih.gov/bdge/installUbuntu.html

    Alternatively, if you have the Windows 10 Creators update installed, you can complete this build process using the Windows Subsystem for Linux (WSL), however it is command line only and is only recommended for more advanced users, its also much slower due to the way it handles disk access! (See: https://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/)

    Obvious note: Don’t forget to press ‘enter’ after typing/pasting each terminal command to execute it!


    2. Open a Terminal Window (Ctrl + Alt + T) and maximise it if you want to see all the text go by more clearly, you should start in your "Home" directory, which is: user@computer:~$ (it should already be in the “Home” directory by default).


    3. Enter (or copy/paste the following commands into the terminal, WITHOUT quotes):

    “sudo apt-get update” (this installs the latest updates in Ubuntu)

    “sudo apt-get install automake autoconf autopoint build-essential cmake gcc git intltool libtool libtool-bin m4 make nasm ninja-build patch pkg-config python tar zlib1g-dev”

    This will install/upgrade these required packages/dependencies to the latest versions (Some of these will likely already be installed).

    “sudo apt-get install meson” (only enter this command if you are running Ubuntu 19.10)

    If you are running Ubuntu 18.04 LTS, the meson package is too old, you therefore need to install a newer version provided by the Python Package Index with the following commands:

    “sudo apt-get install python3-pip”
    “sudo pip3 install meson”

    You also need to install these additional dependencies required to build the MinGW-w64 toolchain: “sudo apt-get install bison bzip2 curl flex g++ gzip pax”


    Note: You may be asked to enter your administrative password for Ubuntu after these commands, type it in, press enter, then press ‘y‘ and press enter again to confirm.

    OPTIONAL: After the above commands, if you see some sort of message about packages no longer being required, enter:
    “sudo apt autoremove” to delete them. These are usually old system kernels left over from software updates, and can/should be removed. The Ubuntu desktop uses System Settings->Details (the "gear" icon) to perform much the same function as Windows Update.


    If you are running Ubuntu 16.04 LTS, the NASM version in the base repository is too old (2.11.08), so compile from source with the following command instead:
    “curl -O https://www.nasm.us/pub/nasm/releasebuilds/2.13.02/nasm-2.13.02.tar.bz2
    sudo tar -xf nasm-2.13.02.tar.bz2
    cd nasm-2.13.02
    sudo ./configure --prefix=/usr/local --enable-sections --enable-lto
    sudo make -j$(nproc)
    sudo make install
    source ~/.bashrc
    cd ..”
    Then enter “cd” to return back to the "Home" directory.

    See: https://handbrake.fr/docs/en/latest/developer/build-windows.html for more info.



    4. Enter:

    “git clone https://github.com/HandBrake/HandBrake.git && cd HandBrake”

    This will download the entire HandBrake source code (repository) and place it in a directory called "HandBrake". Note that this is the NIGHTLY "master" code, not the latest "stable" release.

    The Nightly builds are generally quite stable PROVIDED that you avoid cloning it during periods of intensive (i.e. multiple daily) developmental commits. (See: https://github.com/HandBrake/HandBrake/commits/master)

    Check out the most recent release in the 1.3 series with the following commands:
    “git tag --list”
    “git tag --list | grep ^1\.3\.”
    “git checkout refs/tags/$(git tag -l | grep -E '^1\.3\.[0-9]+$' | tail -n 1)”

    OPTIONAL: If you want an older specific stable release of HandBrake, enter the following commands:
    “cd HandBrake”
    (this changes the directory to HandBrake)
    “git tag”
    (this lists the tags)
    “git checkout tags/1.2.0”
    (or whichever version you want from the list), this will pull that specific version of HandBrake from the repository you just downloaded, then enter “cd” to return back to the “Home” directory.



    5. Depending on whether you’re using the 32 or 64-bit version of HandBrake in Windows, enter one of the following commands to build the MinGW-w64 toolchain where “username” is your Ubuntu username, feel free to use a different output path if desired:

    32-bit (versions 1.0.7 or earlier only!):
    “scripts/mingw-w64-build i686 /home/username/toolchains/”

    64-bit:
    “scripts/mingw-w64-build x86_64 /home/username/toolchains/”

    Remember: all folder/file names are CASE-SENSITIVE! This will take around 40 minutes (possibly much longer depending on your PC setup!) to download the MinGW compiler and build it inside the "toolchains" directory (around 3-4GB).


    6. When Step 5 is finished, you'll see a message very much like:

    run the following command and add it to your shell startup script
    (e.g., .bashrc or .bash_profile) to make persistent across sessions:
    export PATH="/home/user/toolchains//x86_64/bin${PATH}"



    7. Use your mouse to copy the export PATH= ...etc... (whole line), and paste it into the Terminal. You might have to use the right-mouse context menu to copy/paste. This adds the MinGW compiler into the command search path.


    8. Enter (optional):

    32-bit (versions 1.0.7 or earlier only!):
    “i686-w64-mingw32-gcc -v”
    or
    64-bit:
    “x86_64-w64-mingw32-gcc -v”

    to make sure Linux can find the compiler. If you see some "not installed" messages, go back to Step 6 and check carefully. There is no error message for adding a non-existent path string to ${PATH}.


    9. Finally, enter:
    “cd HandBrake”
    (to change to the HandBrake directory), then enter one of the following commands to execute the build process:


    32-bit (versions 1.0.7 or earlier only!):
    “./configure --cross=i686-w64-mingw32 --enable-x265 --enable-qsv --enable-fdk-aac -- launch-jobs=$(nproc) --launch”

    64-bit:
    “./configure --cross=x86_64-w64-mingw32 --enable-fdk-aac --enable-qsv --enable-vce --enable-nvenc --launch-jobs=$(nproc) --launch”



    10. After around 30 minutes or more (again depends on your PC setup) and mind-boggling walls of text, you should get a SUCCESS message. If you do have persistent problems with the build process, your best chance of success is to use a fresh Ubuntu install, use the File Manager to delete any existing “HandBrake” and “toolchains” directories you might have, only installing the packages from Step 3, and not go fiddling about too much with your Ubuntu setup.

    11. Use the File Manager to copy the HandBrake/build/HandBrakeCLI.exe (no longer used by the HandBrake GUI in Windows from version 1.0.x) and HandBrake/build/libhb/hb.dll files to a location that Windows can access (e.g. through a shared folder if on a Virtual Machine).


    See this guide for setting up a shared folder between Ubuntu guests and Windows host machines in VirtualBox (requires Guest Additions to be installed first): https://www.howtogeek.com/187703/how-to-access-folders-on-your-host-machine-from-an-ub...in-virtualbox/


    12. Copy the file(s) from Step 11 into your HandBrake (or VidCoder) installation directory in Windows, overwriting the old ones. (Make sure that the version you built corresponds to the version you have installed, this also applies to which version of HandBrake that VidCoder is based on as well and whether its 32 or 64-bit!)

    Note: You should backup your existing \Program Files\HandBrake directory, and definitely export your presets. There's a good chance a new version may wipe out your user presets.



    13. Load up HandBrake or VidCoder in Windows and see if it works (do some test encodes/check the logs!), FDK-AAC should now be available to select as an audio codec in the dropdown list!

    Note: The first time running it may result in missing UI elements or options. Exit & restart HandBrake, and all should be good. Sometimes, to fix crashing on startup, you also need to delete the "Users\(you)\AppData\Roaming\HandBrake" directory in your Windows drive, so that HandBrake can create a fresh configuration.




    Warning: Doing this counts as a custom build of HandBrake and there is no support for it on their forum if you experience any issues, you are also NOT allowed to distribute custom builds of HandBrake with FDK enabled as its no longer GPL compatible.

    Remember: Updating HandBrake (or VidCoder) through the GUI will overwrite the hb.dll file in their respective Windows installation directories, therefore losing FDK, you therefore need to repeat this process if you want to continue using newer versions of HandBrake or VidCoder with FDK-AAC!


    Thanks to ‘WhatZit’ and ‘rwatt’ for original posts on the HandBrake forum: https://forum.handbrake.fr/viewtopic.php?f=11&t=34953

    Thanks also to ‘CH_JC’ for an online Reddit guide focusing on building HandBrake in WSL: https://www.reddit.com/r/handbrake/comments/bnadr6/guide_how_to_custom_build_handbrake_eg_fdk_aac/

    Thanks also to another online guide (originally in Japanese): https://translate.google.co.uk/translate?hl=en&sl=ja&u=https://www.apollomaniacs.com/i...tm&prev=search

    I have also made this guide into a Word document and have attached it to this post along with some screenshots!
    Image Attached Thumbnails Click image for larger version

Name:	HandBrake Build (Ubuntu).png
Views:	46
Size:	1.24 MB
ID:	51666  

    Click image for larger version

Name:	HandBrake (FDK-GUI).png
Views:	33
Size:	1.23 MB
ID:	51667  

    Click image for larger version

Name:	VidCoder (FDK-GUI).png
Views:	40
Size:	1.11 MB
ID:	51668  

    Image Attached Files
    Last edited by AntW93; 20th Feb 2020 at 05:33. Reason: Updated and tested with HandBrake 1.3.x (Jan 2020)
    Quote Quote  
  2. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    I did not try ... but if it works: Congratulations! This guide looks promising.

    Remember: According to the license restrictions, you may build this software from sources for yourself. But do not distribute. Keep it for yourself. Or, at least, don't tell in public if you gave anyone a copy.
    Quote Quote  
  3. Far too goddamn old now EddyH's Avatar
    Join Date
    Jan 2003
    Location
    Soul sucking suburbia! But a different part since I last logged on.
    Search Comp PM
    Without wanting to threadjack, does this also offer a way to incorporate e.g. the free Nero AAC encoder? It seems to be decent quality and not particularly slow, with the advantage of seemingly more compatible with fussy hardware players.
    (certainly it causes far fewer lockups with a certain mp3 player of mine!)

    At the present time if I want to incorporate it into handbrake-encoded video I have to rip the audio and convert it separately in e.g. Foobar then mux it back in as an additional step.

    NB I'm not even familiar with FDK so it may well be the exact same thing for all I know.
    EDIT: yes I'm aware that this would also be a violation of the GPL conditions (whilst Ahead freely give their codec away, they haven't released the source), and I would like to make the point that I really don't care so long as the damn thing works


    Two additional dumb questions:
    * Don't you need to restart the computer/VM, or at least close and reopen the terminal, after adding the path setting to the startup script, given that it's, well, a startup script? I expect there's some way to reconfigure it "live" much like there is in MS-DOS, but that doesn't seem to appear here.

    * Is there no way to get hold of the source and a Windows compiler and just compile it straight up on the target platform, if you want the Windows rather than Linux version? Last time I tried to install Ubuntu in a VM in order to use a stubbornly Linux-only application, it gave me botulism and ran over my cat. Which was especially galling given that I didn't even HAVE a cat until then. (That effort actually failed, fwiw) ... I can't imagine that there aren't any options for compiling (presumably) C++ under the Windows environment, or for downloading the Handbrake source.
    Last edited by EddyH; 4th May 2017 at 04:44.
    -= She sez there's ants in the carpet, dirty little monsters! =-
    Back after a long time away, mainly because I now need to start making up vidcapped DVDRs for work and I haven't a clue where to start any more!
    Quote Quote  
  4. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    Originally Posted by EddyH View Post
    Without wanting to threadjack, does this also offer a way to incorporate e.g. the free Nero AAC encoder?
    No. NeroAacEnc is a separate application; Handbrake won't use this kind of additional encoders, it can only use libraries included in the ffmpeg core of itself.
    Quote Quote  
  5. Originally Posted by EddyH View Post
    Without wanting to threadjack, does this also offer a way to incorporate e.g. the free Nero AAC encoder?
    No, this build guide is only for enabling the FDK-AAC encoder within HandBrake, the Nero AAC encoder is commercial and therefore not GPL compatible, and so has not/will not be included with HandBrake, and so there is no way to build HandBrake with the Nero AAC encoder inside it, the same issues also apply to the QAAC encoder!

    See: https://forum.handbrake.fr/viewtopic.php?f=26&t=36195&p=170274


    Originally Posted by EddyH View Post
    Don't you need to restart the computer/VM, or at least close and reopen the terminal, after adding the path setting to the startup script, given that it's, well, a startup script? I expect there's some way to reconfigure it "live" much like there is in MS-DOS, but that doesn't seem to appear here.
    No, you don't need to restart the computer/VM, otherwise I would have mentioned that in the guide!

    Originally Posted by EddyH View Post
    Is there no way to get hold of the source and a Windows compiler and just compile it straight up on the target platform, if you want the Windows rather than Linux version? I can't imagine that there aren't any options for compiling (presumably) C++ under the Windows environment, or for downloading the Handbrake source.
    As far as I know, HandBrake for Windows can only be cross-compiled, not natively compiled, it even says in its online documentation that building HandBrake for Windows requires Linux and a recent MinGW-w64 toolchain, see: https://handbrake.fr/docs/en/1.0.0/developer/build-windows.html

    I would love to be proved wrong though and shown that HandBrake can be compiled under the Windows environment, but I don't think it can, unfortunately!
    Last edited by AntW93; 4th May 2017 at 13:27.
    Quote Quote  
  6. This article would be useful before last year, but FFmpeg's internal AAC encoder has been much improved since last year, at least at 128kbps.

    Listening test report last year (Japanese):
    http://d.hatena.ne.jp/kamedo2/20160215/1455552816

    I guess this is the reason for HB dropping fdk encoder
    (the license issue has been there a long time)

    For the compiling part, i have not tried that myself, but the Linux Subsystem on Win10(after Creator Update) may do the job, sparing the trouble to setup a VM. After all, FFmpeg can be cross-compiled in the Linux Subsystem
    Stopping development until someone save me from poverty or get me out of Hong Kong...
    Twitter @MaverickTse
    Quote Quote  
  7. Originally Posted by MaverickTse View Post
    This article would be useful before last year, but FFmpeg's internal AAC encoder has been much improved since last year, at least at 128kbps.

    I guess this is the reason for HB dropping fdk encoder
    (the license issue has been there a long time)
    I know that significant improvements have been made to FFmpeg's internal AAC encoder, but these improvements have not yet been merged into LibAV which HandBrake uses, and we don't know if they even will, see: http://wiki.hydrogenaud.io/index.php?title=AAC_encoders and https://forum.handbrake.fr/viewtopic.php?f=26&t=34793

    I therefore recommend using the FDK-AAC encoder in HandBrake for the time being, if you are able to compile it from source!

    Originally Posted by MaverickTse View Post
    For the compiling part, i have not tried that myself, but the Linux Subsystem on Win10(after Creator Update) may do the job, sparing the trouble to setup a VM. After all, FFmpeg can be cross-compiled in the Linux Subsystem
    Interesting, I shall look into using the Linux Subsystem on Win10 for compiling HandBrake to save having to use a VM!
    Quote Quote  
  8. Member
    Join Date
    Aug 2017
    Location
    Canada
    Search Comp PM
    Originally Posted by AntW93 View Post
    Originally Posted by MaverickTse View Post
    For the compiling part, i have not tried that myself, but the Linux Subsystem on Win10(after Creator Update) may do the job, sparing the trouble to setup a VM. After all, FFmpeg can be cross-compiled in the Linux Subsystem
    Interesting, I shall look into using the Linux Subsystem on Win10 for compiling HandBrake to save having to use a VM!
    Apologies for the slight necroposting. I was able to successfully build on WSL following your instructions.

    However in step 3 I had to add the g++ package in, the MinGW build required it, and later I had to add packages specified in these walkthroughs:
    https://mattgadient.com/2016/06/20/working-around-hiccups-when-compiling-handbrake-on-linux/
    https://handbrake.fr/docs/en/latest/developer/build-windows.html

    Since WSL is command line only (for the time being), the kosher way to copy the built files is to specify the destination path simply as
    cp hb.dll /mnt/c/{path} (Replace c with *NTFS* drive letter of your choice).
    Accessing the files directly through the Windows Explorer will corrupt the WSL filesystem.

    Other caveats: archive extraction and build is SLOW on WSL. WSL uses a "worst of both worlds" approach to disk access (and the linux store is hosted on my SSD). My computer was more than likely also a bottleneck, so whichever was the bigger factor, Step 5 took me almost 2 hours.

    After building, I did a few test converts and was satisfied with the results. TBH I don't find libav to sound much different from FDK, but I can appreciate a better compression algorithm.
    Quote Quote  
  9. Originally Posted by tealsuki View Post
    Originally Posted by AntW93 View Post
    Originally Posted by MaverickTse View Post
    For the compiling part, i have not tried that myself, but the Linux Subsystem on Win10(after Creator Update) may do the job, sparing the trouble to setup a VM. After all, FFmpeg can be cross-compiled in the Linux Subsystem
    Interesting, I shall look into using the Linux Subsystem on Win10 for compiling HandBrake to save having to use a VM!
    Apologies for the slight necroposting. I was able to successfully build on WSL following your instructions.

    However in step 3 I had to add the g++ package in, the MinGW build required it, and later I had to add packages specified in these walkthroughs:
    https://mattgadient.com/2016/06/20/working-around-hiccups-when-compiling-handbrake-on-linux/
    https://handbrake.fr/docs/en/latest/developer/build-windows.html

    Since WSL is command line only (for the time being), the kosher way to copy the built files is to specify the destination path simply as
    cp hb.dll /mnt/c/{path} (Replace c with *NTFS* drive letter of your choice).
    Accessing the files directly through the Windows Explorer will corrupt the WSL filesystem.

    Other caveats: archive extraction and build is SLOW on WSL. WSL uses a "worst of both worlds" approach to disk access (and the linux store is hosted on my SSD). My computer was more than likely also a bottleneck, so whichever was the bigger factor, Step 5 took me almost 2 hours.

    After building, I did a few test converts and was satisfied with the results. TBH I don't find libav to sound much different from FDK, but I can appreciate a better compression algorithm.
    hi there tealsuki, i have sent you a pm, regarding the topic of this thread...

    greetings benny
    Quote Quote  
  10. Hello all! Thank you for putting this guide together! I am excited at the prospect of getting higher quality AAC streams back and am running into issues with steps 6-9:

    Click image for larger version

Name:	biBs4ZS.png
Views:	13706
Size:	108.7 KB
ID:	43409

    I am a super noob at Ubuntu so I am not able to figure this out - is my variable incorrect?

    Thank you in advance!
    Quote Quote  
  11. OMG! Thank you so much AntW93 That did the trick. In my desperation I did a couple of encodes via the CLI and it was so tedious. hehehe
    Quote Quote  
  12. Member
    Join Date
    Nov 2017
    Location
    Germany
    Search Comp PM
    Thanks alot for this great step by step guidance to handbrake with FDK aac - works like a charm (nightly build 20171107) I am so happy with it... took me some time to get things straight (was a bit tricky to copy the hb.dll from Ubuntu into Windows since Guest Additions for Ubuntu seem to be buggy atm.), but was worth it - perfect solution now!
    Last edited by NeoRider; 10th Nov 2017 at 12:25.
    Quote Quote  
  13. Hello,

    I stumbled upon this thread looking to acquire FDK AAC in handbrake. I'm very new to Linux and Ubuntu and I'm not sure what I was doing. I first started off installing Ubuntu 16.04.3 LTS on a boot drive, and logged in as guest. I entered the command

    "sudo apt-get install cmake curl gcc git intltool libtool m4 bison flex pax make patch python tar wget yasm automake "

    and it said it was unable to locate yasm. I then tried to figure out how to install yasm manually, and I've went and downloaded the source files off of the site and tried to compile, build and install yasm. However for the life of me, I wasn't able to get yasm to install through the method.

    Is there any way I can get yasm to install without compiling it? Ubuntu for some reason is not able to find yasm and install it.

    Sorry, for my newbish questions.
    Quote Quote  
  14. Originally Posted by Nazugar View Post
    I stumbled upon this thread looking to acquire FDK AAC in handbrake. I'm very new to Linux and Ubuntu and I'm not sure what I was doing. I first started off installing Ubuntu 16.04.3 LTS on a boot drive, and logged in as guest. I entered the command

    "sudo apt-get install cmake curl gcc git intltool libtool m4 bison flex pax make patch python tar wget yasm automake "

    and it said it was unable to locate yasm. I then tried to figure out how to install yasm manually, and I've went and downloaded the source files off of the site and tried to compile, build and install yasm. However for the life of me, I wasn't able to get yasm to install through the method.

    Is there any way I can get yasm to install without compiling it? Ubuntu for some reason is not able to find yasm and install it.
    I'm not sure, you should try logging in as an administrator/primary user (with a password) and see if that works with the above command, or try fresh installing Ubuntu in a Virtual Machine in VirtualBox instead and try again!

    yasm is one of the essential packages for compiling/building Handbrake and will not function without it!
    Quote Quote  
  15. Originally Posted by AntW93 View Post
    Originally Posted by Nazugar View Post
    I stumbled upon this thread looking to acquire FDK AAC in handbrake. I'm very new to Linux and Ubuntu and I'm not sure what I was doing. I first started off installing Ubuntu 16.04.3 LTS on a boot drive, and logged in as guest. I entered the command

    "sudo apt-get install cmake curl gcc git intltool libtool m4 bison flex pax make patch python tar wget yasm automake "

    and it said it was unable to locate yasm. I then tried to figure out how to install yasm manually, and I've went and downloaded the source files off of the site and tried to compile, build and install yasm. However for the life of me, I wasn't able to get yasm to install through the method.

    Is there any way I can get yasm to install without compiling it? Ubuntu for some reason is not able to find yasm and install it.
    I'm not sure, you should try logging in as an administrator/primary user (with a password) and see if that works with the above command, or try fresh installing Ubuntu in a Virtual Machine in VirtualBox instead and try again!

    yasm is one of the essential packages for compiling/building Handbrake and will not function without it!
    I don’t know where to begin. After spending an entire day trying to figure it out, I’ve succesfully got AAC FDK in Handbrake! I did a full reinstall on a SSD (instead of a USB) and turned down any overclocks I’ve had as it was unstable when using Ubuntu (constant freeze, lockups...etc). Everything worked flawlessly as the guide was written. Thank you so much for the guide and apologies for my question.
    Quote Quote  
  16. Member
    Join Date
    Nov 2017
    Location
    Nottingham
    Search Comp PM
    Thanks for this, i use Vidcoder which is a folk of Handbrake and was wondering if it's possible to use this guide to update Vidcoder or not.
    Quote Quote  
  17. Originally Posted by glenn1962 View Post
    Thanks for this, i use Vidcoder which is a folk of Handbrake and was wondering if it's possible to use this guide to update Vidcoder or not.
    I don't use VidCoder but have just tested it using this method and it works, just copy and paste the resulting hb.dll file into VidCoder's installation directory overwriting the old/previous file and then load it up and you'll see FDK in the audio dropdown list!
    Quote Quote  
  18. Member SanderMan's Avatar
    Join Date
    Feb 2001
    Location
    Netherlands
    Search Comp PM
    Guide is not working for me. I got an error "nasm missing" after executing the ./configure --cross=x86_64-w64-mingw32 --enable-x265 --enable-qsv --enable-fdk-aac --enable-libav-aac --launch-jobs=1 --force --launch command.
    I'm a complete linux noob so i don't know what to do. I reinstalled ubuntu 3 times, but I get the same error message every time. I'm using vmware workstation player.

    Image
    [Attachment 44372 - Click to enlarge]
    Quote Quote  
  19. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    Previously, YASM was a good enough assembler to compile modern video encoders like x265; but now, since x265 also wants to support AVX512 instructions, the NASM assembler is required.

    Reinstalling an operating system is not sufficient if it doesn't install all the required packages immediately. You will have to add the NASM assembler by installing its package. Did you notice paragraph 3. in the guide above? There is nasm missing now, since this was posted. Try to run this in addition:

    Code:
    sudo apt-get install nasm
    Quote Quote  
  20. Member SanderMan's Avatar
    Join Date
    Feb 2001
    Location
    Netherlands
    Search Comp PM
    Originally Posted by LigH.de View Post
    Previously, YASM was a good enough assembler to compile modern video encoders like x265; but now, since x265 also wants to support AVX512 instructions, the NASM assembler is required.

    Reinstalling an operating system is not sufficient if it doesn't install all the required packages immediately. You will have to add the NASM assembler by installing its package. Did you notice paragraph 3. in the guide above? There is nasm missing now, since this was posted. Try to run this in addition:

    Code:
    sudo apt-get install nasm
    Thanks for the quick answer. Unfortunately it's still not working for me. The error mesage I get now is: ERROR: error: minimum required nasm version is 2.13.0 and /usr/bin/nasm is 0.0.0
    Quote Quote  
  21. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    A pity your system was unable to detect the version correctly.

    You may now need to discover if there are any similar related packages (you could e.g. install "Synaptic" and search for any "nasm" related packages with a newer version), or read about how to compile nasm from its sources.

    But both attempts may be a challenge for a "complete Linux noob"...
    Quote Quote  
  22. Member SanderMan's Avatar
    Join Date
    Feb 2001
    Location
    Netherlands
    Search Comp PM
    Thanks again for your assistance. Guess i'll give up and keep using handbrake 0.10.3
    Quote Quote  
  23. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    Either that ... or you learn to be more patient and wait for more founded replies than mine. A forum is not a live chat. The best answer may arrive a week later...
    Quote Quote  
  24. Member SanderMan's Avatar
    Join Date
    Feb 2001
    Location
    Netherlands
    Search Comp PM
    Finally got it to work, by switching to handbrake 1.07 instead of the latest nightly. Thanks again for the assist.
    Quote Quote  
  25. As LigH.de mentioned, the NASM assembler is now required to compile the x264 and x265 video encoders as they now support AVX-512 optimizations, they also require a very recent version to work (2.13.02 or later), I've noticed Ubuntu 16.04 LTS does not detect the latest stable release and picks up version 2.11.08 instead, I therefore recommend using Ubuntu 17.10 (or later), Fedora or WSL for this process instead!

    See: https://github.com/HandBrake/HandBrake/pull/1081
    However, you can compile the latest version of NASM with the following command in Ubuntu 16.04 LTS as mentioned here: https://handbrake.fr/docs/en/latest/developer/build-windows.html
    Last edited by AntW93; 14th Apr 2018 at 12:15.
    Quote Quote  
  26. Member
    Join Date
    Jan 2018
    Location
    Malaysia
    Search Comp PM
    vmware workstation player with ubuntu 16.04.3

    got an error while compiling handbrake, forgot to take a screenshot.

    after that I saw AntW93 tips, then I use ubuntu 17.10.1 instead, everything went smoothly and compiled successfully.

    no problem using the compiled hb.dll on my windows 10 with handbrake 1.0.7

    million thanks to author and everyone for the guide
    Quote Quote  
  27. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    A pity MSYS2 under Windows seems to be unsupported; I tried to run the guide in a MinGW64 shell of MABS, instead of a real Linux host:

    Code:
    $ ./configure --cross=x86_64-w64-mingw32 --enable-x265 --enable-qsv --enable-fdk-aac --enable-libav-aac --launch-jobs=1 --force --launch
    probe: host tuple...(fail) code 1
      + ./make/config.guess
    It seems to fail in make/configure.py:

    Code:
    ## GNU host tuple probe: determine canonical platform type
    Looking back up, it was already mentioned:

    Originally Posted by AntW93 View Post
    As far as I know, HandBrake for Windows can only be cross-compiled, not natively compiled, it even says in its online documentation that building HandBrake for Windows requires Linux and a recent MinGW-w64 toolchain, see: https://handbrake.fr/docs/en/1.0.0/developer/build-windows.html

    I would love to be proved wrong though and shown that HandBrake can be compiled under the Windows environment, but I don't think it can, unfortunately!
    Quote Quote  
  28. Originally Posted by LigH.de View Post
    A pity MSYS2 under Windows seems to be unsupported; I tried to run the guide in a MinGW64 shell of MABS, instead of a real Linux host:

    Code:
    $ ./configure --cross=x86_64-w64-mingw32 --enable-x265 --enable-qsv --enable-fdk-aac --enable-libav-aac --launch-jobs=1 --force --launch
    probe: host tuple...(fail) code 1
      + ./make/config.guess
    It seems to fail in make/configure.py:

    Code:
    ## GNU host tuple probe: determine canonical platform type
    It is apparently possible to build HandBrake for Windows using MSYS2 as mentioned here: https://github.com/HandBrake/HandBrake/pull/506 and: https://github.com/HandBrake/HandBrake/issues/1054

    I have yet to test this for myself though, WSL is also faster than MSYS!
    Quote Quote  
  29. Thanks for the Guide , but I had one small glitch in following it ,I use Ubuntu on Windows 10 and windows use 16.4 which come with old NASM repository so i tried to build a newer version of it according to the guide
    Code:
    curl -O http://www.nasm.us/pub/nasm/releasebuilds/2.13.02/nasm-2.13.02.tar.bz2
    tar -xf nasm-2.13.02.tar.bz2
    cd nasm-2.13.02
    ./configure --prefix=/usr/local --enable-sections --enable-lto
    make -j$(nproc)
    sudo make install
    source ~/.bashrc
    cd ..
    well I had small problem of you don't have permission to do so untill I modified the commands like this
    Code:
    curl -O http://www.nasm.us/pub/nasm/releasebuilds/2.13.02/nasm-2.13.02.tar.bz2
    sudo tar -xf nasm-2.13.02.tar.bz2
    cd nasm-2.13.02
    sudo ./configure --prefix=/usr/local --enable-sections --enable-lto
    sudo make -j$(nproc)
    sudo make install
    source ~/.bashrc
    cd ..
    and I wonder why compiling this must take several hours (let just say around 10 hours)
    Quote Quote  
  30. I have a question ,I noticed after building hb.dll with fdkAAC and copying it in Vidcoder I no longer have 10bit x264 and x265 support also there is no 12bit x265 support ,


    I wonder if anybody can help me to enable support for those color depth
    Quote Quote  



Similar Threads