Tag Info

Hot answers tagged

42

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 ...


13

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" ] || ...


8

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 ...


5

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.


5

lame cannot read in filenames from input. You will have to use find's -exec or xargs to run it over each file found: find . -iname '*.mp3' -exec lame -b {} \; If a second filename isn't specified, lame will attach another .mp3 to the given filename and write to that file. lame does not support writing to the same file. You'll have to convert to another ...


4

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


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 ...


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?


3

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

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

MP3 uses lossy compression. Just by recompressing it and doing nothing else, you lose data and introduce artefacts. That said, such a drop probably means it's changing bitrate or the sample rate so there's even less data being stored. Or maybe the old compression was rubbish. Either way, I wouldn't recompress. Use something like ReplayGain. This is a ...


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

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 ...


2

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


1

Try a the following: Start with removing whitespaces from the file names since these seems to cause trouble: for f in $(find . -name "*.mp3"); do rename "s/\s+/_/g" *; done Execute a loop and traverse through all files: for f in $(find . -name "*.mp3"); do lame -b 160 "$f" tmp && mv tmp "$f"; done Now you will overwrite the original files with ...


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.


1

In many distros, avconv by default is not built with "--enable-libmp3lame". avconv must be compiled with MP3 support in order to utilize libmp3lame. My working solution was to download libav from the git repo, and build it myself. This is the configure command line I used: ./configure --enable-libmp3lame --enable-nonfree --enable-gpl --enable-libx264 You ...


1

It is possible to use Lame directly if you use FFmpeg and pipe the output to lame (via stdout and stdin). An example: ffmpeg -i video.mp4 -vn -f wav - | \ lame -V 3 - audio.mp3 This allows you to use lame's considerable commandline options if you wish to explore them...


1

To convert Upd_Sanity.mp4 to Upd_Sanity.mp3 $ sudo apt-get install ffmpeg && sudo apt-get install libavcodec-extra-53 $ ffmpeg -i Upd_Sanity.mp4 -vn -acodec libmp3lame -ac 2 -ab 160k -ar 48000 Upd_Sanity.mp3 OR (as ffmpeg is deprecated) $ avconv -i Upd_Sanity.mp4 -vn -acodec libmp3lame -ac 2 -ab 160k -ar 48000 Upd_Sanity.mp3 Description -i ...



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