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

Shotokan81

  • Newbie
  • *
  • Posts: 38
Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
« Reply #60 on: May 15, 2013, 02:22:11 PM »
Yes I think something is not were you expect.
This is what I get:

Code: [Select]
XXXXX$ sh bootstrapOsX.sh
sh: bootstrapOsX.sh: No such file or directory

Code: [Select]
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:
Code: [Select]
# 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

  • Hero Member
  • *****
  • Posts: 6053
Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
« Reply #61 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?
Code: [Select]
bash --version
Quote
GNU 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

  • Newbie
  • *
  • Posts: 38
Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
« Reply #62 on: May 15, 2013, 03:42:11 PM »
Strangely, bash is here, although not sure when I installed it.
Code: [Select]
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:
Code: [Select]
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

  • Hero Member
  • *****
  • Posts: 6053
Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
« Reply #63 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?
Code: [Select]
svn co svn://svn.berlios.de/avidemux/branches/avidemux_2.6_branch_mean or
Code: [Select]
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:
Code: [Select]
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

  • Newbie
  • *
  • Posts: 38
Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
« Reply #64 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:
Code: [Select]
bash bootStrapOsx.bashgives the following.
Note that there are errors at the end, and the make fails without building the app.
Code: [Select]
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

  • Newbie
  • *
  • Posts: 38
Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
« Reply #65 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.

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6053
Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
« Reply #66 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.

Shotokan81

  • Newbie
  • *
  • Posts: 38
Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
« Reply #67 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

Shotokan81

  • Newbie
  • *
  • Posts: 38
Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
« Reply #68 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

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6053
Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
« Reply #69 on: May 18, 2013, 10:57:25 AM »
Thanks for the effort, apple users will appreciated this.

mean

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10974
Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
« Reply #70 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

« Last Edit: May 19, 2013, 02:13:02 AM by mean »

styrol

  • Hero Member
  • *****
  • Posts: 533
Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
« Reply #71 on: May 18, 2013, 07:26:27 PM »
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

  • Newbie
  • *
  • Posts: 38
Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
« Reply #72 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:
Code: [Select]
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:
Code: [Select]
cd /Applications/Avidemux2.6.app/Contents/Resources/bin
./avidemux

The output is as below:
Code: [Select]
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
« Last Edit: May 19, 2013, 07:34:28 AM by Shotokan81 »

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6053
Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
« Reply #73 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:
Code: [Select]
cd ~/

Shotokan81

  • Newbie
  • *
  • Posts: 38
Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
« Reply #74 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:
Code: [Select]
/Applications/Avidemux2.6.app/Contents/Resources/bin/avidemux
and the library is:
Code: [Select]
/Applications/Avidemux2.6.app/Contents/Resources/lib/libADM6avutil.52.dylib
Then the path to the library from the binary should be:
Code: [Select]
./../lib/
But there are certainly limitations I am not aware of.