Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
youtube-dl --extract-audio --audio-format mp3 https://youtu.be/xxxxxxx
[youtube] by2vxGULG_Y: Downloading webpage
[youtube] by2vxGULG_Y: Downloading video info webpage
[youtube] by2vxGULG_Y: Extracting video information
[download] Destination: xxxxxxx.m4a
[download] 100% of 9.03MiB in 00:36
[ffmpeg] Correcting container in "xxxxxxx.m4a"
[ffmpeg] Destination: xxxxxxx.mp3
ERROR: audio conversion failed: Unknown encoder 'libmp3lame'
When extracting the audio I get this error message saying that libmp3lame is unknown.
I've done everything, from updating lame to updating ffmpeg. I even re-ran ./configure in my ffmpeg build with "--enable-libmp3lame", but, still, I get this error message.
I can convert files to mp3 using the libmp3lame codec in ffmpeg, but for some reason the "--audio-format mp3" command in youtube-dl isn't recognizing it.
Last edited by NathanSharp; 04-03-2016 at 01:47 PM.
Works for me.:-)
[SIZE="1"][CODE]@Xubuntu:~$ youtube-dl --verbose --extract-audio --audio-format mp3 https://www.youtube.com/watch?v=3o_NTPtW8NU
I updated to the 04-06 release of youtube-dl, and I still get the same error message. I also tried the --verbose setting. This is what I get
Code:
youtube-dl --verbose --extract-audio --audio-format mp3 https://www.youtube.com/watch?v=3o_NTPtW8NU
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--verbose', u'--extract-audio', u'--audio-format', u'mp3', u'https://www.youtube.com/watch?v=3o_NTPtW8NU']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.04.06
[debug] Python version 2.7.6 - Linux-3.13.0-37-generic-i686-with-LinuxMint-17.1-rebecca
[debug] exe versions: avconv 11.6, avprobe 11.6, ffmpeg N-77528-gf88546b, ffprobe N-77528-gf88546b
[debug] Proxy map: {}
[youtube] 3o_NTPtW8NU: Downloading webpage
[youtube] 3o_NTPtW8NU: Downloading video info webpage
[youtube] 3o_NTPtW8NU: Extracting video information
[youtube] 3o_NTPtW8NU: Downloading MPD manifest
[debug] Invoking downloader on u'https://r15---sn-a5mekm7l.googlevideo.com/videoplayback?id=de8fcd4cfb56f0d5&itag=141&source=youtube&requiressl=yes&ms=au&mv=m&pl=18&mm=31&mn=sn-a5mekm7l&nh=EAg&ratebypass=yes&mime=audio/mp4&gir=yes&clen=3880622&lmt=1392031480065579&dur=121.695&fexp=9405978,9406175,9408087,9416126,9416891,9419452,9420452,9421503,9422596,9423554,9423663,9426927,9427902,9428247,9428399,9428466,9428857,9431734,9432182,9432422,9432565,9432615,9432684,9433111&mt=1459961155&signature=907E6BED97DC5349EC3B50D33FDD1CA1B0C04F2F.6C1932ABE76D3C4B5DAC752FD6F3C2CC11F1C024&key=dg_yt0&sver=3&upn=2DysV9qLYLw&ip=216.19.54.151&ipbits=0&expire=1459982918&sparams=ip,ipbits,expire,id,itag,source,requiressl,ms,mv,pl,mm,mn,nh,ratebypass,mime,gir,clen,lmt,dur'
[download] THEME FROM ITV SCHOOLS SERIES 'PICTURE BOX' - 'MANECHE' BY JACQUES LASRY-3o_NTPtW8NU.m4a has already been downloaded
[download] 100% of 3.72MiB
[ffmpeg] Correcting container in "THEME FROM ITV SCHOOLS SERIES 'PICTURE BOX' - 'MANECHE' BY JACQUES LASRY-3o_NTPtW8NU.m4a"
[debug] ffmpeg command line: avconv -y -i 'file:THEME FROM ITV SCHOOLS SERIES '"'"'PICTURE BOX'"'"' - '"'"'MANECHE'"'"' BY JACQUES LASRY-3o_NTPtW8NU.m4a' -c copy -f mp4 'file:THEME FROM ITV SCHOOLS SERIES '"'"'PICTURE BOX'"'"' - '"'"'MANECHE'"'"' BY JACQUES LASRY-3o_NTPtW8NU.temp.m4a'
[debug] avconv command line: avprobe -show_streams 'file:THEME FROM ITV SCHOOLS SERIES '"'"'PICTURE BOX'"'"' - '"'"'MANECHE'"'"' BY JACQUES LASRY-3o_NTPtW8NU.m4a'
[ffmpeg] Destination: THEME FROM ITV SCHOOLS SERIES 'PICTURE BOX' - 'MANECHE' BY JACQUES LASRY-3o_NTPtW8NU.mp3
[debug] ffmpeg command line: avconv -y -i 'file:THEME FROM ITV SCHOOLS SERIES '"'"'PICTURE BOX'"'"' - '"'"'MANECHE'"'"' BY JACQUES LASRY-3o_NTPtW8NU.m4a' -vn -acodec libmp3lame -q:a 5 'file:THEME FROM ITV SCHOOLS SERIES '"'"'PICTURE BOX'"'"' - '"'"'MANECHE'"'"' BY JACQUES LASRY-3o_NTPtW8NU.mp3'
ERROR: audio conversion failed: Unknown encoder 'libmp3lame'
Traceback (most recent call last):
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1771, in post_process
files_to_delete, info = pp.run(info)
File "/usr/local/bin/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 293, in run
'audio conversion failed: ' + e.msg)
PostProcessingError
aren't there different choices for mp3 de/encoders with ffmpeg?
read https://ffmpeg.org/
There may be; I don't know .The default encoder chosen by youtube-dl is giving me trouble. Oddly, though, libmp3lame works fine when running it directly from ffmpeg. Youtube-dl still doesn't recognize though.
Maybe there's a way to get youtube-dl to use one of these other mp3 encoders? For now, I'm just running a shell script for ffmpeg that converts all the youtube audio formats to mp3, but I'd still like to get to the bottom of why the "--audio-format mp3" option isn't working in youtube-dl.
It may have something to do with avconv.
Last edited by NathanSharp; 04-06-2016 at 12:05 PM.
what versions of youtube-dl, ffmpeg and libmp3lame are you using?
which distro (version, architecture), and is it updated & upgraded? in other words, did you run "apt-get update && apt-get upgrade" or your distro's equivalent?
and it works when you use avconv directly? can you show us the command you used to test that?
I have the same problem as NathanSharp. --prefer-ffmpeg is a workaround that works for me. Maybe recompiling libav after installing lame will fix the original issue.
Distribution: Linux Mint 18 "Sarah" - Xfce (64-bit)
Posts: 29
Rep:
Quote:
Originally Posted by lopid
... Maybe recompiling libav after installing lame will fix the original issue.
No, if your --verbose log shows that youtube-dl is trying to use avconv instead of FFmpeg
then your avconv needs to be re-compiled with --enable-libmp3lame imho.
No, if your --verbose log shows that youtube-dl is trying to use avconv instead of FFmpeg
then your avconv needs to be re-compiled with --enable-libmp3lame imho.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.