Moonbase59 / loudgain

ReplayGain 2.0 loudness normalizer based on the EBU R128/ITU BS.1770 standard (-18 LUFS, FLAC, Ogg, MP2, MP3, MP4, M4A, AAC, ALAC, Opus, ASF, WMA, WAV, AIFF, WavPack, APE)
Other
182 stars 23 forks source link

Feature Request: Mac Homebrew Support #2

Closed classicjazz closed 4 years ago

classicjazz commented 4 years ago

Please consider Homebrew support for Mac users. This would automate both initial installation and upgrades for subsequent releases.

Thank you

Moonbase59 commented 4 years ago

Sounds interesting, and of course I’d love Mac users being able to use loudgain.

Unfortunately I currently don’t have the resources to do that (little time, no Mac, no idea how to go about it, no way to test). If there’s anybody who could help with this issue, and if it can be done easily, I still might be interested. ;-)

classicjazz commented 4 years ago

I am testing on my fork.

In the mean time, there is a Linux version of Homebrew: https://docs.brew.sh/Homebrew-on-Linux

Moonbase59 commented 4 years ago

Great, maybe we can work something out together. :-) Let me know.

Moonbase59 commented 4 years ago

I wonder if bin/loudgain.static would run on a Mac (a »runnable« ELF64-binary with all dependencies included). Would you care to try this for me?

classicjazz commented 4 years ago

I downloaded bin/loudgain.static but it does not run. sudo: /Users/classicjazz/Downloads/loudgain.static: command not found

Moonbase59 commented 4 years ago

Well I reckon it might be too much to expect an ELF binary to run on OS X. Worth a try anyway, thanks! So compiling (and a homebrew formula) will be needed after all.

classicjazz commented 4 years ago

Picking up from the discussion for https://github.com/Moonbase59/loudgain/issues/3, (that was about manual install, not homebrew)

I modified my formula, here: https://raw.githubusercontent.com/classicjazz/loudgain/master/loudgain.rb

Now my issue is: Error: No available formula with the name "libavcodec" (dependency of loudgain)

Libavcodec isn't a separate installer in brew but is part of FFMPEG, I think. And, FFMPEG is already installed.

Moonbase59 commented 4 years ago

Phew. This turns out to be harder than expected. In the meantime, I’ve been fighting with linuxbrew (won’t install open-mpi).

I’m working on a tap, in the meantime you might want to try:

brew tap Moonbase59/tap
brew install --HEAD Moonbase59/tap/loudgain

or just include

depends_on "ffmpeg"

Check out https://github.com/Moonbase59/homebrew-tap/blob/master/Formula/loudgain.rb

:-)

classicjazz commented 4 years ago

$ brew tap Moonbase59/tap

Updating Homebrew... ==> Auto-updated Homebrew! Updated 1 tap (homebrew/cask). No changes to formulae.

==> Tapping moonbase59/tap Cloning into '/usr/local/Homebrew/Library/Taps/moonbase59/homebrew-tap'... remote: Enumerating objects: 5, done. remote: Counting objects: 100% (5/5), done. remote: Compressing objects: 100% (4/4), done. remote: Total 5 (delta 0), reused 5 (delta 0), pack-reused 0 Unpacking objects: 100% (5/5), done. Tapped 1 formula (30 files, 26.3KB). naples:~ mike$ brew install --HEAD Moonbase59/tap/loudgain ==> Installing loudgain from moonbase59/tap ==> Installing dependencies for moonbase59/tap/loudgain: gnutls ==> Installing moonbase59/tap/loudgain dependency: gnutls ==> Downloading https://homebrew.bintray.com/bottles/gnutls-3.6.9.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/91/919a4cbaf5a160dbbe94811b6cc399b91986e4d13ce69d107b812265a0156dff?__gda__=exp=1565461219~hmac=04f9d ######################################################################## 100.0% ==> Pouring gnutls-3.6.9.mojave.bottle.tar.gz 🍺 /usr/local/Cellar/gnutls/3.6.9: 1,227 files, 9.9MB ==> Installing moonbase59/tap/loudgain --HEAD ==> Cloning https://github.com/Moonbase59/loudgain.git Updating /Users/mike/Library/Caches/Homebrew/loudgain--git ==> Checking out branch master Already on 'master' Your branch is up to date with 'origin/master'. HEAD is now at 807c4d3 Make sometimes didn't find ebur128.h, see #3 ==> cmake -G Unix Makefiles .. -DCMAKE_C_FLAGS_RELEASE=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE=-DNDEBUG -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/loudgain/ ==> make Last 15 lines from /Users/mike/Library/Logs/Homebrew/loudgain/02.make: [ 80%] Building C object CMakeFiles/loudgain.dir/src/scan.c.o [ 80%] Building C object CMakeFiles/loudgain.dir/src/printf.c.o [ 80%] Building CXX object CMakeFiles/loudgain.dir/src/tag.cc.o /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang++ -I/tmp/loudgain-20190810-49740-1ygs0zb/src -I/usr/local/Cellar/ffmpeg/HEAD-6c67c8c_1/include -I/usr/local/Cellar/taglib/1.11.1/include/taglib -I/tmp/loudgain-20190810-49740-1ygs0zb/build -std=gnu++11 -D_GNU_SOURCE -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -Wall -pedantic -g -o CMakeFiles/loudgain.dir/src/tag.cc.o -c /tmp/loudgain-20190810-49740-1ygs0zb/src/tag.cc /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang -I/tmp/loudgain-20190810-49740-1ygs0zb/src -I/usr/local/Cellar/ffmpeg/HEAD-6c67c8c_1/include -I/usr/local/Cellar/taglib/1.11.1/include/taglib -I/tmp/loudgain-20190810-49740-1ygs0zb/build -std=gnu99 -D_GNU_SOURCE -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -Wall -pedantic -g -o CMakeFiles/loudgain.dir/src/scan.c.o -c /tmp/loudgain-20190810-49740-1ygs0zb/src/scan.c /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang -I/tmp/loudgain-20190810-49740-1ygs0zb/src -I/usr/local/Cellar/ffmpeg/HEAD-6c67c8c_1/include -I/usr/local/Cellar/taglib/1.11.1/include/taglib -I/tmp/loudgain-20190810-49740-1ygs0zb/build -std=gnu99 -D_GNU_SOURCE -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -Wall -pedantic -g -o CMakeFiles/loudgain.dir/src/printf.c.o -c /tmp/loudgain-20190810-49740-1ygs0zb/src/printf.c /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang -I/tmp/loudgain-20190810-49740-1ygs0zb/src -I/usr/local/Cellar/ffmpeg/HEAD-6c67c8c_1/include -I/usr/local/Cellar/taglib/1.11.1/include/taglib -I/tmp/loudgain-20190810-49740-1ygs0zb/build -std=gnu99 -D_GNU_SOURCE -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -Wall -pedantic -g -o CMakeFiles/loudgain.dir/src/loudgain.c.o -c /tmp/loudgain-20190810-49740-1ygs0zb/src/loudgain.c /tmp/loudgain-20190810-49740-1ygs0zb/src/printf.c:40:10: fatal error: 'pty.h' file not found

include

     ^~~~~~~

1 error generated. make[2]: [CMakeFiles/loudgain.dir/src/printf.c.o] Error 1 make[2]: Waiting for unfinished jobs.... make[1]: [CMakeFiles/loudgain.dir/all] Error 2 make: [all] Error 2

Moonbase59 commented 4 years ago

Odd. pty.h is used for pseudo terminal handling and part of glibc. At least on my Linux boxes.

Edit: Seems MacOS has no pty.h. Give me a few minutes and let me see if we have a solution that compiles on both MacOS and Linux …

Moonbase59 commented 4 years ago

Unfortunately, linuxbrew doesn’t work out for me right now, so let’s concentrate on #3 (manual build) first until all these MacOS difficulties are ironed out and then come back here and finish homebrew support. Appreciate your help!

classicjazz commented 4 years ago

$ brew install Moonbase59/tap/loudgain ==> Tapping moonbase59/tap Cloning into '/usr/local/Homebrew/Library/Taps/moonbase59/homebrew-tap'... remote: Enumerating objects: 5, done. remote: Counting objects: 100% (5/5), done. remote: Compressing objects: 100% (4/4), done. remote: Total 5 (delta 0), reused 4 (delta 0), pack-reused 0 Unpacking objects: 100% (5/5), done. Tapped 1 formula (30 files, 26.9KB). ==> Installing loudgain from moonbase59/tap ==> Installing dependencies for moonbase59/tap/loudgain: cmake, libtasn1, libevent, unbound, gnutls, glib, libbluray, tesseract, x265, libtag and libebur128 ==> Installing moonbase59/tap/loudgain dependency: cmake ==> Downloading https://homebrew.bintray.com/bottles/cmake-3.15.2.mojave.bottle. ==> Downloading from https://akamai.bintray.com/76/76de3a5828825352b3b05951df73a ######################################################################## 100.0% ==> Pouring cmake-3.15.2.mojave.bottle.tar.gz ==> Caveats Emacs Lisp files have been installed to: /usr/local/share/emacs/site-lisp/cmake ==> Summary 🍺 /usr/local/Cellar/cmake/3.15.2: 5,800 files, 53.2MB ==> Installing moonbase59/tap/loudgain dependency: libtasn1 ==> Downloading https://homebrew.bintray.com/bottles/libtasn1-4.14.mojave.bottle ######################################################################## 100.0% ==> Pouring libtasn1-4.14.mojave.bottle.tar.gz 🍺 /usr/local/Cellar/libtasn1/4.14: 59 files, 384KB ==> Installing moonbase59/tap/loudgain dependency: libevent ==> Downloading https://homebrew.bintray.com/bottles/libevent-2.1.11.mojave.bott ==> Downloading from https://akamai.bintray.com/0a/0a8ab56e634a686654b83cfa5a94e ######################################################################## 100.0% ==> Pouring libevent-2.1.11.mojave.bottle.tar.gz 🍺 /usr/local/Cellar/libevent/2.1.11: 1,063 files, 5MB ==> Installing moonbase59/tap/loudgain dependency: unbound ==> Downloading https://homebrew.bintray.com/bottles/unbound-1.9.2_1.mojave.bott ==> Downloading from https://akamai.bintray.com/1e/1e5a0656a5280f923f82aaa48374a ######################################################################## 100.0% ==> Pouring unbound-1.9.2_1.mojave.bottle.tar.gz ==> Caveats To have launchd start unbound now and restart at startup: sudo brew services start unbound ==> Summary 🍺 /usr/local/Cellar/unbound/1.9.2_1: 56 files, 4.8MB ==> Installing moonbase59/tap/loudgain dependency: gnutls ==> Downloading https://homebrew.bintray.com/bottles/gnutls-3.6.9.mojave.bottle. ==> Downloading from https://akamai.bintray.com/91/919a4cbaf5a160dbbe94811b6cc39 ######################################################################## 100.0% ==> Pouring gnutls-3.6.9.mojave.bottle.tar.gz 🍺 /usr/local/Cellar/gnutls/3.6.9: 1,227 files, 9.9MB ==> Installing moonbase59/tap/loudgain dependency: glib ==> Downloading https://homebrew.bintray.com/bottles/glib-2.60.6.mojave.bottle.t ==> Downloading from https://akamai.bintray.com/cb/cb0b27f37cc011ba0e5ffcd044273 ######################################################################## 100.0% ==> Pouring glib-2.60.6.mojave.bottle.tar.gz 🍺 /usr/local/Cellar/glib/2.60.6: 429 files, 15.2MB ==> Installing moonbase59/tap/loudgain dependency: libbluray ==> Downloading https://homebrew.bintray.com/bottles/libbluray-1.1.2.mojave.bott ==> Downloading from https://akamai.bintray.com/25/25de56ece940908d1be482b234b5c ######################################################################## 100.0% ==> Pouring libbluray-1.1.2.mojave.bottle.tar.gz 🍺 /usr/local/Cellar/libbluray/1.1.2: 21 files, 1.5MB ==> Installing moonbase59/tap/loudgain dependency: tesseract ==> Downloading https://homebrew.bintray.com/bottles/tesseract-4.1.0.mojave.bott ==> Downloading from https://akamai.bintray.com/77/774212dc0edf27447e1d5ba46ae9d ######################################################################## 100.0% ==> Pouring tesseract-4.1.0.mojave.bottle.tar.gz ==> Caveats This formula contains only the "eng", "osd", and "snum" language data files. If you need all the other supported languages, brew install tesseract-lang. ==> Summary 🍺 /usr/local/Cellar/tesseract/4.1.0: 65 files, 29.7MB ==> Installing moonbase59/tap/loudgain dependency: x265 ==> Downloading https://homebrew.bintray.com/bottles/x265-3.1.2.mojave.bottle.ta ==> Downloading from https://akamai.bintray.com/1e/1e82dc2f68339e0c1490747f2bb10 ######################################################################## 100.0% ==> Pouring x265-3.1.2.mojave.bottle.tar.gz 🍺 /usr/local/Cellar/x265/3.1.2: 11 files, 35.2MB ==> Installing moonbase59/tap/loudgain dependency: libtag ==> Downloading https://homebrew.bintray.com/bottles/taglib-1.11.1.mojave.bottle ==> Downloading from https://akamai.bintray.com/98/98f103a3174694dd9ff58661cb83c ######################################################################## 100.0% ==> Pouring taglib-1.11.1.mojave.bottle.tar.gz 🍺 /usr/local/Cellar/taglib/1.11.1: 118 files, 1.5MB ==> Installing moonbase59/tap/loudgain dependency: libebur128 ==> Downloading https://homebrew.bintray.com/bottles/libebur128-1.2.4.mojave.bot ######################################################################## 100.0% ==> Pouring libebur128-1.2.4.mojave.bottle.tar.gz 🍺 /usr/local/Cellar/libebur128/1.2.4: 10 files, 72.1KB ==> Installing moonbase59/tap/loudgain ==> Downloading https://github.com/Moonbase59/loudgain/archive/v0.5.3.tar.gz ==> Downloading from https://codeload.github.com/Moonbase59/loudgain/tar.gz/v0.5 ######################################################################## 100.0% ==> cmake -G Unix Makefiles .. -DCMAKE_C_FLAGS_RELEASE=-DNDEBUG -DCMAKE_CXX_FLAG ==> make Last 15 lines from /Users/mike/Library/Logs/Homebrew/loudgain/02.make: [ 80%] Building C object CMakeFiles/loudgain.dir/src/loudgain.c.o [ 80%] Building C object CMakeFiles/loudgain.dir/src/printf.c.o [ 80%] Building C object CMakeFiles/loudgain.dir/src/scan.c.o /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang++ -I/tmp/loudgain-20190812-34732-1m9iegk/loudgain-0.5.3/src -I/usr/local/Cellar/ffmpeg/HEAD-18928e2_1/include -I/usr/local/Cellar/taglib/1.11.1/include/taglib -I/tmp/loudgain-20190812-34732-1m9iegk/loudgain-0.5.3/build -std=gnu++11 -D_GNU_SOURCE -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -Wall -pedantic -g -o CMakeFiles/loudgain.dir/src/tag.cc.o -c /tmp/loudgain-20190812-34732-1m9iegk/loudgain-0.5.3/src/tag.cc /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang -I/tmp/loudgain-20190812-34732-1m9iegk/loudgain-0.5.3/src -I/usr/local/Cellar/ffmpeg/HEAD-18928e2_1/include -I/usr/local/Cellar/taglib/1.11.1/include/taglib -I/tmp/loudgain-20190812-34732-1m9iegk/loudgain-0.5.3/build -std=gnu99 -D_GNU_SOURCE -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -Wall -pedantic -g -o CMakeFiles/loudgain.dir/src/scan.c.o -c /tmp/loudgain-20190812-34732-1m9iegk/loudgain-0.5.3/src/scan.c /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang -I/tmp/loudgain-20190812-34732-1m9iegk/loudgain-0.5.3/src -I/usr/local/Cellar/ffmpeg/HEAD-18928e2_1/include -I/usr/local/Cellar/taglib/1.11.1/include/taglib -I/tmp/loudgain-20190812-34732-1m9iegk/loudgain-0.5.3/build -std=gnu99 -D_GNU_SOURCE -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -Wall -pedantic -g -o CMakeFiles/loudgain.dir/src/printf.c.o -c /tmp/loudgain-20190812-34732-1m9iegk/loudgain-0.5.3/src/printf.c /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang -I/tmp/loudgain-20190812-34732-1m9iegk/loudgain-0.5.3/src -I/usr/local/Cellar/ffmpeg/HEAD-18928e2_1/include -I/usr/local/Cellar/taglib/1.11.1/include/taglib -I/tmp/loudgain-20190812-34732-1m9iegk/loudgain-0.5.3/build -std=gnu99 -D_GNU_SOURCE -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -Wall -pedantic -g -o CMakeFiles/loudgain.dir/src/loudgain.c.o -c /tmp/loudgain-20190812-34732-1m9iegk/loudgain-0.5.3/src/loudgain.c /tmp/loudgain-20190812-34732-1m9iegk/loudgain-0.5.3/src/printf.c:40:10: fatal error: 'pty.h' file not found

include

     ^~~~~~~

1 error generated. make[2]: [CMakeFiles/loudgain.dir/src/printf.c.o] Error 1 make[2]: Waiting for unfinished jobs.... make[1]: [CMakeFiles/loudgain.dir/all] Error 2 make: [all] Error 2)

classicjazz commented 4 years ago

Results from my other Mac:

==> Installing loudgain from moonbase59/tap ==> Downloading https://github.com/Moonbase59/loudgain/archive/v0.5.3.tar.gz ==> Downloading from https://codeload.github.com/Moonbase59/loudgain/tar.gz/v0.5 ######################################################################## 100.0% ==> cmake -G Unix Makefiles .. -DCMAKE_C_FLAGS_RELEASE=-DNDEBUG -DCMAKE_CXX_FLAG ==> make Last 15 lines from /Users/mike/Library/Logs/Homebrew/loudgain/02.make: [ 80%] Building C object CMakeFiles/loudgain.dir/src/scan.c.o [ 80%] Building C object CMakeFiles/loudgain.dir/src/loudgain.c.o [ 80%] Building CXX object CMakeFiles/loudgain.dir/src/tag.cc.o /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang++ -I/tmp/loudgain-20190812-16878-1fi0ldc/loudgain-0.5.3/src -I/usr/local/Cellar/ffmpeg/HEAD-c29d81e_1/include -I/usr/local/Cellar/taglib/1.11.1/include/taglib -I/tmp/loudgain-20190812-16878-1fi0ldc/loudgain-0.5.3/build -std=gnu++11 -D_GNU_SOURCE -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -Wall -pedantic -g -o CMakeFiles/loudgain.dir/src/tag.cc.o -c /tmp/loudgain-20190812-16878-1fi0ldc/loudgain-0.5.3/src/tag.cc /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang -I/tmp/loudgain-20190812-16878-1fi0ldc/loudgain-0.5.3/src -I/usr/local/Cellar/ffmpeg/HEAD-c29d81e_1/include -I/usr/local/Cellar/taglib/1.11.1/include/taglib -I/tmp/loudgain-20190812-16878-1fi0ldc/loudgain-0.5.3/build -std=gnu99 -D_GNU_SOURCE -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -Wall -pedantic -g -o CMakeFiles/loudgain.dir/src/scan.c.o -c /tmp/loudgain-20190812-16878-1fi0ldc/loudgain-0.5.3/src/scan.c /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang -I/tmp/loudgain-20190812-16878-1fi0ldc/loudgain-0.5.3/src -I/usr/local/Cellar/ffmpeg/HEAD-c29d81e_1/include -I/usr/local/Cellar/taglib/1.11.1/include/taglib -I/tmp/loudgain-20190812-16878-1fi0ldc/loudgain-0.5.3/build -std=gnu99 -D_GNU_SOURCE -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -Wall -pedantic -g -o CMakeFiles/loudgain.dir/src/printf.c.o -c /tmp/loudgain-20190812-16878-1fi0ldc/loudgain-0.5.3/src/printf.c /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang -I/tmp/loudgain-20190812-16878-1fi0ldc/loudgain-0.5.3/src -I/usr/local/Cellar/ffmpeg/HEAD-c29d81e_1/include -I/usr/local/Cellar/taglib/1.11.1/include/taglib -I/tmp/loudgain-20190812-16878-1fi0ldc/loudgain-0.5.3/build -std=gnu99 -D_GNU_SOURCE -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -Wall -pedantic -g -o CMakeFiles/loudgain.dir/src/loudgain.c.o -c /tmp/loudgain-20190812-16878-1fi0ldc/loudgain-0.5.3/src/loudgain.c /tmp/loudgain-20190812-16878-1fi0ldc/loudgain-0.5.3/src/printf.c:40:10: fatal error: 'pty.h' file not found

include

     ^~~~~~~

1 error generated. make[2]: [CMakeFiles/loudgain.dir/src/printf.c.o] Error 1 make[2]: Waiting for unfinished jobs.... make[1]: [CMakeFiles/loudgain.dir/all] Error 2 make: [all] Error 2

Moonbase59 commented 4 years ago

I had access to a 10.14.04 Mojave iMac today, for a few minutes, and interestingly enough, got it compiled and working using Homebrew, by using

brew install --HEAD libtag
brew install --HEAD Moonbase59/tap/loudgain

Note: If libtag was installed before, brew might ask you to brew unlink the old version. I did that and it didn’t seem to harm anything.

The formula used is here.

Slowly but surely we get something going—makes me happy :-)

classicjazz commented 4 years ago

Success (sort of):

naples:~ mike$ brew install --HEAD libtag Updating Homebrew... ==> Auto-updated Homebrew! Updated 2 taps (homebrew/core and homebrew/cask). ==> Updated Formulae ldns openssh starship Error: taglib 1.11.1 is already installed To install HEAD, first run brew unlink taglib. Warning: Skipping (old) /usr/local/Cellar/taglib/1.11.1 due to it being linked naples:~ mike$ brew install --HEAD Moonbase59/tap/loudgain ==> Installing loudgain from moonbase59/tap ==> Cloning https://github.com/Moonbase59/loudgain.git Updating /Users/mike/Library/Caches/Homebrew/loudgain--git From https://github.com/Moonbase59/loudgain 807c4d3..259a920 master -> origin/master ==> Checking out branch master Already on 'master' Your branch is behind 'origin/master' by 4 commits, and can be fast-forwarded. (use "git pull" to update your local branch) HEAD is now at 259a920 Rename util.h to lg-util.h to avoid conflicts ==> cmake -G Unix Makefiles .. -DCMAKE_C_FLAGS_RELEASE=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE=-DNDEBUG -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/loudgain/ ==> make ==> make install 🍺 /usr/local/Cellar/loudgain/HEAD-259a920: 6 files, 110.9KB, built in 11 seconds Removing: /Users/mike/Library/Caches/Homebrew/loudgain--0.5.3.tar.gz... (25.4MB)

But....

$ loudgain -L -a -k -s e *.m4a [✔] Scanning '08 Photograph.m4a' ... [✘] Could not open SWResample: Invalid argument

Moonbase59 commented 4 years ago

A-ha! But … brew didn’t install the newer libtag, must unlink & reinstall from HEAD. What kind of .m4a file did you try? Hopefully audio only, but is it AAC or ALAC?

classicjazz commented 4 years ago

[FACE PALM]

naples:~ mike$ brew uninstall --ignore-dependencies libtag Uninstalling /usr/local/Cellar/taglib/1.11.1... (118 files, 1.5MB) naples:~ mike$ brew install --HEAD libtag Updating Homebrew... ==> Auto-updated Homebrew! Updated 2 taps (homebrew/core and homebrew/cask). ==> Updated Formulae binaryen ==> Cloning https://github.com/taglib/taglib.git Cloning into '/Users/mike/Library/Caches/Homebrew/taglib--git'... ==> Checking out branch master Already on 'master' Your branch is up to date with 'origin/master'. ==> cmake -DWITH_MP4=ON -DWITH_ASF=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_C_FLAGS_REL ==> make install Last 15 lines from /Users/mike/Library/Logs/Homebrew/taglib/02.make: ~~^ /Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:323:9: error: no member named 'islessgreater' in the global namespace using ::islessgreater; ~~^ /Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:324:9: error: no member named 'isunordered' in the global namespace using ::isunordered; ~~^ /Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:325:9: error: no member named 'isunordered' in the global namespace using ::isunordered; ~~^ 13 errors generated. make[2]: [taglib/CMakeFiles/tag.dir/toolkit/tbytevector.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... make[1]: [taglib/CMakeFiles/tag.dir/all] Error 2 make: [all] Error 2

classicjazz commented 4 years ago

ALAC file

Moonbase59 commented 4 years ago

Unbelievable … seems now THEY broke something … aaaargh!

Moonbase59 commented 4 years ago

Hmm … I must have deleted my few ALAC test files when that part was working. Only AAC .m4a’s left. Aaargh again.

classicjazz commented 4 years ago

If you have a private Google shared drive (or similar) that you wish to use for sample files, please let me know...

I uninstalled the --HEAD libtag. Then, reinstalled the existing brew install. So back to where I was with https://github.com/Moonbase59/loudgain/issues/2#issuecomment-520631545

Moonbase59 commented 4 years ago

Worked here:

Matthiass-iMac:~ matthias$ brew uninstall --ignore-dependencies libtag
Uninstalling /usr/local/Cellar/taglib/HEAD-79bc9cc... (124 files, 1.5MB)
Matthiass-iMac:~ matthias$ brew install --HEAD libtag
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
binaryen            ldns                openssh             starship

==> Cloning https://github.com/taglib/taglib.git
Updating /Users/matthias/Library/Caches/Homebrew/taglib--git
==> Checking out branch master
Already on 'master'
Your branch is up to date with 'origin/master'.
HEAD is now at 79bc9cc Call fflush() before ftruncate() to drop all buffered data (#914)
==> cmake -DWITH_MP4=ON -DWITH_ASF=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_C_FLAGS_REL
==> make install
🍺  /usr/local/Cellar/taglib/HEAD-79bc9cc: 124 files, 1.5MB, built in 1 minute 23 seconds
Matthiass-iMac:~ matthias$ 
Moonbase59 commented 4 years ago

You could use Firefox Send and specify download for just 1 day or just 1 download … This seems to work with Safari, too. No other cloud drives or FTP servers right now, I’m afraid.

classicjazz commented 4 years ago

My laptop permitted me to uninstall libtag without dependencies. Then installed libtag HEAD without issues. Not sure why the difference across Macs.

But...

$ loudgain -L -a -k -s e *.m4a [✔] Scanning '08 Photograph.m4a' ... [✘] Could not open SWResample: Invalid argument

Moonbase59 commented 4 years ago

Ok, before everyone gets confused, let’s open a new issue for "Could not open SWResample for ALAC .m4 files", agreed?

classicjazz commented 4 years ago

Is there an email or other means of contacting you so we can create a test repository?

Moonbase59 commented 4 years ago

Have you got Mumble (a voice chat client)? Host: mumble.radio-paranoid.de Port: 64738 MacOS client

Otherwise, mhormann [at] gmx [dot] de is fine.

Moonbase59 commented 4 years ago

Since all my test files and your file worked fine here on Mojave, I‘d like to release a Mac-compatible version 0.5.4 tomorrow (which might not build manually yet but should work fine with Homebrew.

I also suggest to close this issue after testing the new formula.

Moonbase59 commented 4 years ago

Homebrew support done & tested with Mojave 10.14.4.

Important: Always use the latest (HEAD) libtag (=taglib), because v1.11.1 came out in October 2016 but the current HEAD has many bugfixes! It’s also recommended to upgrade to the latest ffmpeg because older versions can’t handle ALAC (.m4a) and you probably want that.

Before installing loudgain, I suggest to:

brew update
brew upgrade
brew uninstall --ignore-dependencies libtag
brew install --HEAD libtag

Then you can install (and later upgrade) loudgain as follows:

brew install Moonbase59/tap/loudgain

loudgain depends heavily on up-to-date ffmpeg libraries for file decoding and resampling, and on libtag to correctly write the ReplayGain tags into the files later on. libebur128 should also be at least version 1.2.4.