youtube-dl: ERROR: WARNING: unable to obtain file audio codec with ffprobe

Command that I ran : youtube-dl --extract-audio --audio-format m4a https://www.youtube.com/watch?v=jwMG9wlhc84 --verbose

Output :

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--extract-audio', '--audio-format', 'm4a', 'https://www.youtube.com/watch?v=jwMG9wlhc84', '--verbose']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2017.03.02
[debug] Python version 3.4.4 - Windows-10-10.0.10586
[debug] exe versions: ffmpeg N-82178-g60178e7, ffprobe N-82178-g60178e7
[debug] Proxy map: {}
[youtube] jwMG9wlhc84: Downloading webpage
[youtube] jwMG9wlhc84: Downloading video info webpage
[youtube] jwMG9wlhc84: Extracting video information
[youtube] {22} signature length 40.40, html5 player en_US-vflDQGgxm
[youtube] {43} signature length 40.40, html5 player en_US-vflDQGgxm
[youtube] {18} signature length 40.40, html5 player en_US-vflDQGgxm
[youtube] {36} signature length 40.40, html5 player en_US-vflDQGgxm
[youtube] {17} signature length 40.40, html5 player en_US-vflDQGgxm
[youtube] {136} signature length 40.40, html5 player en_US-vflDQGgxm
[youtube] {247} signature length 40.40, html5 player en_US-vflDQGgxm
[youtube] {135} signature length 40.40, html5 player en_US-vflDQGgxm
[youtube] {244} signature length 40.40, html5 player en_US-vflDQGgxm
[youtube] {134} signature length 40.40, html5 player en_US-vflDQGgxm
[youtube] {243} signature length 40.38, html5 player en_US-vflDQGgxm
[youtube] jwMG9wlhc84: Downloading player https://www.youtube.com/yts/jsbin/player-en_US-vflDQGgxm/base.js
[youtube] {133} signature length 40.40, html5 player en_US-vflDQGgxm
[youtube] {242} signature length 40.40, html5 player en_US-vflDQGgxm
[youtube] {160} signature length 40.40, html5 player en_US-vflDQGgxm
[youtube] {278} signature length 40.40, html5 player en_US-vflDQGgxm
[youtube] {140} signature length 40.40, html5 player en_US-vflDQGgxm
[youtube] {171} signature length 40.40, html5 player en_US-vflDQGgxm
[youtube] {249} signature length 40.40, html5 player en_US-vflDQGgxm
[youtube] {250} signature length 40.40, html5 player en_US-vflDQGgxm
[youtube] {251} signature length 40.40, html5 player en_US-vflDQGgxm
[debug] Invoking downloader on 'https://r6---sn-gwpa-a3v6.googlevideo.com/videoplayback?beids=%5B9452306%5D&initcwndbps=227500&mime=audio%2Fwebm&upn=_UbEyK8re00&keepalive=yes&requiressl=yes&ipbits=0&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cupn%2Cexpire&ms=au&mt=1488727945&mv=m&source=youtube&lmt=1449598508278953&key=yt6&ip=2405%3A204%3Aa580%3A1ff9%3A84f4%3A162f%3Ac45b%3A1a72&dur=293.461&id=o-AALHyg3tjhhxht1mOOfvErTV0Ve1OuikrcRJY5hvT7Vm&mn=sn-gwpa-a3v6&mm=31&gir=yes&itag=251&clen=5060136&ei=6C-8WKSMMpaqoAP4xqDIBA&expire=1488749641&pl=36&signature=B9AB3FC232E28E947FED0A2AD49D596D6776AF7C.159C4CE5B6921CD6A9A5B8D77C895759D39BB7AF&ratebypass=yes'
[download] Hans Zimmer - Time ft. Satellite Empire (The Machinist Remix)-jwMG9wlhc84.webm has already been downloaded
[download] 100% of 4.83MiB
[debug] ffmpeg command line: ffprobe -show_streams 'file:Hans Zimmer - Time ft. Satellite Empire (The Machinist Remix)-jwMG9wlhc84.webm'
ERROR: WARNING: unable to obtain file audio codec with ffprobe
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpbcda0ng_\build\youtube_dl\YoutubeDL.py", line 1929, in post_process
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpbcda0ng_\build\youtube_dl\postprocessor\ffmpeg.py", line 231, in run
youtube_dl.utils.PostProcessingError: WARNING: unable to obtain file audio codec with ffprobe

I have ffprobe.exe in Windows PATH

screenshot 1

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 21

Most upvoted comments

Solved by brew upgrade ffmpeg

~ » youtube-dl --extract-audio --audio-format mp3 "https://youtu.be/xxx"                                                                                                            stasbar@stasbar
[youtube] eT3at25Kits: Downloading webpage
[youtube] eT3at25Kits: Downloading video info webpage
[download] Destination: xxx.webm
[download] 100% of 2.32MiB in 00:00
ERROR: WARNING: unable to obtain file audio codec with ffprobe
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
~ » ffmpeg -v                                                                                                                                                                          stasbar@stasbar
dyld: Library not loaded: /usr/local/opt/x265/lib/libx265.165.dylib
  Referenced from: /usr/local/bin/ffmpeg
  Reason: image not found
[1]    31817 abort      ffmpeg -v
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
~ » brew upgrade ffmpeg
...
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
~ » youtube-dl --extract-audio --audio-format mp3 "https://youtu.be/xxx"                                                                                                            stasbar@stasbar
[youtube] eT3at25Kits: Downloading webpage
[youtube] eT3at25Kits: Downloading video info webpage
[download] xxx.webm has already been downloaded
[download] 100% of 2.32MiB
[ffmpeg] Destination: xxx.mp3
Deleting original file Mr. xxx.webm (pass -k to keep)

I may be inaccurate. I mean something like this: (assume youtube-dl.exe is in PATH)

C:\Windows\System32>youtube-dl.exe ...

The reason for this error is that Windows changes the working directory for 32-bit applications (youtube-dl.exe in this case) under the hood. [1] It’s difficult to fix it, so the suggestion is: don’t run youtube-dl.exe in C:\Windows\System32.

[1] https://msdn.microsoft.com/en-us/library/aa384187(VS.85).aspx

I also had this issue.

First I did: brew upgrade youtube-dl for a different issue

the update went through but then I got this error

the fix for me was to try brew upgrade ffmpeg

but it didn’t want to do that because it was pinned. So I did brew unpin ffmpeg

and then brew upgrade ffmpeg

and that fixed my issues

I don’t know if unpinning it is a problem or not, but it works now

For me (Ubuntu 18 and now 20) the solution to this problem is to operate in the home directory (/home/username/). If I use another one, I get the error.

Encountered this symptom with up-to-date ffmpeg and youtube-dl. A recent update to libffi renamed a required library:

ffprobe -show_streams xxx.webm
dyld: Library not loaded: /usr/local/opt/libffi/lib/libffi.6.dylib
  Referenced from: /usr/local/opt/p11-kit/lib/libp11-kit.0.dylib
  Reason: image not found
Abort trap: 6

The libffi dylib is now located at /usr/local/opt/libffi/lib/libffi.7.dylib.

Workarounds include downgrading libffi or linking/copying the new library location to the old path. See https://github.com/platformio/platform-lattice_ice40/issues/7

I’m getting the same using: youtube-dl --extract-audio --audio-format mp3 https://youtu.be/r0TG60cjq3g

By the way, it’s usually a bad idea to run youtube-dl.exe as Administrator. It handles data from the Internet. If there’s a bug in youtube-dl or Python, your device can be hacked. A previous example can be found in #8227.