LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 04-03-2016, 02:44 PM   #1
NathanSharp
LQ Newbie
 
Registered: Apr 2016
Posts: 6

Rep: Reputation: Disabled
libmp3lame error message on youtube-dl


Quote:
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 02:47 PM.
 
Old 04-04-2016, 08:12 AM   #2
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 3,716
Blog Entries: 3

Rep: Reputation: 482Reputation: 482Reputation: 482Reputation: 482Reputation: 482
Here watch the video it is very simple. https://www.youtube.com/watch?v=moZ4qoFIeUE
or add this to your firfox https://addons.mozilla.org/en-US/fir...o-dow/?src=api
have fun
 
Old 04-04-2016, 01:37 PM   #3
bat999
LQ Newbie
 
Registered: Sep 2013
Location: UK
Distribution: Linux Mint 18 "Sarah" - Xfce (64-bit)
Posts: 29

Rep: Reputation: Disabled
.....

Last edited by bat999; 04-11-2016 at 05:55 PM.
 
Old 04-04-2016, 03:57 PM   #4
NathanSharp
LQ Newbie
 
Registered: Apr 2016
Posts: 6

Original Poster
Rep: Reputation: Disabled
here's my output

Code:
home@home-Inspiron-530 ~ $ youtube-dl --version
2016.03.27
home@home-Inspiron-530 ~ $
Code:
home@home-Inspiron-530 ~ $ ffmpeg -codecs | grep libmp3lame
ffmpeg version N-77528-gf88546b Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)
  configuration: --prefix=/home/home/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/home/ffmpeg_build/include --extra-ldflags=-L/home/home/ffmpeg_build/lib --bindir=/home/home/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
  libavutil      55. 11.100 / 55. 11.100
  libavcodec     57. 20.100 / 57. 20.100
  libavformat    57. 21.100 / 57. 21.100
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6. 22.100 /  6. 22.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
 DEA.L. mp3                  MP3 (MPEG audio layer 3) (decoders: mp3 mp3float ) (encoders: libmp3lame )
home@home-Inspiron-530 ~ $
here it is. I'll try to get the April 1 version.

Last edited by NathanSharp; 04-04-2016 at 04:02 PM.
 
Old 04-04-2016, 04:16 PM   #5
bat999
LQ Newbie
 
Registered: Sep 2013
Location: UK
Distribution: Linux Mint 18 "Sarah" - Xfce (64-bit)
Posts: 29

Rep: Reputation: Disabled
....

Last edited by bat999; 04-11-2016 at 05:56 PM.
 
Old 04-05-2016, 03:37 AM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 18,388
Blog Entries: 12

Rep: Reputation: 5618Reputation: 5618Reputation: 5618Reputation: 5618Reputation: 5618Reputation: 5618Reputation: 5618Reputation: 5618Reputation: 5618Reputation: 5618Reputation: 5618
aren't there different choices for mp3 de/encoders with ffmpeg?
read https://ffmpeg.org/
 
Old 04-06-2016, 12:51 PM   #7
NathanSharp
LQ Newbie
 
Registered: Apr 2016
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bat999 View Post
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
 
Old 04-06-2016, 12:59 PM   #8
NathanSharp
LQ Newbie
 
Registered: Apr 2016
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
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 01:05 PM.
 
Old 04-06-2016, 01:23 PM   #9
bat999
LQ Newbie
 
Registered: Sep 2013
Location: UK
Distribution: Linux Mint 18 "Sarah" - Xfce (64-bit)
Posts: 29

Rep: Reputation: Disabled
....

Last edited by bat999; 04-11-2016 at 05:57 PM.
 
Old 04-06-2016, 03:48 PM   #10
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 18,388
Blog Entries: 12

Rep: Reputation: 5618Reputation: 5618Reputation: 5618Reputation: 5618Reputation: 5618Reputation: 5618Reputation: 5618Reputation: 5618Reputation: 5618Reputation: 5618Reputation: 5618
weird.
can't reproduce (on archlinux).

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?

btw:
https://blog.sleeplessbeastie.eu/201...er-libmp3lame/
https://github.com/rg3/youtube-dl/issues/302

Last edited by ondoho; 04-06-2016 at 03:53 PM.
 
Old 05-10-2016, 11:30 PM   #11
andrew.46
Senior Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 1,273

Rep: Reputation: 448Reputation: 448Reputation: 448Reputation: 448Reputation: 448
Your copy of youtube-dl seems to be using avconv which probably is not fitted out for mp3 encoding:

Code:
[debug] ffmpeg command line: avconv -y -i 'fil[...]
Perhaps your best option is to use these two options:

Code:
--prefer-ffmpeg
--ffmpeg-location <path to FFmpeg executable>
Hopefully this will be enough....
 
Old 07-20-2016, 02:48 PM   #12
lopid
Member
 
Registered: Jun 2008
Posts: 155

Rep: Reputation: Disabled
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.
 
Old 07-20-2016, 04:55 PM   #13
bat999
LQ Newbie
 
Registered: Sep 2013
Location: UK
Distribution: Linux Mint 18 "Sarah" - Xfce (64-bit)
Posts: 29

Rep: Reputation: Disabled
Quote:
Originally Posted by lopid View Post
... 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.
 
Old 07-20-2016, 05:12 PM   #14
lopid
Member
 
Registered: Jun 2008
Posts: 155

Rep: Reputation: Disabled
Quote:
Originally Posted by bat999 View Post
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.
That is what I was implying.

Last edited by lopid; 07-20-2016 at 05:17 PM.
 
Old 07-21-2016, 07:15 AM   #15
sandra142
LQ Newbie
 
Registered: Jul 2016
Posts: 1

Rep: Reputation: Disabled
thanx all of you for sharing such useful suggestions.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Server Hung with error message: ERROR: Message hist queue is filling up iprince Linux - Enterprise 7 02-10-2014 10:40 AM
Converting m4b to mp3, error with libmp3lame aphesia Linux - Software 1 01-14-2011 09:57 AM
MPlayer error libmp3lame.so.0 dina3e Linux - Software 4 07-17-2008 11:19 PM
Strange Repeating Error message in /var/log/message lucktsm Linux - Security 2 10-27-2006 09:29 AM
MPlayer Installation->libmp3lame.so.0 error kerryblue19 Linux - Software 11 03-17-2005 08:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration