Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
The problem is the output audio stream; no codec was specified. If you want to copy the input audio, you can use '-acodec copy' or if you want mp3 audio you can specify '-acodec libmp3lame -ac 2 -ar 22050' for example.
Why don't you start by trying to actually read the error messages and interpret what they mean?
Code:
Unknown encoder 'libmp3lame'
You apparently either don't have libmp3lame installed, or it's otherwise unlocatable, so ffmpeg can't use it.
Do you see the line at the top with all the "--enable" options? It tells you what external libraries and certain other features your version of ffmpeg has been compiled to use. Since I don't see "--enable-libmp3lame" listed, it appears you are using a version that doesn't support it. This isn't surprising. Since mp3 is a patent-encumbered codec, many Free distributions can't legally compile it into in their packages. So you'll have to find a version from a separate source that does have it enabled, or else compile your own version.
Another option is to simply use a codec that is enabled instead. mp2 is commonly available and supported by most media formats, for example. ffmpeg also has a built-in mp3 encoder of its own that might possibly be enabled (although lame is generally much better). Run "ffmpeg -codecs" for a full list of what's available to your version.
Since this is a common problem, a google search or two should turn up a source for you. Someone here might also be able to tell you if you tell us what distribution you're using.
You will want to specify the "q" range to use or the bitrate you want. The default (200k) in your example is to low for reasonable quality. Using "-sameq" is another possibility, but may result in too high of a bitrate from what you want.
Try looking for examples with Google. They are a good way to pick up esoteric options you may want to use to lower the size while not degrading quality.
DVD audio is MP2. You could use -acodec copy. The results should be acceptable.
The sweatspot for mp2 audio is "-acodec mp2 -ab 224k -ar 44100".
For mp3 audio, a sampling rate of "-ar 48k" is very common.
For most distros, there is a repository that that has restricted versions of media packages with features like mp3 builtin. You need this as well as downloading and installing the library & codecs.
I don't use Debian, but I think ftp.deb-multimedia.org may be such a repository.
Yes, for fully-enabled versions of most media apps on debian, use deb-multimedia.org as your source.
Actually, dvd audio can be mp2, ac3, DTS, or raw pcm, with ac3 being the most common. The output posted above shows that that source has ac3 audio. You should be able to use -acodec copy to keep the ac3 track, but if file-size is important, you can save a few megabytes by re-encoding it to mp2 or mp3 (and if audio quality isn't important, use a lower bitrate to shave off even more).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.