Pertanyaan: Saya menggunakan youtube-dl utilitas baris perintah pada CentOS untuk mengekstrak audio dari Video YouTube. Namun, perintah tersebut gagal dengan pesan kesalahan sebagai ERROR:WARNING:tidak dapat memperoleh codec audio file dengan ffprobe .
Berikut pesan kesalahan lengkapnya:
$ ./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
Solusi:
Kesalahan mengatakan bahwa utilitas tidak dapat menemukan ffprobe perintah atau perpustakaan dependennya. Jika Anda tidak memiliki ffprobe diinstal, maka Anda perlu menginstal ffmpeg dan memeriksa apakah perintah ffprobe berfungsi dengan benar.
$ ffprobe --version ffprobe: error while loading shared libraries: libmp3lame.so.0: cannot open shared object file: No such file or directory
Seperti yang ditunjukkan oleh output di atas, ffprobe tidak dapat memuat file objek bersama libmp3lame . Coba atur LD_LIBRARY_PATH seperti yang ditunjukkan di bawah ini:
$ export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib:/usr/lib64/:/usr/local/lipob64/:/lib64:$LD_LIBRARY_PATH
Catatan: Jika libmp3lame diinstal di lokasi non-standar, maka Anda perlu menyetel jalur yang sesuai di LD_LIBRARY_PATH .
Sekarang periksa apakah ffprobe perintah bekerja dengan benar.
$ 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
Itu dia!