GithubHelp home page GithubHelp logo

Comments (13)

silentj avatar silentj commented on July 20, 2024 8

For folks looking for an easy (and trusted) way to get x265/ffmpeg with the NEON patch:

The patch was made to x265 back in September 2021 but there hasn't been a new release containing it. Brew's install --HEAD command can build/install the master branch:

  1. brew uninstall --ignore-dependencies --force x265
  2. brew install --HEAD x265

That should install a version of x265 that looks something like HEAD-34532bd and re-install ffmpeg (and any other tools that are dependent on x265).

If ffmpeg reports problems with x265, try re-installing it from source with brew reinstall -s ffmpeg (this may be required any time ffmpeg is updated, too).

Compilation problems

If the x265 master branch isn't currently compiling, you'll need to hack brew to install a slightly older commit that both compiles and includes the NEON patch. You can perform the following steps before you run brew install --HEAD x265:

  • Edit /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/x265.rb
  • Replace the head line with one that references a good commit:
head "https://bitbucket.org/multicoreware/x265_git.git", revision: "34532bda12a3a3141880582aa186a59cd4538ae6"

from homebrew-ffmpeg.

robd003 avatar robd003 commented on July 20, 2024 3

This is great, but now ffmpeg fails to run because it's linking to a different version of x265 dynamic library. I guess I'm dumb, but how would I get ffmpeg to recompile correctly with this patch?

brew install -s ffmpeg will compile from source

from homebrew-ffmpeg.

renaudguerin avatar renaudguerin commented on July 20, 2024 2

Interested in this as well. Apparently the patch has been submitted by Apple to the Handbrake project. This thread has more info.

from homebrew-ffmpeg.

renaudguerin avatar renaudguerin commented on July 20, 2024 1

Even more info here

from homebrew-ffmpeg.

mbirth avatar mbirth commented on July 20, 2024 1

Here you can download an ARM build containing the NEON patch: http://www.osxexperts.net

from homebrew-ffmpeg.

silentj avatar silentj commented on July 20, 2024 1

Thanks @robd003 - I'm guessing that's required anytime ffmepg is updated in brew, too. I've updated my original comment with that tip.

from homebrew-ffmpeg.

scribblemaniac avatar scribblemaniac commented on July 20, 2024

Looks to me like all the changes for neon support are on the libx265 side, not ffmpeg, which would mean you would want to change the libx265 homebrew formula, not this one.

from homebrew-ffmpeg.

slhck avatar slhck commented on July 20, 2024

It does look like an ffmpeg configuration flag.

However, it requires patching ffmpeg, and we're a little reluctant to add things that are not part of the official FFmpeg code base, as it may break things for others and make upgrading complicated or even impossible if the patch doesn't get updated.

The page you linked to just offers the download itself. Could you please give us more info on where that patch is coming from?

from homebrew-ffmpeg.

sassa4ras avatar sassa4ras commented on July 20, 2024

For folks looking for an easy (and trusted) way to get x265/ffmpeg with the NEON patch:

The patch was made to x265 back in September 2021 but there hasn't been a new release containing it. Brew's install --HEAD command can build/install the master branch, but master isn't currently compiling under brew. So here's how you can hack brew to install a slightly older commit that both compiles and includes the NEON patch:

  1. brew uninstall --ignore-dependencies --force x265
  2. Edit /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/x265.rb
  3. Replace the head line with one that references a good commit:
head "https://bitbucket.org/multicoreware/x265_git.git", revision: "0b75c44c10e605fe9e9ebed58f04a46271131827"
  1. brew install --HEAD x265

That should install a HEAD-0b75c44 version of x265 and re-install ffmpeg (and any other tools that are dependent on x265).

This is great, but now ffmpeg fails to run because it's linking to a different version of x265 dynamic library. I guess I'm dumb, but how would I get ffmpeg to recompile correctly with this patch?

from homebrew-ffmpeg.

sassa4ras avatar sassa4ras commented on July 20, 2024

This is great, but now ffmpeg fails to run because it's linking to a different version of x265 dynamic library. I guess I'm dumb, but how would I get ffmpeg to recompile correctly with this patch?

brew install -s ffmpeg will compile from source

Great, thanks!

I'm a linux guy so I'm still getting the hang of MacOS peculiarities

from homebrew-ffmpeg.

jpyle490 avatar jpyle490 commented on July 20, 2024

While trying @silentj's above, I'm seeing an error:

  "x265_entropyStateBits", referenced from:
      _x265_costCoeffNxN_neon in pixel-util.S.o
      _x265_10bit_costCoeffNxN_neon in libx265_main10.a(pixel-util.S.o)
      _x265_12bit_costCoeffNxN_neon in libx265_main12.a(pixel-util.S.o)
     (maybe you meant: _x265_entropyStateBits)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libx265.207.dylib] Error 1
make[1]: *** [CMakeFiles/x265-shared.dir/all] Error 2
make: *** [all] Error 2```

Regardless of whether I specify the revision in x265.rb, or if I leave it at 'master', it still starts the compilation with:

% brew install --HEAD x265
==> Fetching x265
######################################################################## 100.0%
==> Cloning https://bitbucket.org/multicoreware/x265_git.git
Updating /Users/jpyle/Library/Caches/Homebrew/x265--git
==> Checking out branch master
Already on 'master'
Your branch is up to date with 'origin/master'.
HEAD is now at 7f247b623 fix x265 zonefile feature

It seems 'master' is pulling instead of the specific revision. I, too, am coming from Linux and still learning my way around the intricacies here. Is there something else that needs clearing before I try to re-install?

from homebrew-ffmpeg.

AlexanderWillner avatar AlexanderWillner commented on July 20, 2024

As it still doesn't seem to work (at least not all configurations, e.g. see #98 (comment)) I suppose this ticket should be re-opened?

from homebrew-ffmpeg.

retokromer avatar retokromer commented on July 20, 2024

This seems to be an upstream issue, not an issue of the formula maintained here.

from homebrew-ffmpeg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.