Skip to content

Conversation

@auouymous
Copy link
Member

This should make it easier to use ffmpeg and other utilities that are not installed in PATH. The Mac launcher does not honor the environment PATH, making it impossible to override.

Fixes #1638.

This should make it easier to use ffmpeg and other utilities that are
not installed in PATH. The Mac launcher does not honor the environment
PATH, making it impossible to override.
@auouymous
Copy link
Member Author

@Ploddles Could you try running gpo (the command line gpodder client) and tell me if it fails to find libglib?

@Ploddles
Copy link

Ploddles commented Aug 8, 2024 via email

@elelay
Copy link
Member

elelay commented Aug 26, 2024

should it be also added to DYLD_LIBRARY_PATH?

@auouymous
Copy link
Member Author

should it be also added to DYLD_LIBRARY_PATH?

@elelay Was this referring to the gpo/glib issue I mistakening posted in this PR, or the path.alternate setting?

@computerfreak105
Copy link

computerfreak105 commented Sep 3, 2024 via email

@elelay
Copy link
Member

elelay commented Sep 3, 2024

Hi @auouymous I see it was related to the gpo issue and thp already mentioned DYLD_LIBRARY_PATH.

@elelay
Copy link
Member

elelay commented Sep 3, 2024

@computerfreak105 are your settings a valid json file (you have a comma (',') before the snippet you showed us).?

@auouymous
Copy link
Member Author

Do I need the „slash” at the end?

No, remove the trailing slash.

@auouymous
Copy link
Member Author

@computerfreak105 And if you run gpodder with -v the log file should contain a line such as "Appending alternate PATH ..." if the config is good. That doesn't mean the directory you gave it is valid or contains a working ffmpeg.

The audio_converter extension uses ffmpeg to convert audio files. You could enable it, change use_ogg from false to true in settings, subscribe to https://feeds.libsyn.com/177941/rss and download an episode. If it converts to ogg then you know ffmpeg is working. Be sure to disable that extension when finished.

@computerfreak105
Copy link

computerfreak105 commented Sep 4, 2024 via email

@computerfreak105
Copy link

computerfreak105 commented Sep 8, 2024 via email

@auouymous
Copy link
Member Author

@computerfreak105 You don't specify ffmpeg, all you need is extension enable audio_converter to enable the extension. It searches path for a file named ffmpeg or avconv. It also accepts bat or exe extensions on Windows, which I assume you are using since gpo doesn't yet work on Mac. I just checked and gpo -v displays the "Appending alternate PATH: /home/test/bin" message on command line.

Can you provide a directory listing for your alternate path location?

@computerfreak105
Copy link

computerfreak105 commented Sep 9, 2024 via email

@computerfreak105
Copy link

@auouymous and anyone with Gpodder on mac

Since I’m under the impression that GPO works under mac (because I can open it and do things like subscribing and importing .opml files), I tried one more time on my mac and enabled the audio converter plugin to check if it’s really working, with your provided podcast link.

Unfortunately I get .mp3 and not .ogg files. So the path in the settings.json probably isn’t set correctly? I tried both yt-dlp based ffmpeg versions, Arm and just Linux.

Here is what I get when I start GPO with -v option.
And in addition I attach my settings.json file. Could you or anyone please with mac experience have a look if everything is set correctly?
Thank you!

Last login: Sun Sep 15 17:43:50 on ttys000
benjaminblatter@Mac-mini-von-Benjamin ~ % /Applications/gPodder.app/Contents/MacOS/gpo -v
str=/Applications/gPodder.app/Contents/Resources
filename=
ARGV[0]=/Applications/gPodder.app/Contents/MacOS/gpo
System Path:
/Applications/gPodder.app/Contents/Resources/lib/python3.11
/Applications/gPodder.app/Contents/Resources/lib/python3.11/plat-darwin
/Applications/gPodder.app/Contents/Resources/lib/python3.11/lib-dynload
/Applications/gPodder.app/Contents/Resources/lib/python3.11/site-packages
/Applications/gPodder.app/Contents/Resources
__CFBundleIdentifier=com.apple.Terminal
TMPDIR=/var/folders/jp/8p99lwc51vl2f2myt21xchhc0000gn/T/
XPC_FLAGS=0x0
TERM=xterm-256color
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.l3q1czSNak/Listeners
XPC_SERVICE_NAME=0
TERM_PROGRAM=Apple_Terminal
TERM_PROGRAM_VERSION=453
TERM_SESSION_ID=972FADCB-1CD4-4B62-964C-7E6E2DBB2E46
SHELL=/bin/zsh
HOME=/Users/benjaminblatter
LOGNAME=benjaminblatter
USER=benjaminblatter
PATH=/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin
SHLVL=1
PWD=/Users/benjaminblatter
OLDPWD=/Users/benjaminblatter
LANG=de_CH.UTF-8
_=/Applications/gPodder.app/Contents/MacOS/gpo
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x13
PYTHONOPTIMIZE=yes
CHARSETALIASDIR=/Applications/gPodder.app/Contents/Resources/lib
DYLD_LIBRARY_PATH=/Applications/gPodder.app/Contents/Resources/lib
GTK_DATA_PREFIX=/Applications/gPodder.app/Contents/Resources
GTK_EXE_PREFIX=/Applications/gPodder.app/Contents/Resources
GTK_PATH=/Applications/gPodder.app/Contents/Resources
LD_LIBRARY_PATH=/Applications/gPodder.app/Contents/Resources/lib
XDG_CONFIG_DIRS=/Applications/gPodder.app/Contents/Resources/etc
XDG_DATA_DIRS=/Applications/gPodder.app/Contents/Resources/share
PANGO_LIBDIR=/Applications/gPodder.app/Contents/Resources/lib
PANGO_RC_FILE=/Applications/gPodder.app/Contents/Resources/etc/pango/pangorc
PANGO_SYSCONFDIR=/Applications/gPodder.app/Contents/Resources/etc
GDK_PIXBUF_MODULE_FILE=/Applications/gPodder.app/Contents/Resources/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
GTK_IM_MODULE_FILE=/Applications/gPodder.app/Contents/Resources/etc/gtk-3.0/gtk.immodules
GI_TYPELIB_PATH=/Applications/gPodder.app/Contents/Resources/lib/girepository-1.0
PYTHONHOME=/Applications/gPodder.app/Contents/Resources
GPODDER_DOWNLOAD_DIR=/Volumes/SynologyPool/G
No regenerating /Users/benjaminblatter/Library/Application Support/gPodder/openssl/cert.extracted.pem it's fresh enough
Storing downloads in /Volumes/SynologyPool/G (GPODDER_DOWNLOAD_DIR is set)
1726415192.658681 [gpodder.log] DEBUG: ==== gPodder starts up (ui=) ===
1726415192.743338 [gpodder.registry] DEBUG: Registering download_url resolver: <function youtube_real_download_url at 0x112680720>
1726415192.744146 [gpodder.registry] DEBUG: Registering download_url resolver: <function vimeo_real_download_url at 0x11264f7e0>

** (process:63491): WARNING **: 17:46:32.764: Failed to load shared library 'libglib-2.0.0.dylib' referenced by the typelib: dlopen(libglib-2.0.0.dylib, 0x0009): tried: 'libglib-2.0.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibglib-2.0.0.dylib' (no such file), '/usr/lib/libglib-2.0.0.dylib' (no such file, not in dyld cache), 'libglib-2.0.0.dylib' (no such file), '/usr/local/lib/libglib-2.0.0.dylib' (no such file), '/usr/lib/libglib-2.0.0.dylib' (no such file, not in dyld cache)
1726415192.775550 [gpodder.sync] INFO: iPod sync not available
1726415192.775790 [gpodder.sync] INFO: eyeD3 MP3 not available
1726415192.777703 [gpodder.config] INFO: Appending alternate PATH: /Users/benjaminblatter/Downloads/ffmpeg/bin
1726415192.778127 [gpodder.extensions] DEBUG: Found extension "audio_converter" in /Applications/gPodder.app/Contents/Resources/share/gpodder/extensions/audio_converter.py
1726415192.778849 [gpodder.extensions] INFO: Module loaded: /Applications/gPodder.app/Contents/Resources/share/gpodder/extensions/audio_converter.py
1726415192.778914 [gpodder.extensions] DEBUG: Found extension "command_on_download" in /Applications/gPodder.app/Contents/Resources/share/gpodder/extensions/command_on_download.py
1726415192.779046 [gpodder.extensions] DEBUG: Found extension "concatenate_videos" in /Applications/gPodder.app/Contents/Resources/share/gpodder/extensions/concatenate_videos.py
1726415192.779168 [gpodder.extensions] DEBUG: Found extension "enqueue_in_mediaplayer" in /Applications/gPodder.app/Contents/Resources/share/gpodder/extensions/enqueue_in_mediaplayer.py
1726415192.779303 [gpodder.extensions] DEBUG: Found extension "episode_website_context_menu" in /Applications/gPodder.app/Contents/Resources/share/gpodder/extensions/episode_website_context_menu.py
1726415192.779414 [gpodder.extensions] DEBUG: Found extension "filter" in /Applications/gPodder.app/Contents/Resources/share/gpodder/extensions/filter.py
1726415192.779540 [gpodder.extensions] DEBUG: Found extension "gtk_statusicon" in /Applications/gPodder.app/Contents/Resources/share/gpodder/extensions/gtk_statusicon.py
1726415192.779653 [gpodder.extensions] DEBUG: Found extension "minimize_on_start" in /Applications/gPodder.app/Contents/Resources/share/gpodder/extensions/minimize_on_start.py
1726415192.779761 [gpodder.extensions] DEBUG: Found extension "mpris-listener" in /Applications/gPodder.app/Contents/Resources/share/gpodder/extensions/mpris-listener.py
1726415192.779885 [gpodder.extensions] DEBUG: Found extension "normalize_audio" in /Applications/gPodder.app/Contents/Resources/share/gpodder/extensions/normalize_audio.py
1726415192.779992 [gpodder.extensions] DEBUG: Found extension "notification" in /Applications/gPodder.app/Contents/Resources/share/gpodder/extensions/notification.py
1726415192.780099 [gpodder.extensions] DEBUG: Found extension "notification-win32" in /Applications/gPodder.app/Contents/Resources/share/gpodder/extensions/notification-win32.py
1726415192.780222 [gpodder.extensions] DEBUG: Found extension "podverse" in /Applications/gPodder.app/Contents/Resources/share/gpodder/extensions/podverse.py
1726415192.780330 [gpodder.extensions] DEBUG: Found extension "rename_download" in /Applications/gPodder.app/Contents/Resources/share/gpodder/extensions/rename_download.py
1726415192.780574 [gpodder.extensions] INFO: Module loaded: /Applications/gPodder.app/Contents/Resources/share/gpodder/extensions/rename_download.py
1726415192.780613 [gpodder.extensions] DEBUG: Found extension "rm_ogg_cover" in /Applications/gPodder.app/Contents/Resources/share/gpodder/extensions/rm_ogg_cover.py
1726415192.780722 [gpodder.extensions] DEBUG: Found extension "rockbox_convert2mp4" in /Applications/gPodder.app/Contents/Resources/share/gpodder/extensions/rockbox_convert2mp4.py
1726415192.780835 [gpodder.extensions] DEBUG: Found extension "rockbox_coverart" in /Applications/gPodder.app/Contents/Resources/share/gpodder/extensions/rockbox_coverart.py
1726415192.780940 [gpodder.extensions] DEBUG: Found extension "sonos" in /Applications/gPodder.app/Contents/Resources/share/gpodder/extensions/sonos.py
1726415192.781043 [gpodder.extensions] DEBUG: Found extension "subscription_stats" in /Applications/gPodder.app/Contents/Resources/share/gpodder/extensions/subscription_stats.py
1726415192.781162 [gpodder.extensions] DEBUG: Found extension "tagging" in /Applications/gPodder.app/Contents/Resources/share/gpodder/extensions/tagging.py
1726415192.781275 [gpodder.extensions] DEBUG: Found extension "taskbar_progress" in /Applications/gPodder.app/Contents/Resources/share/gpodder/extensions/taskbar_progress.py
1726415192.781385 [gpodder.extensions] DEBUG: Found extension "ted_subtitles" in /Applications/gPodder.app/Contents/Resources/share/gpodder/extensions/ted_subtitles.py
1726415192.781489 [gpodder.extensions] DEBUG: Found extension "ubuntu_appindicator" in /Applications/gPodder.app/Contents/Resources/share/gpodder/extensions/ubuntu_appindicator.py
1726415192.781595 [gpodder.extensions] DEBUG: Found extension "ubuntu_unity" in /Applications/gPodder.app/Contents/Resources/share/gpodder/extensions/ubuntu_unity.py
1726415192.781697 [gpodder.extensions] DEBUG: Found extension "update_feeds_on_startup" in /Applications/gPodder.app/Contents/Resources/share/gpodder/extensions/update_feeds_on_startup.py
1726415192.781797 [gpodder.extensions] DEBUG: Found extension "video_converter" in /Applications/gPodder.app/Contents/Resources/share/gpodder/extensions/video_converter.py
1726415192.781902 [gpodder.extensions] DEBUG: Found extension "youtube-dl" in /Applications/gPodder.app/Contents/Resources/share/gpodder/extensions/youtube-dl.py
1726415192.944413 [gpodder.extensions] INFO: Module loaded: /Applications/gPodder.app/Contents/Resources/share/gpodder/extensions/youtube-dl.py
1726415192.944746 [youtube-dl] INFO: Registering youtube-dl. (using yt-dlp 2024.08.26.232811)
1726415192.944806 [gpodder.registry] DEBUG: Registering feed_handler resolver: <bound method gPodderYoutubeDL.fetch_channel of <youtube-dl.gPodderYoutubeDL object at 0x11332b410>>
1726415192.944844 [gpodder.registry] DEBUG: Registering custom_downloader resolver: <bound method gPodderYoutubeDL.custom_downloader of <youtube-dl.gPodderYoutubeDL object at 0x11332b410>>
1726415192.945975 [gpodder.registry] DEBUG: Registering feed_handler resolver: <bound method SoundcloudFeed.fetch_channel of <class 'gpodder.plugins.soundcloud.SoundcloudFeed'>>
1726415192.946020 [gpodder.registry] DEBUG: Registering feed_handler resolver: <bound method SoundcloudFeed.fetch_channel of <class 'gpodder.plugins.soundcloud.SoundcloudFavFeed'>>
1726415192.947158 [gpodder.config] DEBUG: config observer returning proxies: None

gPodder 3.11.4 (2023-10-11) - http://gpodder.org/
© 2005-2023 The gPodder Team
License: GNU General Public License, version 3 or later

Entering interactive shell. Type 'help' for help.
Press Ctrl+D (EOF) or type 'quit' to quit.

1726415192.947259 [gpodder.dbsqlite] INFO: Loading podcasts
1726415192.953420 [gpodder.dbsqlite] DEBUG: Database opened.
gpo>

@auouymous
Copy link
Member Author

INFO: Appending alternate PATH: /Users/benjaminblatter/Downloads/ffmpeg/bin

The alternate path is working in your gpo. I thought maybe you had reverted to an older version because you said gpo was not working in #1646 (comment), but it appears to just be a warning and only syncing will have issues.

Could you provide the output after you download one of the mp3 episodes?

And in addition I attach my settings.json file.

I didn't see the settings, did you send them?

@computerfreak105
Copy link

Ah, seems I have some difficulties in getting the file to attach.
so, here is a dropbox link:

https://www.dropbox.com/scl/fi/9m15f2kwm96ycwfvr9t31/Settings.json?rlkey=aiwu6g71cr1uwt1r9ptdlw839&dl=0

And here is an entry of the log file. Thank you.

2024-09-15.log
Settings.json
2024-09-15 19:40:38,394 [gpodder.extensions] ERROR: Error in /Applications/gPodder.app/Contents/Resources/share/gpodder/extensions/audio_converter.py in on_episode_downloaded: [Errno 8] Exec format error: '/Users/ffmpeg2/bin/ffmpeg'
Traceback (most recent call last):
File "/Applications/gPodder.app/Contents/Resources/lib/python3.11/site-packages/gpodder/extensions.py", line 77, in handler
cb_res = callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Applications/gPodder.app/Contents/Resources/share/gpodder/extensions/audio_converter.py", line 59, in on_episode_downloaded
self._convert_episode(episode)
File "/Applications/gPodder.app/Contents/Resources/share/gpodder/extensions/audio_converter.py", line 125, in _convert_episode
ffmpeg = util.Popen(cmd, stdout=subprocess.PIPE,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Applications/gPodder.app/Contents/Resources/lib/python3.11/site-packages/gpodder/util.py", line 2180, in init
super(Popen, self).init(*args, **kwargs) # Python 2 syntax
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Applications/gPodder.app/Contents/Resources/lib/python3.11/subprocess.py", line 1026, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/Applications/gPodder.app/Contents/Resources/lib/python3.11/subprocess.py", line 1955, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: '/Users/ffmpeg2/bin/ffmpeg'

@auouymous
Copy link
Member Author

OSError: [Errno 8] Exec format error: '/Users/ffmpeg2/bin/ffmpeg'

Audio converter is working, however, ffmpeg was built for a different processor. Do you know if /Users/ffmpeg2/bin/ffmpeg is the same file located in /Users/benjaminblatter/Downloads/ffmpeg/bin? You either have another ffmpeg that it found in another path, or they are linked together.

@computerfreak105
Copy link

computerfreak105 commented Sep 16, 2024 via email

@auouymous
Copy link
Member Author

Homebrew has an apple silicon build of ffmpeg. After installing homebrew, you should be able to run brew install ffmpeg, figure out what directory it put the ffmpeg binary in, and use that as the alternate path in gpodder.

@computerfreak105
Copy link

computerfreak105 commented Sep 23, 2024 via email

@auouymous auouymous merged commit 8a369f3 into gpodder:master Sep 30, 2024
@auouymous auouymous deleted the alternate-path-setting branch September 30, 2024 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ffmpeg not found in PATH on Mac

4 participants