Domanda: Io stava usando youtube-dl utilità della riga di comando su CentOS per estrarre un audio da YouTube Video. Tuttavia, il comando non è riuscito con un messaggio di errore come ERRORE:ATTENZIONE:impossibile ottenere il codec audio del file con ffprobe .
Ecco il messaggio di errore completo:
$ ./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
Soluzione:
L'errore dice che l'utilità non è in grado di trovare ffprobe comando o la sua libreria dipendente. Nel caso, se non hai ffprobe installato, è necessario installare ffmpeg e verificare se il comando ffprobe funziona correttamente.
$ ffprobe --version ffprobe: error while loading shared libraries: libmp3lame.so.0: cannot open shared object file: No such file or directory
Come mostra l'output sopra, ffprobe non è in grado di caricare il file oggetto condiviso libmp3lame . Prova a impostare LD_LIBRARY_PATH come mostrato di seguito:
$ export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib:/usr/lib64/:/usr/local/lipob64/:/lib64:$LD_LIBRARY_PATH
Nota: Se libmp3lame è installato in una posizione non standard, quindi è necessario impostare il percorso corrispondente in LD_LIBRARY_PATH .
Ora controlla se ffprobe il comando funziona correttamente.
$ 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
Questo è tutto!