Yt-dlp: can't extract audio ffmpeg is needed

yt-dlp: can’t extract audio, ffmpeg is needed

This is what happened when I wanted to extract audio using yt-dlp:

yt-dlp -x
[youtube] lmeUrbx2EXA: Downloading webpage
[youtube] lmeUrbx2EXA: Downloading android player API JSON
[info] lmeUrbx2EXA: Downloading 1 format(s): 251
[download] Destination: Dragon Dance - Sonic Lost World [OST] [lmeUrbx2EXA].webm
[download] 100% of 3.76MiB in 00:06
ERROR: Postprocessing: ffprobe and ffmpeg not found. Please install or provide the path using --ffmpeg-location

I don’t have ffmpeg on my system I believe snap should install it automatically. ffmpeg should be put in the manifest of yt-dlp.

This is fixed in the candidate channel. Run this from a terminal to switch until @degville promotes it to stable:

sudo snap refresh --candidate yt-dlp

This is great do you know when it goes to stable? @degville

I’ve just released revision 103 to stable. It was quite a big change (and there’s lots of users), so I didn’t quite have the confidence to move it :slight_smile: . I should have done it before now though. Thanks for reporting this, and thanks @lucyllewy for looking into it.

1 Like

I am observing the same error on current edge, revision 217 (9fddc12ab). Is it possible a regression happened or am I installing it wrong? I am on Ubuntu 22.10. I have the following installed:

$ snap list | grep yt-dlp
yt-dlp                     9fddc12ab             217    latest/edge      morrisong     -
$ snap list | grep ffmpeg
ffmpeg                     n4.4.3-3-gb48951bd29  1345   latest/edge      snapcrafters  -
$ apt list --installed | grep ffmpeg
ffmpeg/kinetic,now 7:5.1.1-1ubuntu1 amd64 [installed]

When I run yt-dlp I get:

$ yt-dlp --format="bestaudio[acodec=opus]" --embed-chapters YOUTUBE-URL
ERROR: Postprocessing: ffmpeg not found. Please install or provide the path using --ffmpeg-location

Providing --ffmpeg-location does not help.

Thank you in advance for your help with this!

@degville Sorry to ping you again for this :frowning:

Hello! No worries about pinging me, and thanks for such a detailed error report. I’ve just tried revisions 212, 217 and 218, and they’re all working for me on a fresh Ubuntu install without FFMPEG being installed at all.

Could you let me know the exact command you’re running with the YT URL, and which distro (via a personal message if you’d prefer)?

I’ve looked into this a little more and I was able to reproduce and fix the problem (I think). The fixed build is in the beta channel:

sudo snap refresh yt-dlp --beta

A couple of new libraries were required, and the manually entered libpulsecommon library location needed updating, so I’ve added them all to LD_LIBRARY_PATH in environment:. You can see the snapcraft changes here:

Thanks again for reporting this.

1 Like