Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
i know that this a kiddish thing but i still find it a bit annoying that i can't really figure out the procedure.
I've mostly mp4/flv media files,i need to convert them to mp3 to put in my mp3 player but at the same time i like to adjust the mp3 bitrate to save space and maintain quality sometimes.
How do i actually do that in Linux.
Is there any GUI program that performs the job for me quickly ?
I'm prettys sure that soundkonverter (Qt) or soundconverter (GTK) will do it. Not a great way though, IIRC both programs will convert the video stream to audio, then run that through a ripper. Since the audio on those files types is already compressed into a lossy format, any extra conversions will reduce the sound quality.
A better way is to check the .flv or .mp4 file and see what audio codec is inside. If its MP3, just strip the video, leaving you with an unconverted original .mp3 file. The only way I know to strip the video is with the command line though.
If its .aac (or similar)...honestly, in most cases it would be easy to find the file in .mp3 format, and its going to sound better than a lossy->lossy conversion.
A better way is to check the .flv or .mp4 file and see what audio codec is inside. If its MP3, just strip the video, leaving you with an unconverted original .mp3 file.
Yes, that is the bitrate. It is a good bitrate in that bitrates over this do not provide a huge improvement in quality, but do increase the size of the file.
i was trying to understand the command provided and also read man page for the same.
this i what i got:
1) -ab is to set bitrate
2) -ac is to set output channels
3) -ar is to set frequency
please rectify me if i miss something !
But i' not getting what this is for :
1) -acodec
2) libmp3lame
Yes, that is the bitrate. It is a good bitrate in that bitrates over this do not provide a huge improvement in quality, but do increase the size of the file.
I disagree with the 160K idea, IMO 160K MP3s are a little bit better than the sound of a goat pissing in a tin....
But thats besides the point. Most .flv videos are using 128k or less MP3 encoding. Transcoding a MP3 from a smaller bitrate to a bigger bitrate will not help sound quality at all. Transcoding them at all will hurt sound quality.
Theres a few ways to strip the video (or dump the audio) from .flv and .mp4/m4v here-
i think i'd use FFmpeg,but for now i'm searching for answers to two of my questions...
one is this and other is:
How to convert multiple files using FFmpeg ?
i was trying to understand the command provided and also read man page for the same.
this i what i got:
1) -ab is to set bitrate
2) -ac is to set output channels
3) -ar is to set frequency
please rectify me if i miss something !
But i' not getting what this is for :
1) -acodec
2) libmp3lame
-acodec means use the following audio codec. libmp3lame is the audio codec = mp3 via lame encoder.
Quote:
Originally Posted by dEnDrOn
i think i'd use FFmpeg,but for now i'm searching for answers to two of my questions...
one is this and other is:
How to convert multiple files using FFmpeg ?
You can do this to convert multiple files:
Code:
for i in *.mp4; do ffmpeg -i "$i" -acodec libmp3lame -ab 160k -ar 44100 -ac 2 "$(basename "$i" .mp4).mp3"; done
basename is a command that cuts off extensions, and I use it to cut off .mp4 and replace it with .mp3.
I disagree with the 160K idea, IMO 160K MP3s are a little bit better than the sound of a goat pissing in a tin....
But thats besides the point. Most .flv videos are using 128k or less MP3 encoding. Transcoding a MP3 from a smaller bitrate to a bigger bitrate will not help soudn quality at all. Transcoding them at all will hurt soudn quality.
We're talking about mp4 files here that come standard with 128k AAC audio. This transcodes well to 160k mp3.
We're talking about mp4 files here that come standard with 128k AAC audio. This transcodes well to 160k mp3.
Wow, I didnt even notice my typos till quoted. At least I was consistant with my use of 'soudn'. LOL
Sure, it will transcode...but you can transcode lossy-> lossless if you really want.
Just because it will transcode, doesnt mean it should be transocded. The output .mp3 will be worse sounding than the same sized MP3 ripped from a lossless or CD source, and also worse sounding than the original .acc file as well.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.