jely2002 / youtube-dl-gui

A cross-platform GUI for youtube-dl made in Electron and node.js
GNU Affero General Public License v3.0
6.67k stars 472 forks source link

ffmpeg not working on MacOS #338

Open ronalith opened 2 years ago

ronalith commented 2 years ago

The provided downloaded ffmpeg binary seems to be downloaded okay in the app.asar.unpacked folder but the permissions of ffmpeg & ffprobe are possibly set wrong, as these files are not set to be executable. It's also unclear if this version of ffmpeg has the ARM Neon patch for Apple Silicon (See osxexperts dot net)

ronalith commented 2 years ago

Also, the yt-dlp binary is not the one labeled as MacOS from yt-dlp releases, unsure what the differences are. Maybe it cuts some dependencies?

proton1k commented 2 years ago

Using this on Mac M1 first and youtube-dl can locate ffmpeg if launched from the terminal while cannot while launched via OVD app. I can't find where might be the configuration to set a flag (provide correct path) to ffmpeg so that after download it does not fail. Any ideas?

ronalith commented 2 years ago

I'm assuming your youtube-dl lives along with ffmpeg somewhere (really I'm a bit unfamiliar with either as I use it mostly on windows). But in the case of youtube-dl-gui, yt-dlp uses an ffmpeg that lives at /Applications/Open Video Downloader.app/Contents/Resources/app.asar.unpacked/binaries

in order to make those executable, in terminal do:

chmod 755 /Applications/Open\ Video\ Downloader.app/Contents/Resources/app.asar.unpacked/binaries/ffmpeg
chmod 755 /Applications/Open\ Video\ Downloader.app/Contents/Resources/app.asar.unpacked/binaries/ffprobe

And if you feel adventurous, download yt-dlp_macos from https://github.com/yt-dlp/yt-dlp rename it to yt-dlp-unixreplace it in the Applications/Open Video Downloader.app/Contents/Resources/app.asar.unpacked/binaries folder and then make it executable as well with: chmod 755 /Applications/Open\ Video\ Downloader.app/Contents/Resources/app.asar.unpacked/binaries/yt-dlp-unix

My guess it's that this executable reduces dependencies or works better on macs but again I haven't looked into it extensively. There's probably better ways to achieve all this.