Tag Info

Hot answers tagged

36

For FFmpeg with Constant Bitrate Encoding (CBR): ffmpeg -i video.mp4 -vn \ -acodec libmp3lame -ac 2 -ab 160k -ar 48000 \ audio.mp3 or if you want to use Variable Bitrate Encoding (VBR): ffmpeg -i video.mp4 -vn \ -acodec libmp3lame -ac 2 -qscale:a 4 -ar 48000 \ audio.mp3 The VBR example has a target bitrate of 165 Kbit/s ...


10

Terminal way: lame is in Universe repository. So you have to first enable universe repository. See this question → How do I enable the "Universe" repository? Then install lame by the below using commands in a terminal. To open a terminal press Ctrl + Alt + T. sudo apt-get update sudo apt-get install lame Then navigate to the directory by ...


9

I have a shell-script that uses mplayer (so it can convert anything mplayer can play) to extract the audio, and then encode it using lame. Here is the code: #! /bin/bash # any2mp3.sh # Converts to mp3 anything mplayer can play # Needs mplayer amd lame installed [ $1 ] || { echo "Usage: $0 file1.wma file2.wma"; exit 1; } for i in "$@" do [ -f "$i" ] || ...


6

soundconverter is the leading audio file converter for the GNOME Desktop. It reads anything GStreamer can read (Ogg Vorbis, AAC, MP3, FLAC, WAV, AVI, MPEG, MOV, M4A, AC3, DTS, ALAC, MPC, Shorten, APE, SID, MOD, XM, S3M, etc...), and writes to WAV, FLAC, MP3, AAC, and Ogg Vorbis files, or use a GNOME Audio Profile. SoundConverter aims to be simple to ...


4

For libfaac, the package libfaac-dev must be installed. (that applies to most errors related to missing packages during a build). To install it, run: sudo apt-get install libfaac-dev libfaac-dev and its dependency libfaac0 are located inside the multiverse repository. Does the directory /usr/local/share exist? If not, create it: sudo mkdir -m 755 ...


4

You seem to be using the wrong codec name. To see which codecs are supported, do: avconv -codecs according to this the codec name is libmp3lame (you have an extra 0). This is on my system however, so yours may be different. The command I gave will let you find out.


3

It is not true, lame can even read the input file from stdin if you give it - as a name. Are you sure the input file is in the correct format? You can use the file util to check. Have you read lame man page to see if some option is required for your input file?


2

First, you have to understand a few things. MP3 is an audio format. MP4 is a video format. To get the audio out of the MP4 (and to save it as an MP3), use soundconverter .


2

I think the problem is with your syntax of the ffmpeg command. ffmpeg -i source_filename -vn -ab 192k -acodec libmp3lame -ac 2 output_filename should work.


2

The setting for Lame are incomplete. We will have to define VBR mode 4 as well to obtain the desired results: audio/x-raw-int,rate=44100,channels=2 ! lame name=enc mode=0 quality=0 vbr=4 vbr-quality=0 ! xingmux ! id3v2mux


2

Create a file ~/bin/flac2mp3 with the contents: #!/bin/bash file="$1" flac -cd "$file" | lame --preset fast extreme - "${file%.flac}.mp3" Then run find . -name '*.flac' -exec ~/bin/flac2mp3 '{}' \; It can be done without using a separate file for ~/bin/flac2mp3 but I think using a separate file is simpler and more clear.


2

There's another way without renaming the source file: create a symbolic link. ln -s ~/src/0000 ~/tmp/0000.wav lame ~/tmp/0000.wav ~/dest/0000.mp3


2

You have to use: lame --scale <scale you want to increase> <infile> <outfile> So that would be in your example: lame --scale 3 Because.mp3 Because_loud.mp3


2

If you need a tool with a graphical user interface, then you can use Soundconverter. You can open the software-center and search for it or you install it manually via terminal. sudo apt-get install soundconverter Download / Install for Ubuntu


2

I use this small script for converting m4a to mp3. #!/bin/bash for i in *.m4a; do avconv -i "$i" -vn -acodec libmp3lame -ac 2 -ab 160k -ar 48000 "`basename "$i" .m4a`.mp3" done


1

Use this: lame -b [bitrate] input.mp3 output.mp3


1

lame is perfectly suited to this task, but I'm going to use ffmpeg and ffprobe for this answer, because I know them like the back of my hand and because they can be generalised to more than just MP3s. First of all: sudo apt-get install ffmpeg There is no tool that I am aware of that can read media files and then over-write the input straight away: you ...


1

You could also just have installed the package libavcodec-extra-52 (or -53, depending on your Ubuntu version) to enable MP3 support for ffmpeg.



Only top voted, non community-wiki answers of a minimum length are eligible