Extracting audio broken: unable to obtain file audio codec with ffprobe #326

Closed
opened 2026-02-20 23:01:04 -05:00 by deekerman · 3 comments
Owner

Originally created by @criticalcypress on GitHub (Oct 6, 2012).

I have recently updated to the latest version ('2012.09.27'), and it seems that extracting audio is no longer working. There is a warning saying that ffprobe is not able to obtain the file audio codec.

Command

python youtube-dl.py -f 43 --extract-audio https://www.youtube.com/watch?v=9bZkp7q19f0

or alternatively (to show that it does not seem to be format specific):

python youtube-dl.py -f 5 --extract-audio https://www.youtube.com/watch?v=9bZkp7q19f0

Output

[youtube] Setting language
[youtube] 9bZkp7q19f0: Downloading video webpage
[youtube] 9bZkp7q19f0: Downloading video info webpage
[youtube] 9bZkp7q19f0: Extracting video information
[download] Destination: 9bZkp7q19f0.webm
[download] 100.0% of 26.61M at  318.75k/s ETA 00:00
WARNING: unable to obtain file audio codec with ffprobe

System

Windows 7 64bit
Python 2.7.3
ffprobe version N-42069-g3233ad4

Additional Detail

Running ffprobe manually seems to work fine. Running ffprobe 9bZkp7q19f0.webm -show_streams gives

ffprobe version N-42069-g3233ad4 Copyright (c) 2007-2012 the FFmpeg developers
  built on Jun 30 2012 13:23:54 with gcc 4.7.1
  configuration: --disable-static --enable-shared --enable-gpl --enable-version3
 --disable-w32threads --enable-runtime-cpudetect --enable-avisynth --enable-bzli
b --enable-frei0r --enable-libass --enable-libcelt --enable-libopencore-amrnb --
enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lam
e --enable-libnut --enable-libopenjpeg --enable-librtmp --enable-libschroedinger
 --enable-libspeex --enable-libtheora --enable-libutvideo --enable-libvo-aacenc
--enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --en
able-libxavs --enable-libxvid --enable-zlib
  libavutil      51. 63.100 / 51. 63.100
  libavcodec     54. 31.100 / 54. 31.100
  libavformat    54. 14.100 / 54. 14.100
  libavdevice    54.  0.100 / 54.  0.100
  libavfilter     3.  0.100 /  3.  0.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, matroska,webm, from '9bZkp7q19f0.webm':
  Duration: 00:04:12.26, start: 0.000000, bitrate: 884 kb/s
    Stream #0:0(eng): Video: vp8, yuv420p, 640x360, SAR 1:1 DAR 16:9, 1k fps, 1k
 tbr, 1k tbn, 1k tbc (default)
    Stream #0:1: Audio: vorbis, 44100 Hz, stereo, s16 (default)
[STREAM]
index=0
codec_name=vp8
codec_long_name=On2 VP8
profile=unknown
codec_type=video
codec_time_base=1/1000
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
width=640
height=360
has_b_frames=0
sample_aspect_ratio=N/A
display_aspect_ratio=N/A
pix_fmt=yuv420p
level=-99
timecode=N/A
id=N/A
r_frame_rate=1000/1
avg_frame_rate=1000/1
time_base=1/1000
start_time=0.000000
duration=N/A
bit_rate=N/A
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
TAG:language=eng
[/STREAM]
[STREAM]
index=1
codec_name=vorbis
codec_long_name=Vorbis
profile=unknown
codec_type=audio
codec_time_base=1/44100
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
sample_fmt=s16
sample_rate=44100
channels=2
bits_per_sample=0
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/1000
start_time=0.000000
duration=N/A
bit_rate=N/A
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
[/STREAM]
Originally created by @criticalcypress on GitHub (Oct 6, 2012). I have recently updated to the latest version ('2012.09.27'), and it seems that extracting audio is no longer working. There is a warning saying that `ffprobe` is not able to obtain the file audio codec. # Command ``` python youtube-dl.py -f 43 --extract-audio https://www.youtube.com/watch?v=9bZkp7q19f0 ``` or alternatively (to show that it does not seem to be format specific): ``` python youtube-dl.py -f 5 --extract-audio https://www.youtube.com/watch?v=9bZkp7q19f0 ``` # Output ``` [youtube] Setting language [youtube] 9bZkp7q19f0: Downloading video webpage [youtube] 9bZkp7q19f0: Downloading video info webpage [youtube] 9bZkp7q19f0: Extracting video information [download] Destination: 9bZkp7q19f0.webm [download] 100.0% of 26.61M at 318.75k/s ETA 00:00 WARNING: unable to obtain file audio codec with ffprobe ``` # System ``` Windows 7 64bit Python 2.7.3 ffprobe version N-42069-g3233ad4 ``` # Additional Detail Running ffprobe manually seems to work fine. Running `ffprobe 9bZkp7q19f0.webm -show_streams` gives ``` ffprobe version N-42069-g3233ad4 Copyright (c) 2007-2012 the FFmpeg developers built on Jun 30 2012 13:23:54 with gcc 4.7.1 configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --disable-w32threads --enable-runtime-cpudetect --enable-avisynth --enable-bzli b --enable-frei0r --enable-libass --enable-libcelt --enable-libopencore-amrnb -- enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lam e --enable-libnut --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --en able-libxavs --enable-libxvid --enable-zlib libavutil 51. 63.100 / 51. 63.100 libavcodec 54. 31.100 / 54. 31.100 libavformat 54. 14.100 / 54. 14.100 libavdevice 54. 0.100 / 54. 0.100 libavfilter 3. 0.100 / 3. 0.100 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 15.100 / 0. 15.100 libpostproc 52. 0.100 / 52. 0.100 Input #0, matroska,webm, from '9bZkp7q19f0.webm': Duration: 00:04:12.26, start: 0.000000, bitrate: 884 kb/s Stream #0:0(eng): Video: vp8, yuv420p, 640x360, SAR 1:1 DAR 16:9, 1k fps, 1k tbr, 1k tbn, 1k tbc (default) Stream #0:1: Audio: vorbis, 44100 Hz, stereo, s16 (default) [STREAM] index=0 codec_name=vp8 codec_long_name=On2 VP8 profile=unknown codec_type=video codec_time_base=1/1000 codec_tag_string=[0][0][0][0] codec_tag=0x0000 width=640 height=360 has_b_frames=0 sample_aspect_ratio=N/A display_aspect_ratio=N/A pix_fmt=yuv420p level=-99 timecode=N/A id=N/A r_frame_rate=1000/1 avg_frame_rate=1000/1 time_base=1/1000 start_time=0.000000 duration=N/A bit_rate=N/A nb_frames=N/A nb_read_frames=N/A nb_read_packets=N/A TAG:language=eng [/STREAM] [STREAM] index=1 codec_name=vorbis codec_long_name=Vorbis profile=unknown codec_type=audio codec_time_base=1/44100 codec_tag_string=[0][0][0][0] codec_tag=0x0000 sample_fmt=s16 sample_rate=44100 channels=2 bits_per_sample=0 id=N/A r_frame_rate=0/0 avg_frame_rate=0/0 time_base=1/1000 start_time=0.000000 duration=N/A bit_rate=N/A nb_frames=N/A nb_read_frames=N/A nb_read_packets=N/A [/STREAM] ```
Author
Owner

@PatteSMO commented on GitHub (Oct 8, 2012):

Also experienced this problem at first, and ran some command in cmd to check what the problem was

>>> os.path.isfile("C:/ffmpeg/ffprobe");
False
>>> os.path.isfile("C:/ffmpeg/ffprobe.exe");
True

By these results it is obvious that a .exe extension is required in the queried filename for python to discover the executable. Renaming both ffprobe.exe and ffmpeg.exe to ffprobe and ffmpeg (without extension) is a temporary fix that worked for me.

@PatteSMO commented on GitHub (Oct 8, 2012): Also experienced this problem at first, and ran some command in cmd to check what the problem was ``` >>> os.path.isfile("C:/ffmpeg/ffprobe"); False >>> os.path.isfile("C:/ffmpeg/ffprobe.exe"); True ``` By these results it is obvious that a .exe extension is required in the queried filename for python to discover the executable. Renaming both ffprobe.exe and ffmpeg.exe to ffprobe and ffmpeg (without extension) is a temporary fix that worked for me.
Author
Owner

@FiloSottile commented on GitHub (Oct 8, 2012):

Another #447, will fix. Thanks

@FiloSottile commented on GitHub (Oct 8, 2012): Another #447, will fix. Thanks
Author
Owner

@phihag commented on GitHub (Oct 8, 2012):

Duplicate of #447.

@phihag commented on GitHub (Oct 8, 2012): Duplicate of #447.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl-ytdl-org#326
No description provided.