News:

--

Main Menu

Howto install Avidemux 2.6 on OSX using Homebrew

Started by nibbles, November 05, 2011, 02:57:12 AM

Previous topic - Next topic

Shotokan81

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.

Jan Gruuthuse

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.

Shotokan81

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?

Jan Gruuthuse

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




Shotokan81

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?

Shotokan81

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.

Jan Gruuthuse

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.

Shotokan81

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

Shotokan81

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

Jan Gruuthuse

Thanks for the effort, apple users will appreciated this.

mean

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


styrol

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.

Shotokan81

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

Jan Gruuthuse

Not sure if os X has same feature like in linux? This would take you always to the users home:
cd ~/

Shotokan81

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.