Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: WARNING: unable to obtain file audio codec with ffprobe #12367

Closed
MasterYushi opened this issue Mar 5, 2017 · 19 comments
Closed

ERROR: WARNING: unable to obtain file audio codec with ffprobe #12367

MasterYushi opened this issue Mar 5, 2017 · 19 comments

Comments

@MasterYushi
Copy link

@MasterYushi MasterYushi commented Mar 5, 2017

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

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Mar 5, 2017

What's the result of this command?

ffprobe -show_streams 'file:Hans Zimmer - Time ft. Satellite Empire (The Machinist Remix)-jwMG9wlhc84.webm'
@MasterYushi
Copy link
Author

@MasterYushi MasterYushi commented Mar 5, 2017

ffprobe version N-82178-g60178e7 Copyright (c) 2007-2016 the FFmpeg developers
  built with gcc 5.4.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 35.100 / 55. 35.100
  libavcodec     57. 65.100 / 57. 65.100
  libavformat    57. 57.100 / 57. 57.100
  libavdevice    57.  2.100 / 57.  2.100
  libavfilter     6. 66.100 /  6. 66.100
  libswscale      4.  3.100 /  4.  3.100
  libswresample   2.  4.100 /  2.  4.100
  libpostproc    54.  2.100 / 54.  2.100
Argument 'Zimmer' provided as input filename, but ''file:Hans' was already specified.
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Mar 5, 2017

Sorry, it should be use double quotes:

ffprobe -show_streams "file:Hans Zimmer - Time ft. Satellite Empire (The Machinist Remix)-jwMG9wlhc84.webm"
@MasterYushi
Copy link
Author

@MasterYushi MasterYushi commented Mar 5, 2017

Says file not found :

ffprobe version N-82178-g60178e7 Copyright (c) 2007-2016 the FFmpeg developers
  built with gcc 5.4.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 35.100 / 55. 35.100
  libavcodec     57. 65.100 / 57. 65.100
  libavformat    57. 57.100 / 57. 57.100
  libavdevice    57.  2.100 / 57.  2.100
  libavfilter     6. 66.100 /  6. 66.100
  libswscale      4.  3.100 /  4.  3.100
  libswresample   2.  4.100 /  2.  4.100
  libpostproc    54.  2.100 / 54.  2.100
file:Hans Zimmer - Time ft. Satellite Empire (The Machinist Remix)-jwMG9wlhc84.webm: No such file or directory
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Mar 5, 2017

[download] Hans Zimmer - Time ft. Satellite Empire (The Machinist Remix)-jwMG9wlhc84.webm has already been downloaded

Did you run the ffprobe command in the same directory as Hans Zimmer - Time ft. Satellite Empire (The Machinist Remix)-jwMG9wlhc84.webm?

@MasterYushi
Copy link
Author

@MasterYushi MasterYushi commented Mar 5, 2017

I don't see that file in my download folder where all the extracted m4a files by youtube-dl are, does it go somewhere else by default?

Update : Found it

ffprobe version N-82178-g60178e7 Copyright (c) 2007-2016 the FFmpeg developers
  built with gcc 5.4.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 35.100 / 55. 35.100
  libavcodec     57. 65.100 / 57. 65.100
  libavformat    57. 57.100 / 57. 57.100
  libavdevice    57.  2.100 / 57.  2.100
  libavfilter     6. 66.100 /  6. 66.100
  libswscale      4.  3.100 /  4.  3.100
  libswresample   2.  4.100 /  2.  4.100
  libpostproc    54.  2.100 / 54.  2.100
Input #0, matroska,webm, from 'file:Hans Zimmer - Time ft. Satellite Empire (The Machinist Remix)-jwMG9wlhc84.webm':
  Metadata:
    encoder         : google
  Duration: 00:04:53.46, start: -0.007000, bitrate: 137 kb/s
    Stream #0:0(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
[STREAM]
index=0
codec_name=opus
codec_long_name=Opus (Opus Interactive Audio Codec)
profile=unknown
codec_type=audio
codec_time_base=1/48000
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
sample_fmt=fltp
sample_rate=48000
channels=2
channel_layout=stereo
bits_per_sample=0
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/1000
start_pts=-7
start_time=-0.007000
duration_ts=N/A
duration=N/A
bit_rate=N/A
max_bit_rate=N/A
bits_per_raw_sample=N/A
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
TAG:language=eng
[/STREAM]

Update 2 : Just updated to version 2017.03.05, still facing the same issue.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Mar 5, 2017

That looks good. Where did you find this file? A guess is that this is related to #11254

UPDATE: This turns out to be a different bug than #11254

@MasterYushi
Copy link
Author

@MasterYushi MasterYushi commented Mar 5, 2017

I found this in "C:\Windows\syswow64"

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Mar 5, 2017

Let me guess. Did you run youtube-dl.exe from C:\Windows\System32 and you're using 64-bit ffmpeg?

@MasterYushi
Copy link
Author

@MasterYushi MasterYushi commented Mar 5, 2017

There is no youtube-dl.exe in C:\Windows\System32 and yes, I am using 64-bit ffmpeg. I have all the ffmpeg .exe files and youtube-dl.exe in a custom folder that is included in PATH

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Mar 5, 2017

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

@yan12125 yan12125 closed this Mar 5, 2017
@MasterYushi
Copy link
Author

@MasterYushi MasterYushi commented Mar 5, 2017

Thanks for your help, actually I always open cmd as administrator so it opens in C:\Windows\System32
Changing the directory worked.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Mar 5, 2017

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.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Aug 17, 2017

@bbb31: 137 is a video-only format, so audio extraction won't work.

137          mp4        1440x1080  DASH video 1128k , avc1.640028, 30fps, video only, 19.55MiB
@webdude21
Copy link

@webdude21 webdude21 commented Apr 5, 2019

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

@lasernite
Copy link

@lasernite lasernite commented Apr 18, 2019

Also getting the error with youtube-dl --extract-audio --audio-format wav --prefer-ffmpeg -o "%(title)s.%(ext)s" --postprocessor-args "-ar 16000 -sample_fmt s16 -ac 1" youtube_link on macOS 10.14.4

@lasernite
Copy link

@lasernite lasernite commented Apr 18, 2019

I think ffmpeg was broken—running it with avconv like youtube-dl --extract-audio --audio-format wav --prefer-avconv -o "%(title)s.%(ext)s" --postprocessor-args "-ar 16000 -sample_fmt s16 -ac 1" youtube_link worked

@stasbar
Copy link

@stasbar stasbar commented Aug 27, 2019

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)
@oznogon
Copy link

@oznogon oznogon commented Apr 27, 2020

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 platformio/platform-lattice_ice40#7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.