norkunas / youtube-dl-php

A PHP wrapper for youtube-dl or yt-dlp.
MIT License
456 stars 158 forks source link

How to set ffmpeg path? #238

Closed w2daemon closed 4 months ago

w2daemon commented 4 months ago

Hi! How can I set the path for ffmpeg? I'm getting this error on MacOs Sonoma: ffprobe and ffmpeg not found. Please install or provide the path using --ffmpeg-location. The path for it is /usr/local/bin/ffmpeg. I'm able to set the path for yt-dlp. Same directory BTW. Thanks!

norkunas commented 4 months ago

Hey. You can set ffmpeg location via Options instance, as it's yt-dlp option.

w2daemon commented 4 months ago

Can you provide an example for that? Thank you!

norkunas commented 4 months ago
$yt->download(
    Options::create()
        ->ffmpegLocation(...)
        ->url(...)
);
w2daemon commented 4 months ago

Thank you! I will give it a try.

w2daemon commented 4 months ago

Yeah, it's working! Is there any way to compress the audio file? It is bigger than the webm file. What should I set for audio quality? I tried 1 and 2...but there is no change. 0 should be the best...Anyway, you can mark this issue as solved. Thank you!