Linux - SoftwareThis 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
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.
I just installed Sound Converter and I want to convert a Flac file to an mp3 file. What I'm converting is a full album and what I'd like to be able to do is have the new mp3 conversion in a separate folder. I tried making a conversion and it worked fine except that all the converted mp3 files were in the same folder as the Flac files! How do I set up Sound Converter so that it leaves the Flac files in the original folder but sets up the converted mp3 files in a separate folder? There must be a way to do this but I'm having trouble figuring that out.
I couldn't tell you for sound converter. However, if you are up to using a cli media converter (avconv or ffmpeg) this is easy.
Code:
mkdir mp3
for file in *.flac
do
ffmpeg -i "$file" mp3/"${file%flac}"mp3
done
What the above does is creates a directory called "mp3". Then it for loops through all files ending in .flac, converting it from foo.flac to mp3/foo.mp3
Notice the ${file%flac}"mp3.
What this does is takes $file (or foo.flac), strips the flac from the end of the filename using % (foo) and since a mp3 is added after the statement causing it to output with foo.mp3. Then ffmpeg takes this to mean the input is foo.flac and output is foo.mp3.
Thanks but I'm not that conversant with using command line control. What is the bitrate on the script you indicated? Is there a way to control that? In order to get the script to work do you have to be in the folder where the Flac file is situated? Again, I'm not an expert with using a terminal.
In "soundconverter" press the "Preferences" button. Here you will see a dialogue, where you can change "Where to place results?". In your case you would like to place them into a specific folder that you choose. Check the second input field and press the "Choose" button. Here you can select where you want your converted files to go.
Thank you for that! Very helpful. What I want to do is place the album in the same general folder (which is "Downloads") but into a separate folder within "Downloads." Is that possible to do? So that, in effect, each album would have its own folder within the general "Downloads" folder. Maybe it's easier to place the albums under a different heading altogether. I think we're close here...Than you again.
The problem is, when I do the conversion the mp3 files wind up in the same folder as the flac files. I'm trying to get the mp3 files into their own folder so they can be stored and retrieved more easily. Having the mp3 files stored in the same folder as the flac files is a mess! I want to get the mp3 files in their own folder.
Thank you for that! Very helpful. What I want to do is place the album in the same general folder (which is "Downloads") but into a separate folder within "Downloads." Is that possible to do? So that, in effect, each album would have its own folder within the general "Downloads" folder. Maybe it's easier to place the albums under a different heading altogether. I think we're close here...Than you again.
What I do is select "Into folder ..." and choose for example /home/yourusername/Downloads/mp3s/)
Then I select "Create subfolders:" and then choose artist/album in the dropdown box.
This will put all your mp3s into :-
/home/yourusername/Downloads/mp3s/Artist/Album/
for example /home/yourusername/Downloads/mp3s/The Beatles/Abbey Road/
This does assume however that all the metadata exists in the files that you are converting. A very good program for manipulating metadata is "easytag". Hope this helps.
Thank you for that good explanation. Do you think the "mp3" category is a better folder than "music"? What exactly is meant by "tags" in this context? I've heard that term used in connection with music files, but I've never been clear about what it means. I have heard it can get tricky. One last question: if I want to try converting the same album twice to see which bitrate I prefer, how do you do that so that the flag doesn't come up "File already exists. Do you want to skip or overwrite it?" There has to be a way to do this because arguments abound about whether mp3 bitrate makes a discernible audio difference!
Thank you for that good explanation. Do you think the "mp3" category is a better folder than "music"? What exactly is meant by "tags" in this context? I've heard that term used in connection with music files, but I've never been clear about what it means. I have heard it can get tricky. One last question: if I want to try converting the same album twice to see which bitrate I prefer, how do you do that so that the flag doesn't come up "File already exists. Do you want to skip or overwrite it?" There has to be a way to do this because arguments abound about whether mp3 bitrate makes a discernible audio difference!
The name of the folder makes no difference to the outcome. You can use any name that you like.
Each music file has space reserved for information about that file called metadata (the same is true for digital photos too), including things like name of song, artist, album, number of the song, total number of songs on the album etc. You should install "easytag" and use it to have a look at the metadata for each file.
If you wish to convert an album twice to compare bitrates, you should create a separate folder for each conversion so that each conversion is in a different folder.
Thank you again! My understanding is that if you deal with tags manually, they can get fairly technical and a bit difficult
to manage. Does Easytag eliminate that technical difficulty? I read somewhere that even with Easytag there is still some work you have to do manually.
You can modify metadata manually too if you have the appropriate tools. However in your case I would recommend installing "Easytag" which provides a graphical interface to modify and save metadata for music files.
I read somewhere that even with Easytag there is still some work you have to do manually.
oh yes.
best to take care of that during conversion/ripping.
updating metadata manually for your collection is a lot of work.
btw, can be done with ffmpeg:
Code:
#!/bin/sh
# convert flac 2 mp3, preserve ALL metadata.
for FILE in *.flac;
do
ffmpeg -i "$FILE" -aq 0 -map_metadata 0 "${FILE%.*}.mp3";
# mp3 variable bitrate, highest quality
# https://trac.ffmpeg.org/wiki/AACEncodingGuide#fdk_vbr
done
exit 0
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.