How to Fix ‘ERROR: WARNING: unable to obtain file audio codec with ffprobe’? [Solved]

Question: I was using youtube-dl command-line utility on CentOS to extract an audio from YouTube Video. However, the command failed with an error message as ERROR: WARNING: unable to obtain file audio codec with ffprobe.

Here’s the complete error message:

$ ./youtube-dl -x --audio-format mp3 https://www.youtube.com/watch?v=EhhiY11Z9-U
[youtube] EhhiY11Z9-U: Downloading webpage
[youtube] EhhiY11Z9-U: Downloading video info webpage
[youtube] EhhiY11Z9-U: Extracting video information
[download] I - Ennodu Nee Irundhaal Video _ A.R. Rahman _ Vikram _ Shankar-EhhiY11Z9-U.webm has already been downloaded
[download] 100% of 5.52MiB
ERROR: WARNING: unable to obtain file audio codec with ffprobe

install ffprobe linux

Solution:

The error says that the utility is not able to find ffprobe command or its dependent library. In case, if you don’t have ffprobe installed, then you need to install ffmpeg and check if ffprobe command is working properly.

$ ffprobe --version
ffprobe: error while loading shared libraries: libmp3lame.so.0: cannot open shared object file: No such file or directory

As the above output shows, ffprobe is not able to load shared object file libmp3lame. Try setting the LD_LIBRARY_PATH as shown below:

$ export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib:/usr/lib64/:/usr/local/lipob64/:/lib64:$LD_LIBRARY_PATH

Note: If libmp3lame is installed in a non-standard location, then you need to set corresponding path in LD_LIBRARY_PATH.

Now check if ffprobe command is working properly.

$ ffprobe -version
ffprobe version N-78637-g7586b3a Copyright (c) 2007-2016 the FFmpeg developers
built with gcc 4.1.2 (GCC) 20080704 (Red Hat 4.1.2-55)
configuration: --enable-libmp3lame --enable-libvorbis
libavutil 55. 18.100 / 55. 18.100
libavcodec 57. 24.105 / 57. 24.105
libavformat 57. 26.100 / 57. 26.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 35.100 / 6. 35.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101

That’s it!

Updated on September 2, 2017

Was this article helpful?

Related Articles

Comments

Leave a Comment