Frage: Ich verwendete youtube-dl Befehlszeilenprogramm auf CentOS zum Extrahieren von Audio aus YouTube-Videos. Der Befehl schlug jedoch mit einer Fehlermeldung wie FEHLER:WARNUNG:Datei-Audio-Codec kann nicht mit ffprobe abgerufen werden fehl .
Hier ist die vollständige Fehlermeldung:
$ ./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
Lösung:
Der Fehler besagt, dass das Dienstprogramm ffprobe nicht finden kann Befehl oder seine abhängige Bibliothek. Falls Sie ffprobe nicht haben installiert, dann müssen Sie ffmpeg installieren und prüfen, ob der Befehl ffprobe ordnungsgemäß funktioniert.
$ ffprobe --version ffprobe: error while loading shared libraries: libmp3lame.so.0: cannot open shared object file: No such file or directory
Wie die obige Ausgabe zeigt, ffprobe kann die gemeinsam genutzte Objektdatei libmp3lame nicht laden . Versuchen Sie, den LD_LIBRARY_PATH wie unten gezeigt einzustellen:
$ export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib:/usr/lib64/:/usr/local/lipob64/:/lib64:$LD_LIBRARY_PATH
Hinweis: Wenn libmp3lame an einem nicht standardmäßigen Ort installiert ist, müssen Sie den entsprechenden Pfad in LD_LIBRARY_PATH festlegen .
Prüfen Sie nun, ob ffprobe Befehl funktioniert ordnungsgemäß.
$ 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
Das ist es!