Author Topic: Howto install Avidemux 2.6 on OSX using Homebrew  (Read 80150 times)

nibbles

  • Sr. Member
  • ****
  • Posts: 292
Howto install Avidemux 2.6 on OSX using Homebrew
« on: November 05, 2011, 02:57:12 AM »
Homebrew is a project that builds applications for OSX.  With it you can
install a pre-compiled Avidemux 2.6.8, or you can build it from source.



* I was afk for a year or two, during which time another fellow at Homebrew
reworked things to make the install excellent on 10.6 through 10.9, and he
pre-compiled the latest stable version for you.

* From one of the last posts in this thread that I have pasted below,
this is the current install process for Macs. Thanks to Styrol for helping!


No formula has to be installed manually anymore, the formula is delivered by Homebrew itself now and its name is "avidemux" (not avidemux3 anymore). After installation an App will be created in your Applications folder and there is finally a audio output device available (you have to select it in the preferences of the App: Edit -> Preferences -> Audio -> AudioDevice: "CoreAudio").

(1) Install XCode and the Command Line Tools of XCode following the step 1 of this manual.

(2) Install Homebrew using the following Terminal command:
Code: [Select]
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
(3) Install the latest version of Avidemux (nightly version, recommended) using the following Terminal command:
Code: [Select]
brew install --HEAD avidemux
(4) When the installation has finished, you are asked to make an alias of the app in your Application folder using this command:
Code: [Select]
brew linkapps
--------------------------------
If you want to update Avidemux to the latest nightly version:
Code: [Select]
brew rm -f avidemux
brew install --HEAD avidemux

If you want to install the "stable" version of Avidemux (Milestone):
Code: [Select]
brew install avidemux
If you encounter permission errors, refer to the manual mentioned in step 1.


EDIT: Oct 2014 - Complete revision. Installs are bottled now @ 2.6.8 or build from source.
EDIT: r7666 - Patches now inline.
EDIT: r7680 - Patches now upstream.
EDIT: r7694 - Tested again, builds ok, no changes to the formula.  Added info about Macports and Fink and brew linkapps.
EDIT: r7702 - Tested against Qt-4.8 builds ok, works better, now seeing x264 configure dialog in Qt gui. No changes to formula.
EDIT: r7724 - Tested again, compiles and runs on Lion.  No changes to formula.  Added info on removing, reinstalling, or upgrading.
EDIT: r7724 - Cleaned up the directions some more, specified --use-llvm because Clang has problems, suggested gawk.
EDIT: r7724 - Tested that both 2.5 and 2.6 compile on Snow Leopard & Lion.
EDIT: 2.5.6  - Changed formula url to point to 2.5.6 stable.  Added 'head' to formula.  Added patch for ffmpeg + 32bit OSX
EDIT: r7724 - Tested again.  Add pkg-config and cmake to the howto, but remove --use-llvm from the qt command so it pours the bottle
EDIT: r7724 - Changes the formula - removes the dep on libvpx which is broken by XCode-4.3 released Feb. 16, 2012.  Get the new raw.
EDIT: r7742 - Teste the new svn patches.  Changed the Howto's PATH prepend info to correct missing /bin as in /usr/local/bin
EDIT: r7742 - Change formula so the revision number can be determined.  Removed --HEAD from aften, as it's not an option.
EDIT: r7742 - Also back in formula is libvpx for decoding webm.  Get the new raw formula and build svn for these changes.
EDIT: r7742 - Change the link to the raw formula to a fixed url that always points to the latest commit.
EDIT: r7742 - Fix the url for HEAD to use http not svn.  Berlios svn is down.  Force fetch a new local repo, then rebrew.
EDIT: r7750 - Change the formula to choose a compiler for you unless you throw --with-debug.  Clean formula ruby syntax.
EDIT: r7750 - Add code to output verbosely if --with-debug.  Use Homebrew buildPath variable.
EDIT: r7903 - Add a link to Moncef's Howto Install Homebrew.  Thanks for that tip!
EDIT: r7907 - Add info on how to update CMake-2.8.8, which Homebrew just patched.
EDIT: r7908 - Homebrew has accepted my formula for avidemux.  rm the one you have in /usr/local and brew update.
EDIT: r7908 - Because there's a Qt4 bottle for Snow Lep now, adjusted the Howto to reflect that.
EDIT: r7908 - Moved the -v flag to after the word install where it belongs these days.
EDIT: r7908 - Now works with Mountain Lion 10.8.
EDIT: r7908 - Simplify the FAQ a bit, remove old notes about CMake, add a link to the post for building 2.6
« Last Edit: October 05, 2014, 06:22:31 PM by nibbles »

nibbles

  • Sr. Member
  • ****
  • Posts: 292
Re: Howto build Avidemux2 using Homebrew on Snow Leopard or Lion!
« Reply #1 on: November 29, 2011, 01:57:10 AM »
bump now builds on Lion.

Baa

  • Newbie
  • *
  • Posts: 20
Re: Howto build Avidemux2 using Homebrew on Snow Leopard or Lion
« Reply #2 on: December 05, 2011, 08:12:31 PM »
Do you have such a magic formula for AviDemux 2.6 as well?
I would be highly interested in checking it out, too :-)
Thanks!

Baa

  • Newbie
  • *
  • Posts: 20
Re: Howto build Avidemux2 using Homebrew on Snow Leopard or Lion
« Reply #3 on: December 06, 2011, 07:31:41 PM »
Hello...
in the meantime I was able to build 2.5.5 according to your docs.
Unfortunately it didn't work at first, but after I got rid of my MacPorts Installation it was a clean run...
Thanks!
« Last Edit: December 10, 2011, 04:52:15 PM by Baa »

nibbles

  • Sr. Member
  • ****
  • Posts: 292
Re: Howto build Avidemux-2.6 using Homebrew on OSX
« Reply #4 on: December 08, 2011, 08:13:21 AM »
Info On Building 2.6.0 or 2.6svn Using Homebrew

  Save this link as:  /usr/local/Library/Formula/avidemux3.rb

To brew Avidemux-2.6.0 after you've saved that link:

Code: [Select]
brew rm -f avidemux3
brew install avidemux3


There's also a debug option.  To use it, you would brew like this:

Code: [Select]
brew rm -f avidemux3
brew install -vd --with-debug avidemux3


And finally you can build 2.6svn from the master repo (recommended):

Code: [Select]
brew rm -f avidemux3
brew install --HEAD avidemux3


Note: On 1 JUN 2012 I made two important bug-fixes to the formula.  Be sure to download it again.
Also note that Homebrew has changed a couple of things that cause a lot of harmless warnings at the end of the install.  The formula installer code now recurses through the subdirectories looking to adjust the library rpaths.  The warnings I'm talking about that you can ignore look like this:

Warning: Could not fix install names for /usr/local/Cellar/avidemux3/2.6/lib/ADM_plugins6/audioDecoder/libADM_ad_faad.dylib


EDIT: It compiles on Lion and SL now. removed that stuff.  Added more brew examples.
EDIT: Modified formula to remove Smultron calls, as it compiles cleanly.  Added an important patch so it finds the plugins.
EDIT: Added all the depends_on libraries to the formula so it builds all the plugins.
EDIT: I fixed the formula link to always point to the raw text.  It's a direct link now.
EDIT: Changed formula to include a patch for pluginSettings, to always disable SDL, to fix clang debug cflag
EDIT: Changed formula to use gitorious as the download site.  Fixes berlios offline.
EDIT: Removed the --use-llvm flag because 2.6 builds with clang now too.  Thx!
EDIT: Changed to formula to use a renamed variable std_cmake_args.  Suggest everyone brew update.
EDIT: Added deps on aften and fribidi to support the new plugins recently crafted.
EDIT: Changed the formula to use the standard Homebrew optimization for non-debug builds, -Os.
EDIT: Fix for std_cmake_args not needing .split anymore.  Sorry about that.
EDIT: Fix for ffmpeg-0.11 that needs `make -j1 install`, otherwise there's a race condition.
EDIT: Add new dependency on two-lame due to the internal library's removal.
EDIT: Add code to remove -Werror in one of the CMakeLists that was a blocker.
EDIT: Add a new dep on sqlite, as Avidemux-2.6 requires it now.
EDIT: 12SEP2012 Add 2.6.0 stable, create 2.6svn HEAD, add Qt as a regular dep.
EDIT: 17OCT2012 Adjust the formula for Homebrew's new option syntax, change ARGV too.
« Last Edit: October 17, 2012, 02:53:58 PM by nibbles »

kenshin3it

  • Newbie
  • *
  • Posts: 29
Re: Howto build Avidemux2 using Homebrew on Snow Leopard or Lion
« Reply #5 on: December 23, 2011, 09:20:29 AM »
hi,
How can i upgrade avidemux?
because homebrew has downloaded qt 4.8 and when i've tried to install or upgrade avidemux i've  got answers like:"already installed" or "already upgraded".

ps i've already copied new formula in folder /usr/local/library/formula.


thank you very much.
iMac 24\" Intel Core 2 Duo@2.4GHz - OSX 10.6.1

nibbles

  • Sr. Member
  • ****
  • Posts: 292
Re: Howto build Avidemux2 using Homebrew on Snow Leopard or Lion
« Reply #6 on: December 27, 2011, 09:31:27 PM »
Code: [Select]
brew rm -f avidemux
will do a force remove of all versions of 2.5.5 and is a good command to clean things up.
I use it myself before each build.  It's the same a regular brew rm, except that it removes
all traces of all versions, even if something wasn't fully installed.

nox534

  • Newbie
  • *
  • Posts: 1
Re: Howto build Avidemux2 using Homebrew on Snow Leopard or Lion
« Reply #7 on: January 15, 2012, 10:25:55 PM »
Hi nibbles,

thanks for your great Formula. Here is a fix for Snow Leopard with 32-Bit (https://github.com/mxcl/homebrew/blob/master/Library/Formula/ffmpeg.rb).

« Last Edit: January 16, 2012, 08:50:59 PM by nox534 »

nibbles

  • Sr. Member
  • ****
  • Posts: 292
Re: Howto build Avidemux2 using Homebrew on Snow Leopard or Lion
« Reply #8 on: January 23, 2012, 06:22:30 PM »
Thanks for the patch.  I merged it into the formula for 2.5.6, just in time too, because the Homebrew admins
want to pull the avidemux formula into the main trunk, and your work gets it running on 32bits.  Thanks again.

kenshin3it

  • Newbie
  • *
  • Posts: 29
Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
« Reply #9 on: February 28, 2012, 10:48:20 AM »
hi,
i've tried to rebuild stable version but when everything is done i can't find mp3(lame) encoder in audio menu.
before building version 2.5.6 ,homebrew alert me that some libraries was from another source(before homebrew i had macports but i've uninstalled and deleted libmp3lame libraries from folder like homebrew said).
How can in fix it?

Thank you.
iMac 24\" Intel Core 2 Duo@2.4GHz - OSX 10.6.1

nibbles

  • Sr. Member
  • ****
  • Posts: 292
Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
« Reply #10 on: February 28, 2012, 11:59:46 AM »
After you build 2.5.6, get to a command line and type:

Code: [Select]
avidemux2_cli --help > help.txt 2>&1
open help.txt

Select all the text and paste it into a new gist.  Then reply with the url.  We can see what is loading for that hopefully.  If you feel brave, open Applications/Utilities/Console and click the "sytem.log" in the left column to see what the gui is doing.  Maybe look for it loading plugins.  Paste the whole output into a gist.  Good luck.


kenshin3it

  • Newbie
  • *
  • Posts: 29
Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
« Reply #11 on: February 28, 2012, 01:44:09 PM »
thanks for answer,below the gist:


   
https://gist.github.com/ffdc89db022103276603
iMac 24\" Intel Core 2 Duo@2.4GHz - OSX 10.6.1

nibbles

  • Sr. Member
  • ****
  • Posts: 292
Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
« Reply #12 on: February 29, 2012, 06:00:00 AM »
Yes you are definitely missing a few of the encoders for one reason or another.  If you are sure that brew doctor is happy, then the solution should be pretty straightforward: rip everything out and try again.

But before you remove avidemux and all its deps, let's list what deps Homebrew thinks it has:

Code: [Select]
brew list --versions `brew deps avidemux`
Then after decide to try to fix it, let's uninstall then reinstall your avidemux and all its deps:

Code: [Select]
brew rm -f `brew deps avidemux`
brew update
brew install gawk gnu-sed cmake pkg-config qt
brew install --use-llvm avidmeux


But you should really brew head which has the latest fixes from Mean for OSX, include a lame encoder patch.
See r7741 on this page: 

Code: [Select]
brew install --HEAD --use-llvm avidemux

« Last Edit: February 29, 2012, 06:04:02 AM by nibbles »

kenshin3it

  • Newbie
  • *
  • Posts: 29
Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
« Reply #13 on: February 29, 2012, 08:43:29 AM »
So,i 've followed you instructions but lame doesn't appear in avidemux 2.5.6 .
After read message in shell i've seen that when homebrew builds lame giveback an error about linking lame.h(seems something about permissions).
I've change it,get command "brew link lame" and rebuild avidemux.
Now everything is ok.
Thank you.
iMac 24\" Intel Core 2 Duo@2.4GHz - OSX 10.6.1

Torrent Surfer

  • Newbie
  • *
  • Posts: 3
Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
« Reply #14 on: March 01, 2012, 02:23:05 AM »
I keep getting the following error message either brewing 2.5.6 or 2.6:

Code: [Select]
Checking out svn://svn.berlios.de/avidemux/branches/avidemux_2.5_branch_gruntster
svn: Can't connect to host 'svn.berlios.de': Connection refused

Any ideas?

Thanks.