LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 01-26-2017, 03:41 PM   #1
maschelsea
Member
 
Registered: Dec 2016
Distribution: Slackware 64bit 14.2
Posts: 418

Rep: Reputation: Disabled
ffmpeg: Unknown encoder 'libmp3lame'


I am a student in my local college's choir. Our director sends us emails containing our vocal parts from her cell phone. I convert these files to mp3 and then play them through mpg123 or some other program. The file I get in my email is always called winmail.dat. I run tnef on this file and get a m4a. I then run another script on the m4a to get an mp3. I recently converted to Slackware. I'm used to this "just working", so I'm a bit lost. ffmpeg reports that it can't convert my file because of Unknown encoder 'libmp3lame'. Here's the full output:
Code:
michael@caitlyn ~ $ ffmpeg -i Ave\ Maria-bass.m4a -acodec libmp3lame -ab 128k Ave\ Maria.mp3
ffmpeg version 2.8.7 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.4.0 (GCC)
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --docdir=/usr/doc/ffmpeg-2.8.7/html --mandir=/usr/man --disable-debug --enable-shared --disable-static --enable-pthreads --enable-libtheora --enable-libvorbis --enable-gpl --enable-version3 --enable-postproc --enable-swscale --enable-x11grab --enable-avfilter --enable-avresample --enable-gnutls --enable-libcdio --enable-libssh --enable-libcaca --enable-libsmbclient --enable-opengl --enable-libvpx --enable-libpulse --enable-libopenjpeg --enable-libwavpack --enable-libfreetype --enable-libfribidi --enable-fontconfig --arch=x86_64
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Ave Maria-bass.m4a':
  Metadata:
    major_brand     : M4A 
    minor_version   : 0
    compatible_brands: M4A mp42isom
    creation_time   : 2017-01-26 20:06:17
    iTunSMPB        :  00000000 00000840 000003EA 000000000036C3D6 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    encoder         : com.apple.VoiceMemos (iOS 10.2)
  Duration: 00:01:21.38, start: 0.000000, bitrate: 64 kb/s
    Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 62 kb/s (default)
    Metadata:
      creation_time   : 2017-01-26 20:06:17
      handler_name    : Core Media Audio
Unknown encoder 'libmp3lame'
Thank you to anyone who can assist me in diagnosing and/or solving this issue. I have researched on google. I have reinstalled ffmpeg, and lame from slackbuilds.org. It still doesn't work. I even installed winff, but it reported the same issue. I prefer to work from my terminal, but I will consider GUI programs if they'll give me what I need.

Last edited by maschelsea; 01-26-2017 at 04:47 PM.
 
Old 01-26-2017, 06:09 PM   #2
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 maschelsea View Post
...ffmpeg reports that it can't convert my file because of Unknown encoder 'libmp3lame'...
Hi
Look at the configuration of your FFmpeg...
Code:
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --docdir=/usr/doc/ffmpeg-2.8.7/html --mandir=/usr/man --disable-debug --enable-shared --disable-static --enable-pthreads --enable-libtheora --enable-libvorbis --enable-gpl --enable-version3 --enable-postproc --enable-swscale --enable-x11grab --enable-avfilter --enable-avresample --enable-gnutls --enable-libcdio --enable-libssh --enable-libcaca --enable-libsmbclient --enable-opengl --enable-libvpx --enable-libpulse --enable-libopenjpeg --enable-libwavpack --enable-libfreetype --enable-libfribidi --enable-fontconfig --arch=x86_64
It reports "Unknown encoder libmp3lame" because it has been built without "--enable-libmp3lame" in its configuration.

There are Linux static builds of FFmpeg available to use until you get around to rebuilding your FFmpeg with libmp3lame enabled.
Here ---> https://www.johnvansickle.com/ffmpeg/

See, the static build has libmp3lame enabled...
Code:
~ $ ./ffmpeg
ffmpeg version 3.2.2-static http://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.4.1 (Debian 5.4.1-4) 20161202
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-5 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg

Last edited by bat999; 01-26-2017 at 06:16 PM.
 
Old 01-26-2017, 08:29 PM   #3
maschelsea
Member
 
Registered: Dec 2016
Distribution: Slackware 64bit 14.2
Posts: 418

Original Poster
Rep: Reputation: Disabled
OK. I clicked your link and grabbed ffmpeg-git-64bit-static.tar.xz, but now how do I install it the Slackware way, which usually includes running installpkg on a *.tgz file? I've got:

GPLv3.txt ffmpeg* ffmpeg-10bit* ffprobe* ffserver* manpages/ qt-faststart* readme.txt

I looked at readme.txt, but it didn't tell me anything useful. Do I just mv these files over to /opt/bin and call it done? Is there something else I should be doing with them?
 
Old 01-27-2017, 12:43 AM   #4
Brains
Senior Member
 
Registered: Apr 2009
Distribution: Debian Testing, Gentoo
Posts: 1,293

Rep: Reputation: 352Reputation: 352Reputation: 352Reputation: 352
In the first paragraph on that web page is written: Just unpack and run ./ffmpeg
After unpacking it, change directory into the folder and run the command.
 
Old 01-27-2017, 11:10 AM   #5
maschelsea
Member
 
Registered: Dec 2016
Distribution: Slackware 64bit 14.2
Posts: 418

Original Poster
Rep: Reputation: Disabled
I did that before my last post. I assumed that there would be some semi-complicated process I would have to launch in order to install it. I guess I'm just moving these files to /opt/bin and let them live there.
 
Old 01-27-2017, 01:31 PM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 17,237
Blog Entries: 10

Rep: Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160
let's take a step back:
1) why do you think you need to transcode that .m4a? can't you just play it natively?
2) if you really have to, does it have to be mp3? couldn't it be also, for example, .ogg (it's a better codec anyway)?
 
Old 01-27-2017, 08:30 PM   #7
maschelsea
Member
 
Registered: Dec 2016
Distribution: Slackware 64bit 14.2
Posts: 418

Original Poster
Rep: Reputation: Disabled
How does one play a *.m4a on Linux, especially from a terminal? Most of my machines are older legacy-type systems, so I don't use a lot of GUI programs when I don't have to.
 
Old 01-28-2017, 03:51 AM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 17,237
Blog Entries: 10

Rep: Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160
use ogg then.
 
Old 01-28-2017, 04:39 AM   #9
Brains
Senior Member
 
Registered: Apr 2009
Distribution: Debian Testing, Gentoo
Posts: 1,293

Rep: Reputation: 352Reputation: 352Reputation: 352Reputation: 352
I understand.
For years, when I would download audio files encoded FLAC or other uncompressed formats, I would convert them to CD quality 128 kbs mp3 solely for the sake of file size and the fact that rumor had it most people cannot distinguish the difference in quality of sound between the compressed mp3 and uncompressed formats.
Last winter I had time on my hands and converted a couple hundred vinyl albums to digital, after editing out clicks and pops on the original 32bit float .wav recordings and listening to them, comparing them to mp3 versions of the same tracks I already had, I decided not to convert the .wav to mp3 since storage space is cheap nowadays, the quality of sound blows away mp3 versions recorded off CDs.
VLC will play m4a from command line.
 
Old 01-28-2017, 05:10 AM   #10
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 17,237
Blog Entries: 10

Rep: Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160
iirc m4a is an apple codec and therefore not free and therefore not available on all linux systems.
the same goes for mp3.
that's why i suggested transcoding to .ogg instead - it's free and is most probably already installed and plays on virtually every linux system, incl. android.

however, VLC is usually a good solution for this kind of problem.
 
Old 01-28-2017, 05:27 PM   #11
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873
opus is a more modern audio codec that doesn't suck. Not that it matters much coming from an mp3 source. You're probably better off going aac with most video type things. With faad being the decoder and faac being the encoder. You might just not have libmp3lame installed, or the -dev variant if you built ffmpeg from sources. You might check slackbuilds.org for mp3lame to see if it's available going that route. Not seeing it there myself, so either it's part of slackware, or unavailable, except from official project source code.
 
Old 01-29-2017, 07:19 AM   #12
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 17,237
Blog Entries: 10

Rep: Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160
Shadow_7, i think now you're just confusing OP.

- nobody said that m4a sucks; i can only assume that it is not playable natively on a standard slackware install, hence the need to transcode.
- all this has nothing to do with video, and if any transcoding is necessary i think ffmpeg is a sane choice.

on a sidenote, i read today that mp3 is not licensed anymore (not sure if it's open source, but it is now free).

but i'll say it again, .ogg audio is a widely supported format, it's free in every sense, most linuxes support it ootb, and it's actually much better than mp3. just saying.
 
Old 01-29-2017, 08:04 PM   #13
Gary987
Member
 
Registered: Oct 2003
Distribution: Gentoo, Mint, Ubuntu, Vector
Posts: 174

Rep: Reputation: 17
mplayer, mpv play m4a from the command line

did you try using ffplay? (Since you have ffmpeg installed)
 
Old 01-30-2017, 02:36 AM   #14
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 17,237
Blog Entries: 10

Rep: Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160
Quote:
Originally Posted by Gary987 View Post
did you try using ffplay? (Since you have ffmpeg installed)
good point.
it should be able to play the m4a directly.

i wonder if maschelsea will ever tell us how it went?
 
  


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
LXer: FFmpeg & Libav Add H.265 Encoder Via x265 LXer Syndicated Linux News 0 02-13-2014 09:51 PM
ffmpeg x11grab unknown format /y0shi Slackware 10 09-30-2009 04:16 PM
dvd-slideshow gives problem with ffmpeg encoder nkd Linux - Software 4 11-09-2008 09:47 PM
ffmpeg install used ./configure no libmp3lame support flebber Linux - Software 2 03-02-2008 04:50 AM
decoder and encoder with ffmpeg (libavcodec) sangijuela Programming 1 08-20-2005 07:53 AM

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

All times are GMT -5. The time now is 03:53 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