Avidemux Forum

Avidemux => MacOSX => Topic started by: nibbles on November 05, 2011, 02:57:12 AM

Title: Howto install Avidemux 2.6 on OSX using Homebrew
Post by: nibbles on November 05, 2011, 02:57:12 AM
Homebrew (http://"http://brew.sh/") 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!


Quote from: styrol on December 27, 2013, 03:18:20 AM
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 (http://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/).

(2) Install Homebrew (http://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac) using the following Terminal command (http://brew.sh):
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:
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:
brew linkapps

--------------------------------
If you want to update Avidemux to the latest nightly version:
brew rm -f avidemux
brew install --HEAD avidemux


If you want to install the "stable" version of Avidemux (Milestone):
brew install avidemux

If you encounter permission errors, refer to the manual (http://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac) 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
Title: Re: Howto build Avidemux2 using Homebrew on Snow Leopard or Lion!
Post by: nibbles on November 29, 2011, 01:57:10 AM
bump now builds on Lion.
Title: Re: Howto build Avidemux2 using Homebrew on Snow Leopard or Lion
Post by: Baa 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!
Title: Re: Howto build Avidemux2 using Homebrew on Snow Leopard or Lion
Post by: Baa 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!
Title: Re: Howto build Avidemux-2.6 using Homebrew on OSX
Post by: nibbles 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 (https://raw.github.com/2bits/homebrew/newAdm3/Library/Formula/avidemux3.rb)

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


brew rm -f avidemux3
brew install avidemux3



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


brew rm -f avidemux3
brew install -vd --with-debug avidemux3



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


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.
Title: Re: Howto build Avidemux2 using Homebrew on Snow Leopard or Lion
Post by: kenshin3it 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.
Title: Re: Howto build Avidemux2 using Homebrew on Snow Leopard or Lion
Post by: nibbles on December 27, 2011, 09:31:27 PM
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.
Title: Re: Howto build Avidemux2 using Homebrew on Snow Leopard or Lion
Post by: nox534 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).

Title: Re: Howto build Avidemux2 using Homebrew on Snow Leopard or Lion
Post by: nibbles 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.
Title: Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
Post by: kenshin3it 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.
Title: Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
Post by: nibbles on February 28, 2012, 11:59:46 AM
After you build 2.5.6, get to a command line and type:

avidemux2_cli --help > help.txt 2>&1
open help.txt


Select all the text and paste it into a new gist (https://gist.github.com/).  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.

Title: Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
Post by: kenshin3it on February 28, 2012, 01:44:09 PM
thanks for answer,below the gist:


   
https://gist.github.com/ffdc89db022103276603
Title: Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
Post by: nibbles 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:

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:

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: (https://lists.berlios.de/pipermail/avidemux-svn-commit/2012-February/date.html) 

brew install --HEAD --use-llvm avidemux


Title: Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
Post by: kenshin3it 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.
Title: Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
Post by: Torrent Surfer on March 01, 2012, 02:23:05 AM
I keep getting the following error message either brewing 2.5.6 or 2.6:

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.
Title: Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
Post by: nibbles on March 01, 2012, 06:03:11 AM
I believe berlios svn access is shut off to deal with something odd.
There is a post on their bug tracker about a security assert. (http://developer.berlios.de/bugs/?func=detailbug&bug_id=18516&group_id=1)
What I saw happen was their web interface to the repo was off for a some hours, then came back.
This will probably come back also.  There is a mirror on sourceforge.net, but only for
the stable 2.5.6. I think I'll update the formula to fallback to that mirror if people
are trying to brew stable.
Title: Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
Post by: Torrent Surfer on March 01, 2012, 01:21:18 PM
Thanks nibbles. I look forward to the updated formula.
Title: Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
Post by: Jan Gruuthuse on March 01, 2012, 04:12:05 PM
svn offline (http://www.avidemux.org/smf/index.php?topic=10347.msg55613#msg55613)
Title: Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
Post by: nibbles on March 01, 2012, 10:35:19 PM
I changed the 2.6 formula to use gitorious for the download.  It works great.
Title: Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
Post by: Torrent Surfer on March 02, 2012, 03:18:43 AM
Yes, 2.6 brews perfectly now with the latest formula. Thank you!  :)
Title: Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
Post by: maiux on March 26, 2012, 09:44:21 AM
First of all a big THANK YOU to nibbles.

My configuration is SL 10.6.8 and XCode 4.2 and I got errors compiling qt.

So I tried to use Qt SDK available here: http://qt.nokia.com/downloads and I got 2.5.6 compiled with QtSDK 4.8.0: and the best part is that it seems to work too ;)

Below are the steps, some of them quoting from nibbles' original post:
Copy avidemux formula downloaded from nibbles' link in /usr/local/Library/Formula/avidemux.rb and
issue the next commands to build and to link avidemux using the QtSDK just installed:
QTDIR=/Developer/QtSDK/Desktop/Qt/4.8.0/gcc brew install avidemux
brew linkapps


It should work: let me know if it doesn't :)
Title: Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
Post by: nibbles on March 26, 2012, 08:31:17 PM
Hello maiux.  You comments are appreciated.  You mentioned that you had problems building qt-4.8.0.  I have the same problem on 10.6.8, and this has not happened to me before.  On Homebrew's website, we are trying to figure this out.  While the method you used to install Qt might work, in general it is unsafe to install something like Qt that way when using Homebrew because of root ownership, sudo, permissions, and other unknowns.  I would not suggest other people do that, but I can understand it in these circumstances.  At the moment, this is the Homebrew issue tracking the Qt-4.8.0 build problems (https://github.com/mxcl/homebrew/pull/11198).

What we are seeing is the build trying to compile a c++ file using llvm-gcc instead of llvm-g++.  This leads to libstdc++ files not being found, causing the build error.  In general, the right compiler is chosen when the files being compiled end in .cpp rather than .c.  In the case of Qt4, the file it is choking on ends in .mm.  Good times indeed.
Title: Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
Post by: nibbles on March 29, 2012, 06:48:23 PM
Good news, Homebrew fixed the Qt issue.  A clause had been added to the formula in late February, but it was put in the wrong spot.  I'm able to compile Avidemux-2.5.6 or svn without any problems.  Thanks for you patience.
Title: Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
Post by: styrol on April 12, 2012, 01:19:07 AM
Thanks nibbles for your work, 2.6 brews perfectly with the latest formula. Thank you!

For Unix dummies like me ("Your Xcode is configured with an invalid path." "Warning: /usr/bin occurs before /usr/local/bin") this webpage (http://moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/) did help a lot. You may integrate this link in your initial post.

After short testing I have some issues (mainly no audio decoder plugin like sdl, only dummy module); terminal output by opening ADM 2.6r7850:
[ADM_ad_plugin] Scanning directory /Users/username/.avidemux6/plugins6/audioDecoder/
[ADM_ad_plugin] Cannot parse plugin
[ADM_vf_plugin] Scanning directory /Users/username/.avidemux6/plugins6/videoFilter/
[ADM_vf_plugin] Cannot parse plugin
[..]
[AudioDevice Plugins] Found 0 plugins


I did the install of Avidemux 2.6 on a new fresh system with the latest Lion (10.7.3) and latest Xcode (4.3.2). I didn't install Avidemux 2.5.x via Homebrew before and after. So I brewed 2.6 with the following command:
brew -v install -d --use-llvm avidemux3
In your manual for 2.5.6 (but not for 2.6) you've also written the following command:
brew linkapps
I didn't type in this, is this crucial?

Any suggestions are appreciated.
Title: Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
Post by: nibbles on April 12, 2012, 11:16:09 AM
You're welcome.  I'm happy 2.6 is building for you.  The more we use it on OSX, the better it will become, mostly because OSX tries to be very compliant with standards.

I'll try to answer your questions.  I appreciate that link to Moncef's howto.  It is very well written, and I will put the link in the first post.  It fills in all the details I didn't want to get into because I felt they were beyond the scope of this howto.

SDL:  You bring up a valid point, there is no audio output device that builds using 2.6 on OSX at this time.  The reason is that Mean and someone else crafted a CoreAudio output device for Avidemux-2.5 in 2008.  Last December we got it working :-)  It has not been ported to 2.6 yet, and I have not made an effort to try because I haven't learned C++ well enough.  For all I know, it might drop right in.  I am interested in making it work, but it is a very low priority for Mean & Gruntster.  The reason it is at the bottom of their todo list is because Avidemux is not meant to be a video player.  At first that bothered me a little, but I realized I could use other players if I had to hear which frame the sound starts in.  Does that make sense?  But then you say, why not just build the SDL audio device?  Good question.  I tried once and got a build error.  I never tried again.  Ok I just tried again, and I still get a build error.  Here is the error log when using clang (https://raw.github.com/gist/2366297) because it gives more accurate error, though they happen with llvm too.  It looks like it needs to link against the AppKit framework and needs to a missing header, maybe in avidemux/common/ADM_libraries/ADM_libsdl/SDLMain.h, #include <AppKit/NSQuickDrawView.h>  Basically it's ugly and I'm not sure how much help I'll get bringing this up.

You brewed 2.6 correctly.  Based on a recent Homebrew thread, building x264 with llvm-gcc is the only way to make it work well at this time.  So without knowing it, we have been avoiding at least one Segfault 11. (https://github.com/mxcl/homebrew/issues/11248)

Linkapps:  That command is not useful in 2.6 because it does not build an "app".  Instead is builds a command line binary, /usr/local/bin/avidemux.  The 2.5.6 source code will create an app on the other hand.  Because it makes an app and people sometimes like that in their Launchpad, the linkapps command will create a symlink for the app in your user's ~/Applications directory.  That way it will appear in the Launchpad.

So if you want to bump my gentle request for CoreAudio support (http://www.avidemux.org/smf/index.php?topic=10179.0) with a +1, that's cool.  But I would suspect that time/priorities will limit our success to whether we supply that patch.  As I don't know svn, only git, I am reticent to accept Mean's offer to be added to the list of people allowed to commit things.  But I'm sure he would appreciate if we figured it out.   And that's my wall-of-text for today, heh.
Title: Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
Post by: styrol on April 12, 2012, 01:22:28 PM
Thank you very much for your instructive reply and your retrying to solve the issue . And of course I supported your gentle request for CoreAudio support.

Om my former laptop with 10.5 I had MacPorts installed and did install ports via a GUI App (Porticus). Homebrew seems to me a bit more complex then MacPorts to use. I have rather more experience in homebrewing beer...  :)
Title: Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
Post by: nibbles on April 17, 2012, 09:36:25 AM
You're welcome, and thanks for the +1.  I did some more investigation on the SDL build error with NSQuickDrawView.  You can see from the header file (https://gist.github.com/2404839) that it's deprecated for 32bit builds and doesn't exist for 64bit builds.  So it will have to be coded a different way, I suppose with modern Cocoa functions.  I'll be happy to get a CoreAudio device when it makes the developers happy to work on it, but from a functionality standpoint, I'm more interested in addressing the myriad of warnings about incompatible pointers and control reaching the end of non-void functions that I get when I build 2.6 with clang.
Title: Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
Post by: bmills on April 21, 2012, 07:31:22 PM
I'm receiving an error when I try to execute "brew install avidemux'.

I believe the interesting part of this output is the following lines found in the configure step.

-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.25")
CMake Error at cmake/admCheckRequiredLibs.cmake:10 (MESSAGE):
  Could not find pkg-config
Call Stack (most recent call first):
  CMakeLists.txt:127 (INCLUDE)


The entire output of the attempt can be found here:
https://gist.github.com/2439201

I have confirmed that pkg-config is installed and appears to be working correctly.

Any advice would be appreciated.

Thanks.

-bryan
Title: Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
Post by: gruntster on April 21, 2012, 11:27:36 PM
CMake 2.8.8 has a bug detecting pkg-config (http://www.cmake.org/Bug/view.php?id=13125).

You'll need to either revert back to CMake 2.8.7, patch CMake 2.8.8 or patch Avidemux.

CMake 2.8.8 patch: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3ea850a5023060b84dcc0e6f0098c32c28b15807
Avidemux patch: http://svn.berlios.de/wsvn/avidemux?op=comp&compare%5B%5D=/@7892&compare%5B%5D=/@7893 (http://svn.berlios.de/wsvn/avidemux?op=comp&compare%5B%5D=/@7892&compare%5B%5D=/@7893)
Title: Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
Post by: nibbles on April 22, 2012, 08:36:11 AM
Because Gruntster patched the 2.6 source code here in revision 7893 (http://svn.berlios.de/viewvc/avidemux?limit_changes=0&view=revision&revision=7893) to work around the CMake-2.8.8 bug (thanks!), you should be able to successfully build Avidemux-2.6 if you just try it again, which will automatically update your files to the latest revision, 7894 as of today.

In case you'd like to revert to CMake-2.8.7 to save yourself other problems, the Homebrew code to see what versions are available is this:
$ brew versions cmake
2.8.8    git checkout 8392df5 /usr/local/Library/Formula/cmake.rb
2.8.7    git checkout 948c276 /usr/local/Library/Formula/cmake.rb


And you can see from the output the command to use.  For 2.8.7, you would do:
cd /usr/local
git checkout 948c276 /usr/local/Library/Formula/cmake.rb
Title: Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
Post by: nibbles on April 28, 2012, 06:15:04 AM
Homebrew has patched cmake-2.8.8 using the Kitware patch for pkg-config that will appear in cmake-2.8.9.  I tested Homebrew's patched cmake with avidemux-2.5 and 2.6.  Both build without error.  If you want to get the patched cmake, you need to:

brew update
brew rm cmake
brew install cmake


After that you can build 2.5 or 2.6 as usual.
Title: Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
Post by: fedep on May 08, 2012, 01:07:45 PM
 I do all the steps recommended... and now?  How I can start avidemux?  :-[
Title: Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
Post by: styrol on May 08, 2012, 03:01:48 PM
If you built 2.6 just open "avidemux" in

/usr/local/Cellar/avidemux3/2.6/bin/

Avidemux 2.5 should also reside in /usr/local/Cellar/

There is a symlink in /usr/local/bin. Best way you create an alias from there and place it in your application folder.
Title: Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
Post by: CyberGene on May 26, 2012, 08:21:46 PM
I tried to build avidemux 2.6 and I get the following error:


brew install avidemux3
==> Cloning git://gitorious.org/avidemux2-6/avidemux2-6.git
Updating /Library/Caches/Homebrew/avidemux3--git
Error: private method `split' called for #<Array:0x109a57558>
Please report this bug:
    https://github.com/mxcl/homebrew/wiki/reporting-bugs
/usr/local/Library/Formula/avidemux3.rb:36:in `process'
/usr/local/Library/Homebrew/extend/fileutils.rb:35:in `mkdir'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fileutils.rb:121:in `chdir'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fileutils.rb:121:in `chdir'
/usr/local/Library/Homebrew/extend/fileutils.rb:34:in `mkdir'
/usr/local/Library/Formula/avidemux3.rb:35:in `process'
/usr/local/Library/Formula/avidemux3.rb:73:in `install'
/usr/local/Library/Homebrew/build.rb:98:in `install'
/usr/local/Library/Homebrew/formula.rb:192:in `brew'
/usr/local/Library/Homebrew/formula.rb:524:in `stage'
/usr/local/Library/Homebrew/extend/fileutils.rb:22:in `mktemp'
/usr/local/Library/Homebrew/formula.rb:520:in `stage'
/usr/local/Library/Homebrew/formula.rb:187:in `brew'
/usr/local/Library/Homebrew/build.rb:77:in `install'
/usr/local/Library/Homebrew/build.rb:40
/usr/local/Library/Formula/avidemux3.rb:103


I've done everything as explained and have been very careful to not miss anything starting with the installation of Homebrew, Ruby, etc. I am myself a Java Developer.
Title: Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
Post by: nibbles on June 01, 2012, 08:17:56 AM
Sorry about that @CyberGene.  Homebrew changed their installer code recently.  When I modified the formula to use their new variables, I made a mistake by leaving in the 'split' command.  I fixed that within a day or two and made a commit, but I stepped away from my computer and forgot to push the change to the main repo until today.  Please download the updated avidemux3.rb formula from Page 1, and try again.  I just used that link and verified that everything works.
Title: Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
Post by: Timor on June 12, 2012, 04:23:31 PM
@nibbles

At first, I've tried the macports script, which fails after some hours.

With Homebrew I was able to build 2.5.6.

But I can't build 2.6 (missing formula for avidemux3 in Homebrew).

EDIT: Sorry :) I've forgotten to download the formula.

It works :)

Cu, Timor
Title: Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
Post by: eya on August 02, 2012, 06:56:32 PM
I always get this error

==> Downloading http://pkgconfig.freedesktop.org/releases/pkg-config-0.27.tar.gz

curl: (7) couldn't connect to host
Error: Download failed: http://pkgconfig.freedesktop.org/releases/pkg-config-0.27.tar.gz
Title: Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
Post by: styrol on August 02, 2012, 07:06:44 PM
Quotecurl: (7) couldn't connect to host
Server down? Try again 24h later.
Title: Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
Post by: btb on August 12, 2012, 09:26:12 PM
brew install --HEAD avidemux
doesn't work on Mountain Lion:
Building CXX object ADM_videoFilters/FluxSmooth/CMakeFiles/ADM_vf_FluxSmooth.dir/ADM_vidFlux.cpp.o
Linking CXX shared library libADM_vf_Stabilize.dylib
/tmp/homebrew-avidemux-HEAD-HPkJ/plugins/ADM_videoFilters/FluxSmooth/ADM_vidFlux.cpp:459:1: error: couldn't allocate input reg for constraint '{_l_src_pitch}'
"                                                                mov (%0),"REG_si" \n\t"
^
/tmp/homebrew-avidemux-HEAD-HPkJ/plugins/ADM_videoFilters/FluxSmooth/ADM_vidFlux.cpp:644:5: error: ambiguous instructions require an explicit suffix (could be 'subb', 'subw', 'subl', or 'subq')
" \n\t"
    ^
<inline asm>:267:18: note: instantiated into assembly here
                        sub $1, ycnt(%rip)
                        ^
2 errors generated.


full log:
https://gist.github.com/3334551 (https://gist.github.com/3334551)
Title: Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
Post by: Menneisyys on August 19, 2012, 10:23:20 PM
Quote from: btb on August 12, 2012, 09:26:12 PM
brew install --HEAD avidemux


I've just installed it, following the tutorial; on my ML, it installed just fine.
Title: Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
Post by: Menneisyys on August 19, 2012, 10:25:42 PM
There seems to be no avidemux3 formula any more.

When I list the list of formulas starting with avi (with "brew search avi"), I only get avidemux (that is, 2.5.5 r7908) but not  avidemux3.

What can the problem be?
Title: Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
Post by: Jan Gruuthuse on August 20, 2012, 06:21:38 AM
Myself not an apple user. Looks like 2.6 is not in homebrew mainstream.
Home brew formula tells:
6 url 'http://downloads.sourceforge.net/avidemux/avidemux_2.5.6.tar.gz'
9 head 'http://svn.berlios.de/svnroot/repos/avidemux/branches/avidemux_2.5_branch_gruntster'

This should be 2.5.6 version.
My guess is you need to download the formula from this page: Howto build Avidemux2 using Homebrew on Snow Leopard or Lion (http://www.avidemux.org/smf/index.php?topic=9960.msg54253#msg54253) under the header: Info On Building 2.6, can't tell if this would currently build, as users reported issues with building. I've not seen reports this is fixed/or a fix is working?
Title: Re: Howto build Avidemux using Homebrew on Snow Leopard or Lion
Post by: nieder on September 06, 2012, 09:08:57 PM
Quote from: btb on August 12, 2012, 09:26:12 PM
brew install --HEAD avidemux
doesn't work on Mountain Lion:
Building CXX object ADM_videoFilters/FluxSmooth/CMakeFiles/ADM_vf_FluxSmooth.dir/ADM_vidFlux.cpp.o
Linking CXX shared library libADM_vf_Stabilize.dylib
/tmp/homebrew-avidemux-HEAD-HPkJ/plugins/ADM_videoFilters/FluxSmooth/ADM_vidFlux.cpp:459:1: error: couldn't allocate input reg for constraint '{_l_src_pitch}'
"                                                                mov (%0),"REG_si" \n\t"
^
/tmp/homebrew-avidemux-HEAD-HPkJ/plugins/ADM_videoFilters/FluxSmooth/ADM_vidFlux.cpp:644:5: error: ambiguous instructions require an explicit suffix (could be 'subb', 'subw', 'subl', or 'subq')
" \n\t"
    ^
<inline asm>:267:18: note: instantiated into assembly here
                        sub $1, ycnt(%rip)
                        ^
2 errors generated.


full log:
https://gist.github.com/3334551 (https://gist.github.com/3334551)

I'm getting an identical failure when building avidemux 2.5.6 on Lion (manual, not via homebrew).  Has there been good resolution for this error?  I locally patched ADM_vidFlux.cpp:645 to use 'subl' instead of 'sub', and that lets the build continue, but I have no idea if that's the correct solution.
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: nibbles on September 09, 2012, 06:19:20 AM
VidFlux has been a problem on OSX for a long time.  When I posted this error to llvm.org, I was told that it was fixed in svn.  I did not find that to be the case.  So Homebrew compiles Avidemux-2.5 using llvm-gcc, not clang, and we keep hoping that it will get fixed.  Because you posted the first possible solution to this, we'll have to get Mean to weigh in and tell us if that is reasonable. This is like the one bug I was never able to solve.  So thanks for posting.  He may not see this post or have time to work on 2.5, though. 
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: kenshin3it on October 03, 2012, 09:41:59 AM
Hi,
i've tried to build avidemux3 but i can't run the application.
i've tried to reinstall avidemux with option --HEAD,but now when i run the application i'm getting this crash report:

Dyld Error Message:
  Library not loaded: /usr/local/lib/libpng15.15.dylib
  Referenced from: /usr/local/lib/QtGui.framework/Versions/4/QtGui
  Reason: image not found

i think the issue is about qt 4.8.3,how can install qt 4.8.2?
i have an iMac 7,1 with 10.8.1 .
thank you.
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: kenshin3it on October 03, 2012, 01:08:06 PM
i've successful installed qt 4.8.2 and everything back to normal.
so there is a issue with qt 4.8.3 .
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: nibbles on October 16, 2012, 09:14:00 AM
This issue has been fixed. Thanks for the report.
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: yami on October 30, 2012, 07:53:02 PM
I am afraid, I am the most total noob concerning command lines... :( I am running X.6.8, managed to update the XCode to 3.2.6 (was it?), first managed to get MacPorts up (because at some stage, installing Avidemux via Macport was the thing), then somehow managed getting Homebrew sort of installed (which doesnt like MacPorts, as the brew doctor tells me)

The brew doctor gives me this:
Quote
bash-3.2$ brew doctor
Warning: Some directories in /usr/local/share/man aren't writable.
This can happen if you "sudo make install" software that isn't managed
by Homebrew. If a brew tries to add locale information to one of these
directories, then the install will fail during the link step.
You should probably `chown` them:

    /usr/local/share/man/de
    /usr/local/share/man/de/man1
Warning: You have Macports or Fink installed.
This can cause trouble. You don't have to uninstall them, but you may li
try temporarily moving them away, eg.

  sudo mv /opt/local ~/macports
Warning: /usr/bin occurs before /usr/local/bin
This means that system-provided programs will be used instead of those
provided by Homebrew. The following tools exist at both paths:

    base64tool
    mkvextract
    mkvinfo
    mkvmerge

Consider amending your PATH so that /usr/local/bin
occurs before /usr/bin in your PATH.
bash-3.2$

I tried to amend the path, (with the line given in this link: http://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/ (http://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/)) - but it didnt seem to have done anything, the brew doctor keeps on giving me his message about the path.

And when trying to brew avidemux, I get this:
Quotebash-3.2$ brew rm -f avidemux3
bash-3.2$ brew install avidemux3
Error: No available formula for avidemux3
though I did safe the script at the other end of your formula link in the right path, with exactly the filename.

As I said, I am no coder at all (even though I managed to slightly control my shell-panic) and at the moment I rather feel like: 'Woman, why don't you get back into the kitchen?!' - in other words, helpless...

All this, because 2.5.3 (which can do x264, which 2.5.4 can't) misinterprets the audio of a ts stream, I can't get it encoded right. Well, I think, it is sort of an incapability of the older versions, and did hope, that the newer (eg avidemux3) perhaps can do that, but I seem to be unable to try because I am a noob. I am so whishing, that you could find the time to release a binary... :(
I really like the things Avidemux can do, it's nifty and I dont think there is any other program out there that can do all that nice stuff as one single program (this is a praise, not a threat).
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: nibbles on November 03, 2012, 04:31:18 AM
@yami your problems are relatively minor.  Fixing the things `brew doctor` complains about is fairly important, but the main thing affecting you is the name you are using.  There is avidemux, and avidemux3. Let me explain:

There is the avidemux-2.5.x branch (which doesn't do x264 very well) that you would build with
brew install --HEAD avidemux`
The 2.5.x formula comes built into Homebrew and is available without saving anything.

There is also the avidemux-2.6 branch that I have called avidemux3.  To build that, you have to save this special formula (https://raw.github.com/2bits/homebrew/newAdm3/Library/Formula/avidemux3.rb) as
/usr/local/Library/Formula/avidemux3.rb

and build that with
brew install avidemux3

You may have to remove Macports first, though. You shouldn't need it, and it confuses things.
You should fix your permissions problems with this command:
sudo chown -R $USER:admin /usr/local

The PATH issue is not very important anymore, because Homebrew no longer uses whatever you PATH happens to be. It creates a special PATH just for the install.  If you'd like to fix that and silence the problem, then on OSX, the usual place to do that is in
~/.bash_profile

where you would make it say something like mine:
export PATH=/usr/local/bin:/usr/local/sbin:/usr/local/share/python:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin

After you save that file, then you go back to your terminal window and click it to be sure it is active, then hit Command-t which will open up a new Terminal tab that will read your profile and set your new path.  You can see that by typing
env

Good luck (10.6.8 is okay, but I haven't tested this against XCode-3.2.6.  I paid $5 for XCode-4.0.2 when I ran 10.6.8).
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: kenshin3it on January 10, 2013, 02:30:59 PM
Hi everybody,
after successfully compiled avidemux3 on mountain lion i 've got this error when i try to load my own preset for x264 :

[ADM_paramValidatePartialList]  Param : <analyze.fast_pskip> not found
[ADM_paramValidatePartialList]  Some parameters are not in the parameter list, typo ?(57 vs 58)


Any solution?

ps i've got error "Can't load Preset" with iPhone and PSP too.

Thank you.
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: negativeions on April 14, 2013, 04:52:24 AM
What kind of crap is this? Who in their right mind is going to be able to build this crap? Can't someone just post a binary of the latest version of avidemux that works on 10.6 through 10.8??? I can't believe that the official build is ML only. This moron just fucked over 80% of mac users. Thanks idiots.
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: Jan Gruuthuse on April 14, 2013, 05:02:03 AM
Look in the mirror. You know immediately to whom this applies.
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: Shotokan81 on May 14, 2013, 12:19:09 PM
Oh no...

As I was going through the thread to find out how to install on 10.7.5, I started to hope that someone may be kind enough to release a "ready to install" package for 2.6.4 that could run on 10.7.5.

With such comments, I think this has much less chances to happen, as I don't see why anyone would bother if the rare requests are made this way.

Then I think I will try to go through the homebrew steps as it seems the most straightforward option available.

Just a couple of questions:
- when looking inside the formula, (I think) it refers to version 2.6.0, but will it install the 2.6.4?
- Just in case (u never know) anyone is working on making an installable package of the 2.6.4 version work on osx 10.7.5, could you give me a heads-up before I get started? This would be much appreciated!
- Finally, assuming I can install it from homebrew, is it portable? Meaning could I kind of zip it into a package that could be shared with other people in the same situation? (I guess not otherwise there would not need for homebrew right? Please bear with my newbie questions).

Thank you.
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: Jan Gruuthuse on May 14, 2013, 01:16:33 PM
may be that still works for 2.6.4, I can't confirm it would.
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: Shotokan81 on May 14, 2013, 03:57:54 PM
Hi Thanks for the formula.

I tried it and am on OSX 10.7.5.

I ran into a problem:
==> cmake -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/avidemux3/2.6.0 -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev -DCMAKE_PREFIX_PATH=/usr/local/Cellar/gettext/0.18.2
==> make
ld: framework not found QtGui
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [ADM_UIsQt4/src/libADM_UIQT46.dylib] Error 1
make[1]: *** [ADM_UIsQt4/src/CMakeFiles/ADM_UIQT46.dir/all] Error 2
make: *** [all] Error 2


The brew doctor says I do not have the Xcode command line tools for Xcode, not sure if this is necessary for the formula.

Also, I checked the /usr/local/Cellar/ folder and there is no avidemux3 folder, so I think the install did not work.

Any thoughts on what I can do?

Your help is appreciated.
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: mean on May 15, 2013, 11:24:04 AM
If you build it using bootstrapOsx.sh, you 'll end up with a dmg in the source folder
That dmg can be reused on another mac

Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: Shotokan81 on May 15, 2013, 11:52:11 AM
Update: it finally worked! 8)

So, after some research, it seems that the problem is due to a linker looking for libraries in the wrong place, and that can be solved by creating links, please see the below link because it is not like if I am comfortably understanding what I write:
https://github.com/titanous/homebrew-gnuradio/issues/26

However, looking further just to make sure, I found that installing the Xcode command line tools solves the problem for some people, link below.
http://qt-project.org/forums/viewthread/27562

So I tried it and guess what, it worked.
Actually all I had to do is listen to what the brew doctor was saying - nothing to brag about then :-[

@negativeions: well then me apparently ;)

@mean: I do not understand what you mean (pun unintended) but I will make some research after some time. I installed 2.6.0, and I will try to upgrade to latest version first. Happy to help but unfortunately I cannot commit I will get it done. It may help Yami.

@nibbles: thanks for the formula, hope you see it, as you did not post for half a year.

@Jan Gruuthuse: Thanks for the guidance again.

Regards
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: Shotokan81 on May 15, 2013, 12:54:07 PM
It worked like a charm with the --HEAD option.

I have 2.6.4 running!

Mean, I am happy to help, I had a quick look on internet about bootstrap osx, but I did not find things I understood.
It would be nice if I can create:
- a package dmg
- including an icon in applications/launcher
- and maybe with a way of hiding the terminal that opens when I launch avidemux3.

I feel this becomes a separated topic than building with homebrew, please feel free to pm me or we can create a separate thread?

Regards
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: mean on May 15, 2013, 01:53:12 PM
go to the avidemux source folder and run
sh bootstrapOsX.sh
Assuming everything is where it is expected to be, it will compile everything and build
a dmg
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: Jan Gruuthuse on May 15, 2013, 01:54:31 PM
there is only: bootStrapOsx.bash in source from svn.
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: Shotokan81 on May 15, 2013, 02:22:11 PM
Yes I think something is not were you expect.
This is what I get:

XXXXX$ sh bootstrapOsX.sh
sh: bootstrapOsX.sh: No such file or directory


XXXXX$ bootStrapOsx.bash
-bash: bootStrapOsx.bash: command not found


I found this file on the web:
http://gitorious.org/avidemux2-6/avidemux2-6/blobs/81e0a202464cb03111964d11314a615e4a3bf413/bootStrap.bash

But in the file it is documented:
# Bootstrapper to semi-automatically build avidemux deb/rpm from source

I am unable to write the script for mac, but if you have something you need to test on 10.7.5, I am happy to help.
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: Jan Gruuthuse on May 15, 2013, 02:58:49 PM
bootStrapOsx.bash 5.9 kB, should be with the source files in folder avidemux_2.6_branch_mean if you used svn to get source.
If bootStrapOsx.bash is present, perhaps your received complaint is with bash not installed?
bash --version
QuoteGNU bash, version 4.2.25(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: Shotokan81 on May 15, 2013, 03:42:11 PM
Strangely, bash is here, although not sure when I installed it.
XXXXX$ bash --version
GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin11)
Copyright (C) 2007 Free Software Foundation, Inc.


Either I am not looking at the right source folder, or I do not have the script.
I guess it is the first. I am looking at the below folder:
/usr/local/cellar/avidemux3/HEAD/include/avidemux/2.6
The ls command returns:
ADM_coreConfig.cmake libavcodec libpostproc
ADM_coreConfig.h libavformat libswscale
cli libavutil qt4

I checked each subfolder, and cannot find the script.

If I am looking at the right folder, then should I use the script on the web I posted above?
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: Jan Gruuthuse on May 15, 2013, 04:15:22 PM
To me, that looks like where avidemux is installed? How did you get the source files to build avidemux 2.6.4?
svn co svn://svn.berlios.de/avidemux/branches/avidemux_2.6_branch_mean or git clone git://gitorious.org/avidemux2-6/avidemux2-6.git or did you unpack the sources?
in the location where you did one of the three above you should find:
addons             avidemux_icon.png           bootStrapHaikuOS.bash  buildPluginsSettings  Doxyfile        plugins
admin              avidemux_plugins            bootStrapOsx.bash      buildQt4              foreignBuilds   po
AUTHORS            bootStrap.bash              buildCli               cmake                 install         README
autononreg         bootStrapCrossMac106.sh     buildCore              cmake_compile_check   License.txt     scripts
avidemux           bootStrapCrossMingw.sh      buildPluginsCLI        COPYING               License.txt.in  update_license.sh
avidemux2.desktop  bootStrapCrossMingw_w32.sh  buildPluginsCommon     debian                man
avidemux_core      bootStrapCrossMingw_w64.sh  buildPluginsQt4        debs                  myOwnPlugins



Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: Shotokan81 on May 16, 2013, 03:32:26 PM
Thank you for the guidance.

To me, that looks like where avidemux is installed?
Yes, correct, I did not understand what Mean said about source folder, so I looked for files that looked like code in the install folders.

How did you get the source files to build avidemux 2.6.4?
I ran the homebrew formula posted by Nibbles at the beginning of this thread, with the head option.

did you unpack the sources?
Well apparently, looking at the comments in the formula, the formula would download the source in a sort of homebrew cache, and maybe the cache is cleaned-up later, anyway I do not know how to access it.
So I now, thanks to your svn code line, I downloaded the source, and it is now unpacked in my hard drive.

Now, what happens is the following:
bash bootStrapOsx.bash
gives the following.
Note that there are errors at the end, and the make fails without building the app.
ld: warning: directory not found for option '-Llibavfilter'
ld: warning: directory not found for option '-Llibavresample'
ld: warning: directory not found for option '-Llibswresample'
ld: warning: directory not found for option '-Llibavfilter'
ld: warning: directory not found for option '-Llibavresample'
ld: warning: directory not found for option '-Llibswresample'
ld: warning: directory not found for option '-Llibavfilter'
ld: warning: directory not found for option '-Llibavresample'
ld: warning: directory not found for option '-Llibswresample'
ld: warning: directory not found for option '-Llibavfilter'
ld: warning: directory not found for option '-Llibavresample'
ld: warning: directory not found for option '-Llibswresample'
ld: warning: directory not found for option '-Llibavfilter'
ld: warning: directory not found for option '-Llibavresample'
ld: warning: directory not found for option '-Llibswresample'
ld: warning: directory not found for option '-Llibavfilter'
ld: warning: directory not found for option '-Llibavresample'
ld: warning: directory not found for option '-Llibswresample'
ld: warning: directory not found for option '-Llibavfilter'
ld: warning: directory not found for option '-Llibavresample'
ld: warning: directory not found for option '-Llibswresample'
ld: warning: directory not found for option '-Llibavfilter'
ld: warning: directory not found for option '-Llibavresample'
ld: warning: directory not found for option '-Llibswresample'
** Unknown command `@float' (left as is) (l. 76)
** Unknown @end float (l. 79)
** Unknown command `@float' (left as is) (l. 76)
** Unknown @end float (l. 79)
** Unknown command `@float' (left as is) (l. 32)
** Unknown @end float (l. 38)
** Unknown command `@float' (left as is) (l. 106)
** Unknown @end float (l. 110)
** Unknown command `@float' (left as is) (l. 32)
** Unknown @end float (l. 38)
** Unknown command `@float' (left as is) (l. 106)
** Unknown @end float (l. 110)
** Unknown command `@float' (left as is) (l. 87)
** Unknown @end float (l. 89)
** Unknown command `@float' (left as is) (l. 311)
** Unknown @end float (l. 315)
** Unknown command `@float' (left as is) (l. 87)
** Unknown @end float (l. 89)
** Unknown command `@float' (left as is) (l. 311)
** Unknown @end float (l. 315)
ld: warning: ld: warning: directory not found for option '-Llibavfilter'directory not found for option '-Llibavfilter'

ld: warning: directory not found for option '-Llibavresample'
ld: warning: directory not found for option '-Llibavresample'
ld: warning: directory not found for option '-Llibswresample'
ld: warning: directory not found for option '-Llibswresample'
ld: warning: ld: warning: directory not found for option '-Llibavfilter'directory not found for option '-Llibavfilter'

ld: warning: directory not found for option '-Llibavresample'
ld: warning: directory not found for option '-Llibavresample'
ld: warning: directory not found for option '-Llibswresample'
ld: warning: directory not found for option '-Llibswresample'
ln: libADM6avdevice.dylib: File exists
make[3]: *** [libavdevice/libADM6avdevice.dylib] Error 1
make[2]: *** [ffmpeg/build/libavcodec/libADM6avcodec.54.dylib] Error 2
make[1]: *** [CMakeFiles/libavcodec.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [all] Error 2
** Failed at make**


Any idea what I may have done wrong?
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: Shotokan81 on May 16, 2013, 04:01:46 PM
Good news, it worked with the git source which took longer to download.

I have a .app file/folder and it launches, it says Avidemux 2.6.4. (r8700)

Not sure how to create the package, but we are surely getting closer.

Thanks for the help so far and please let me know if you know how to do.
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: Jan Gruuthuse on May 17, 2013, 05:43:23 AM
When bash bootStrapOsx.bash finished successful, you should find a package dmg, probably in a folder dmg? According to the developer, my understanding!
Use file search in the avidemux source folder and its sub folders.
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: Shotokan81 on May 17, 2013, 12:35:21 PM
Indeed thanks, it was in the root of the source folder.
Avidemux2.6_r8700.dmg, 8.3MB.

I installs on my OSX 10.7.5, and I could encode a small video using H264.

I have to say the compilation using the bash script is even simpler than the homebrew method (in my case).
I wonder if the fact that I installed homebrew, xcode & tools made the bash script run smoothly or if it just needs OSX and Bash.

Please let me know if this is safe to share and if this makes sense for the project (seems about 25% of mac users use Lion - netmarketshare.com), how I can get it to you.
I do not plan to upgrade, so I could do it again if needed.

Anyway, thanks for offering a multi platform video editor supporting H264!

Regards
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: Shotokan81 on May 18, 2013, 08:31:20 AM
Hi,

I have made further tests just to check if the dmg file can be used by other people.
If I delete the source folder and the app, and then re-install the app using the dmg package, the application won't launch.
Going again through the steps of downloading the source and launching the script works.

@the dev team: please confirm this is the expected behavior, then I won't continue to try to make a share-able dmg installer for Lion.
Instead I'd summarize the steps in a clean post on how to install for versions of OSX prior to Mountain Lion, as this is quite easy thanks to the script, and I feel it may help newbie like me.

Regards
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: Jan Gruuthuse on May 18, 2013, 10:57:25 AM
Thanks for the effort, apple users will appreciated this.
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: mean on May 18, 2013, 04:37:03 PM
If it does not start using only the dmg,  it means one of the dependency is not being taken care of by the bootstrap script
Can you start avidemux from dmg from a shell ?
Something like
cd ~/Avidemux_2.6/Resources/bin
./avidemux

Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: styrol on May 18, 2013, 07:26:27 PM
Quote from: Jan Gruuthuse on May 18, 2013, 10:57:25 AM
Thanks for the effort, apple users will appreciated this.
Yep, thank you very much for your work, Shotokan81.
I did the homebrew way of installation, but this is not the way Mac users are used to.
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: Shotokan81 on May 19, 2013, 07:30:06 AM
Hi thanks,
I think this is simple: the app calls at least one library with an absolute path generated during compilation rather than a relative one, if the terms I use are correct.

I was a bit confused by the instruction:
cd ~/Avidemux_2.6/Resources/bin
./avidemux


It looks like the source folder (~/avidemux2-6/ on my machine), that I deleted. Restoring the source folder , I found that there is no ââ,¬Å"Resourcesââ,¬Â subfolder. Finally, looking into the contents of the app, which I moved into the ââ,¬Å"/Applicationsââ,¬Â folder of OSX so I can find it in the launcher, I found a ââ,¬Å"Resourcesââ,¬Â subfolder, so I tried the below command:
cd /Applications/Avidemux2.6.app/Contents/Resources/bin
./avidemux


The output is as below:
dyld: Library not loaded: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/libADM6avutil.52.dylib
  Referenced from: /Applications/Avidemux2.6.app/Contents/Resources/bin/./../lib/libADM_coreVideoEncoder6.dylib
  Reason: image not found
Trace/BPT trap: 5


By copying the .app file back into my home (~) folder solves the issue and the app launches.

So I think that the dmg package is not portable because even if someone else copies it in it's home folder, one would have to have the same username as I have.

I am actually sure of it as I created a second user and placed the app in the home folder (removing it from my home folder) to get exactly the same error message, mentioning the path of my main user.

I hope this helps
Regards
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: Jan Gruuthuse on May 19, 2013, 08:27:23 AM
Not sure if os X has same feature like in linux? This would take you always to the users home:
cd ~/
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: Shotokan81 on May 19, 2013, 08:47:33 AM
apparently "~" works the same in osx - but I am not convinced this is the most elegant solution here for the developers, because the app would still need to be in "~".

If the path to libraries are coded using dots, like "./Contents/Resources/lib/", or ".." for parent folder, it would make the application portable, meaning not only it works with any user name, but also the user could launch it from any folder, in particular from "/Applications/" rather than "~", which is what average mac-joe would do.

More precisely in this case, assuming the binary to run is:
/Applications/Avidemux2.6.app/Contents/Resources/bin/avidemux

and the library is:
/Applications/Avidemux2.6.app/Contents/Resources/lib/libADM6avutil.52.dylib

Then the path to the library from the binary should be:
./../lib/

But there are certainly limitations I am not aware of.
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: Jan Gruuthuse on May 19, 2013, 11:36:51 AM
Having no apple experience/access, nothing much I can do/test on this issue.
Just did come across this:
- Applications directory
- Home directory
- Library directory
- Application Support directory
Table 1-1  Key directories for Mac apps (https://developer.apple.com/library/mac/#documentation/General/Conceptual/MOSXAppProgrammingGuide/AppRuntime/AppRuntime.html)
Hope you or developers find a solution.
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: mean on May 19, 2013, 01:31:49 PM
Why does it have reference to  /Applications/Avidemux2.6/Xxx?

When built from bootstrap it should only have reference to ~/avidemux2.6.app or similar
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: Shotokan81 on May 19, 2013, 02:35:25 PM
Hi

Just to make sure I am not making anyone lose time, the app works for me, I just tried to see if the compiled app could be used by another person. I made two tests:

Test 1:
Deleting everything and installing it to my applications folder from the dmg (which is why it references from the /Applications/Avidemux2.6.app/ folder). The app does not launch, and the following message is displayed, XXXXX being the name of the user who compiled the app in his ~ folder using the bash script.
dyld: Library not loaded: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/libADM6avutil.52.dylib
  Referenced from: /Applications/Avidemux2.6.app/Contents/Resources/bin/./../lib/libADM_coreVideoEncoder6.dylib
  Reason: image not found
Trace/BPT trap: 5


Test 2:
I create a new user (below testuser), and I move the app to it's ~ folder, and delete it from XXXXX home folder to make sure I simulate someone who would install avidemux using the compiled binary only. The app does not launch, and I have the below message, similar to the first message:
dyld: Library not loaded: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/libADM6avutil.52.dylib
  Referenced from: /Users/testuser/Avidemux2.6.app/Contents/Resources/bin/./../lib/libADM_coreVideoEncoder6.dylib
  Reason: image not found
Trace/BPT trap: 5


I hope it clarifies why the application is not called from the ~ folder of the user who compiled it.

I hope the tests make sense. If there is a way to make the dmg portable, I am happy to test.
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: mean on May 19, 2013, 06:44:01 PM
What is the output of
python XXXX/cmake/osx_libs.py

where XXX is the path to avidemux source
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: Shotokan81 on May 20, 2013, 01:12:46 PM
Here is the output:

Preparing independant bundle, home=/Users/XXXXX...
Copying Qt framework
QtCore
QtGui
QtOpenGl
QtScript
Copying Qt framework dependencies
Copy deps for QtCore (/opt/local/Library/Frameworks/QtCore.framework/Versions/4/QtCore)
/usr/bin/otool: can't open file: /opt/local/Library/Frameworks/QtCore.framework/Versions/4/QtCore (No such file or directory)
Copy deps for QtGui (/opt/local/Library/Frameworks/QtGui.framework/Versions/4/QtGui)
/usr/bin/otool: can't open file: /opt/local/Library/Frameworks/QtGui.framework/Versions/4/QtGui (No such file or directory)
Copy deps for QtOpenGl (/opt/local/Library/Frameworks/QtOpenGl.framework/Versions/4/QtOpenGl)
/usr/bin/otool: can't open file: /opt/local/Library/Frameworks/QtOpenGl.framework/Versions/4/QtOpenGl (No such file or directory)
Copy deps for QtScript (/opt/local/Library/Frameworks/QtScript.framework/Versions/4/QtScript)
/usr/bin/otool: can't open file: /opt/local/Library/Frameworks/QtScript.framework/Versions/4/QtScript (No such file or directory)
Copying system files
Adjusting dependencies
/usr/bin/install_name_tool: /usr/bin/install_name_tool: /usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/check24fps.py is not a Mach-O fileinput file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/PSP.py is not a Mach-O file

input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/720p.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/dvd.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/vcd.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/svcd.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/lib/ADM_imageInfo.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/lib/ADM_image.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/720p.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/check24fps.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/dvd.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/PSP.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/svcd.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/vcd.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/lib/ADM_image.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/lib/ADM_imageInfo.py is not a Mach-O file
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: mean on May 20, 2013, 01:22:58 PM
Qt is not installed in /opt/local/Library/Framework
The script needs to be modified with the correct path
(cmake/osx_libs.py)
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: Shotokan81 on May 20, 2013, 03:25:27 PM
Sorry I am confused.
Does the fact that Avidemux runs implies that Qt is installed?
If so, how do I find where it is installed?
For instance, I cannot find the QtCore.framework folder anywhere.

When I find the path, should I only update the two rows below:
absPath='/opt/local/Library/Frameworks/'+modul+'.framework/Versions/4/'+modul
src='/opt/local/Library/Frameworks/'+q+'.framework'

These are the only two results when I CTRL+F "/opt/local/Library/Frameworks/"
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: mean on May 20, 2013, 08:54:41 PM
yes, it is installed, but apparently not where the osx_lib.py script expects it to be
otool -L bin/avidemux
will tell you, maybe in /Applications
Yes, just updating these 2 lines should make it standalone, unless there is another issue

Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: Shotokan81 on May 21, 2013, 12:52:08 PM
Hi

Indeed you are right.
It was in OSX hidden folders.

I have made the changes in the script file and run it again, below is the output.

What is the next step?
Regards

Preparing independant bundle, home=/Users/XXXXX...
Copying Qt framework
QtCore
QtGui
QtOpenGl
QtScript
Copying Qt framework dependencies
Copy deps for QtCore (/usr/local/lib/QtCore.framework/Versions/4/QtCore)
Copy deps for QtGui (/usr/local/lib/QtGui.framework/Versions/4/QtGui)
Copy deps for QtOpenGl (/usr/local/lib/QtOpenGl.framework/Versions/4/QtOpenGl)
Copy deps for QtScript (/usr/local/lib/QtScript.framework/Versions/4/QtScript)
Copying system files
Adjusting dependencies
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/720p.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/check24fps.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/dvd.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/PSP.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/svcd.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/vcd.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/lib/ADM_image.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/lib/ADM_imageInfo.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/720p.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/check24fps.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/dvd.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/PSP.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/svcd.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/vcd.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/lib/ADM_image.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/lib/ADM_imageInfo.py is not a Mach-O file
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: mean on May 21, 2013, 12:58:45 PM
It still does not work when you copy the dmg somewhere else ?
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: Shotokan81 on May 21, 2013, 01:06:50 PM
Sure, will test and report.
Will use the dmg in the source folder.
However it has not been modified today according to the tag in Finder.
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: Shotokan81 on May 21, 2013, 03:09:13 PM
YES! It seems to work.

It took me some time to figure out, but this is not the dmg file that has been updated by the python script, but the files under the Avidemux2.6.app folder in ~.

The dmg is unchanged and as expected it gives the same error message as before, recompiling does not help.
However, the .app file is now portable to another folder and user after my tests.

What I would be interested to know is the following:
- Would the application launch on someone computer if the Qt framework is not installed at all (which should be the case of 99% of average user am I correct?). Is it a requisite for compiling or running the app?
- Can I make a new dmg out of the app (I guess the answer is in google, just not familiar with it)
- I can see the below messages of things that do not seem to launch. is it normal/fine or some work remains to be done?

Unable to load [copyADM]: dlopen(copyADM, 6): image not found
[ADM_vd6_plugin] Cannot parse plugin
[ADM_ad_plugin] Cannot parse plugin
[ADM_vf_plugin] Cannot parse plugin
Device not found :ALSA
[UI_RunApp]  OpenGL not activated, not initialized
[ADM_ae_plugin] Cannot parse plugin


Regards

Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: mean on May 21, 2013, 04:05:47 PM
if you run the boostrapOsx again you should end up with a working dmg
The script takes care of copying the needed Qt files inside the dmg/app

Regarding the error, no necessarily a problem
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: Shotokan81 on May 22, 2013, 02:14:00 PM
Hi,

According to my tests it worked:
- The app got 17MB larger as the Frameworks subfolders contain some Qt related files. I trust this corresponds to what you said: "The script takes care of copying the needed Qt files inside the dmg/app".
- The app launches from any folder via the terminal.
- Any user can install and launch the app by drag and drop from the dmg into the Applications folder.

This is as much as I can do/test.

Regards
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: mean on May 22, 2013, 02:24:32 PM
The only things remaining is to have somebody else to test it on another mac
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: Jan Gruuthuse on May 22, 2013, 04:17:29 PM
Upload dmg package to rapidshare or similar web service and provide a publicly available download link for it.

Thanks again, think some user(s) will test this and let us know how it went.
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: styrol on May 22, 2013, 08:57:44 PM
Quote from: mean on May 22, 2013, 02:24:32 PM
The only things remaining is to have somebody else to test it on another mac
Here I am... :-)
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: Shotokan81 on May 24, 2013, 12:35:59 PM
Thanks Jan, I would prefer not to have to create an account on rapid share if possible.

Styrol, thanks for your offer, i suggested an alternative method in pm. Sorry for pm you without asking first, please let me know if this suits you or i'll look for something else (or if you have an alternative please let me know).

Regards
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: Jan Gruuthuse on May 24, 2013, 01:26:34 PM
I do understand, created an upload folder here: ... where you can upload without registering.
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: styrol on May 24, 2013, 07:43:25 PM
Quote from: Shotokan81 on May 24, 2013, 12:35:59 PM
I suggested an alternative method in pm.
I answered via pm.
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: Shotokan81 on May 26, 2013, 12:36:53 PM
Thank you

Let's see Styrol feedback, and then maybe we can share the package.

Regards
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: styrol on May 30, 2013, 12:22:40 PM
Quote from: mean on May 22, 2013, 02:24:32 PM
The only things remaining is to have somebody else to test it on another mac
Quote from: Shotokan81 on May 26, 2013, 12:36:53 PM
Let's see Styrol feedback, and then maybe we can share the package.

I did have access to an untouched 10.7.5 system yesterday (meaning no homebrew or macports was installed).
The application does not open, this is what Console says:

[0x0-0x7d07d].Avidemux.org: dyld: Library not loaded: /usr/local/lib/QtGui.framework/Versions/4/QtGui
[0x0-0x7d07d].Avidemux.org:   Referenced from: /Users/user/Desktop/Avidemux2.6.app/Contents/MacOS/../Resources/bin/avidemux
[0x0-0x7d07d].Avidemux.org:   Reason: image not found
[0x0-0x7d07d].Avidemux.org: /Users/user/Desktop/Avidemux2.6.app/Contents/MacOS/Avidemux2.6.app: line 3:  1969 Trace/BPT trap: 5       $DIR/../Resources/bin/avidemux

So Avidemux tries to load QtGui from
/usr/local/lib/QtGui.framework/Versions/4/QtGui
instead of
/Applications/Avidemux2.6.app/Contents/Frameworks/QtGui.framework/Versions/4/QtGui
(respectively the corresponding relative path)

So there is still a problem.

(On my own system it runs, but I have QtGui.framework installed in usr/local/lib by Homebrew)
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: Shotokan81 on May 31, 2013, 01:19:00 PM
Thank you Styrol for your tests and sorry I did not manage to find out myself.

@Mean, I could reproduce the error: simply changing the file name from
/usr/local/lib/QtGui.framework/Versions/4/QtGui
to
/usr/local/lib/QtGui.framework/Versions/4/QtGui2
and the application does not launch.

If there is a solution to test, I can try and test locally using the above.

May I be correct to guess it relates to this function in the python script osx_libs.py?
changeQtPluginLinkPath(qtPluginFolder)

Is there a way in the source folder to see if the link has been updated in a source file to be used for compilation?

Regards
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: mean on May 31, 2013, 03:12:28 PM
To be sure, for each file in Application/xxx/bin, Application/xxx/lib
the output of
otool -L xxxxx
should NOT contain anything related to /usr/local or /home/xxxx

The osx_libs.py script should remap all the references to application relative path
Here it seems the Qt ones are not remapped correctly

No need to do the whole bootstrap to tune it, you can just run the osx_libs.py script until it is ok
THEN rerun bootstrap one last time
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: mitchde on June 02, 2013, 07:20:31 AM
I think same prob is in the available nigthy build (at least for me). app crashes and lastest things it does was using QT stuff.
http://avidemux.org/nightly/osx/ (http://avidemux.org/nightly/osx/)


0   libsystem_kernel.dylib        0x00007fff8bb6e212 __pthread_kill + 10
1   libsystem_c.dylib              0x00007fff8e83db54 pthread_kill + 90
2   libsystem_c.dylib              0x00007fff8e881dce abort + 143
3   QtCore                        0x000000010b6c6cf5 qt_message_output(QtMsgType, char const*) + 117
4   QtCore                        0x000000010b6c6ed7 qt_message(QtMsgType, char const*, __va_list_tag*) + 183
5   QtCore                        0x000000010b6c709a qFatal(char const*, ...) + 170
6   QtGui                          0x000000010baf2e95 QWidgetPrivate::QWidgetPrivate(int) + 853
7   QtGui                          0x000000010bb0255b QWidget::QWidget(QWidget*, QFlags<Qt::WindowType>) + 59
8   QtGui                          0x000000010ba60d39 QDesktopWidget::QDesktopWidget() + 41
9   QtGui                          0x000000010baaaf2b QApplication::desktop() + 59
10  QtGui                          0x000000010ba5c1db flipPoint(CGPoint const&) + 27
11  QtGui                          0x000000010ba57775 -[QCocoaWindowDelegate windowDidMove:] + 133
12  com.apple.CoreFoundation      0x00007fff862eaeda _CFXNotificationPost + 2554
13  com.apple.Foundation          0x00007fff903c67b6 -[NSNotificationCenter postNotificationName:object:userInfo:] + 64
14  com.apple.AppKit              0x00007fff8827a341 -[NSWindow _setFrameCommon:display:stashSize:] + 1973
15  com.apple.AppKit              0x00007fff881d13fe -[NSWindow setFrameOrigin:] + 406
16  QtGui                          0x0000000103e03217 QWidgetPrivate::setGeometry_sys(int, int, int, int, bool) + 887
17  QtGui                          0x0000000103eaf397 QWidget::resize(QSize const&) + 215
18  QtGui                          0x0000000103ea8c9a QWidget::setMinimumSize(int, int) + 186
19  QtGui                          0x0000000103e8d431 QLayout::activate() + 497
20  QtGui                          0x0000000103eabc42 QWidget::adjustSize() + 66
21  avidemux 


I dont know if it happens by using QT libs from /Library/Frameworks/ instead of using libs from app path.


       0x108d41000 -        0x108decfff +QtScriptTools (4.8.4) <2CEB51EC-98F2-F978-5477-40625DCBDC3B> /Library/Frameworks/QtScriptTools.framework/Versions/4/QtScriptTools
       0x108e48000 -        0x108e88ff7 +libADM_script_tinyPy.dylib (0) <052F098A-EB0F-3E62-9B57-2898B6F00B0E> /Applications/VIDEO/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/scriptEngines/libADM_script_tinyPy.dylib
       0x10b100000 -        0x10b2e3fff +QtScript (0) <A9DA6776-7B4C-3FC3-B1F0-E1361FA0118D> /Applications/VIDEO/Avidemux2.6.app/Contents/Frameworks/QtScript.framework/Versions/4/QtScript
       0x10b396000 -        0x10b5efff7 +QtScript (4.8.4) <73EE233F-4C49-0AEC-A02F-D8402CE0F018> /Library/Frameworks/QtScript.framework/Versions/4/QtScript
       0x10b6aa000 -        0x10b983fef +QtCore (4.8.4) <066143BB-EB51-053C-84CE-D3EBDA45466A> /Library/Frameworks/QtCore.framework/Versions/4/QtCore
       0x10ba22000 -        0x10c43dfef +QtGui (4.8.4) <7E72D670-7AEF-3C9A-C7E4-E60A6167CC68> /Library/Frameworks/QtGui.framework/Versions/4/QtGui
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: mean on June 02, 2013, 10:12:40 AM
Try removing
Avidemux.app/Contents/Resources/lib/ADM_plugins6/scriptEngines/libADM_script_qt.dylib
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: Shotokan81 on June 02, 2013, 03:14:45 PM
Quote from: mean on May 31, 2013, 03:12:28 PM
To be sure, for each file in Application/xxx/bin, Application/xxx/lib
the output of
otool -L xxxxx
should NOT contain anything related to /usr/local or /home/xxxx

The osx_libs.py script should remap all the references to application relative path
Here it seems the Qt ones are not remapped correctly

No need to do the whole bootstrap to tune it, you can just run the osx_libs.py script until it is ok
THEN rerun bootstrap one last time

Thank you. I executed the below command in bin (under the app folder):
for file in ./*; do echo "$file"; otool -L $file | grep -e '/usr/local' -e '/home'; done

It gave the below results:
./ADM_plugins6
otool: can't map file: ./ADM_plugins6 (Invalid argument)
./libADM6avcodec.54.dylib
./libADM6avformat.54.dylib
./libADM6avutil.52.dylib
./libADM6postproc.52.dylib
./libADM6swscale.2.dylib
./libADM_UIQT46.dylib
/usr/local/lib/QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.4)
/usr/local/lib/QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.4)
/usr/local/lib/QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.4)
./libADM_audioParser6.dylib
./libADM_core6.dylib
./libADM_coreAudio6.dylib
./libADM_coreAudioDevice6.dylib
./libADM_coreAudioEncoder6.dylib
./libADM_coreAudioFilterAPI6.dylib
./libADM_coreDemuxer6.dylib
./libADM_coreDemuxerMpeg6.dylib
./libADM_coreImage6.dylib
./libADM_coreImageLoader6.dylib
./libADM_coreJobs.dylib
./libADM_coreMuxer6.dylib
./libADM_coreScript.dylib
./libADM_coreSocket6.dylib
./libADM_coreSqlLight3.dylib
./libADM_coreUI6.dylib
./libADM_coreUtils6.dylib
./libADM_coreVideoCodec6.dylib
./libADM_coreVideoEncoder6.dylib
./libADM_coreVideoFilter6.dylib
./libADM_render6_qt4.dylib
/usr/local/lib/QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.4)
/usr/local/lib/QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.4)
/usr/local/lib/QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.4)


I did not find how to make it recursive yet.

However, I am not sure what you mean from there.
I should run the script osx_libs.py from the app folder (under applications)?
Then I should recompile from the app folder (under applications)?
I am asking because the source files are not in the application.

Or should I do it from the source folder?
I am asking because this is what I did already to get this app.
Do you mean I should run the script several times until the references disappear from the source folder, and then compile?
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: mean on June 02, 2013, 03:35:02 PM
I mean you could do the following several times :
* Tweak the script
* Run the script
* Check with otool
Title: Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
Post by: mitchde on June 03, 2013, 03:20:36 AM
Quote from: mean on June 02, 2013, 10:12:40 AM
Try removing
Avidemux.app/Contents/Resources/lib/ADM_plugins6/scriptEngines/libADM_script_qt.dylib

THANKS - no no more crashing!
Title: Re: Howto build Avidemux-2.6 using Homebrew on OSX
Post by: styrol on December 27, 2013, 03:18:20 AM
Quote from: nibbles 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 (https://raw.github.com/2bits/homebrew/newAdm3/Library/Formula/avidemux3.rb)

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

[..]

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


brew rm -f avidemux3
brew install --HEAD avidemux3


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 (http://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/).

(2) Install Homebrew (http://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac) using the following Terminal command (http://brew.sh):
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:
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:
brew linkapps

--------------------------------
If you want to update Avidemux to the latest nightly version:
brew rm -f avidemux
brew install --HEAD avidemux


If you want to install the "stable" version of Avidemux (Milestone):
brew install avidemux

If you encounter permission errors, refer to the manual (http://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac) mentioned in step 1.
Title: Re: Howto install Avidemux 2.6 on OSX using Homebrew
Post by: nibbles on October 05, 2014, 06:24:49 PM
bump and thanks Mean for everything.