LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 06-26-2015, 11:06 PM   #1
Yuhan
Member
 
Registered: Oct 2010
Posts: 374

Rep: Reputation: 3
Converting from Flac to mp3 in Sound Converter


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.

Thank you in advance.
 
Old 06-26-2015, 11:27 PM   #2
Sefyir
Member
 
Registered: Mar 2015
Distribution: Linux Mint
Posts: 634

Rep: Reputation: 316Reputation: 316Reputation: 316Reputation: 316
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.

Last edited by Sefyir; 06-26-2015 at 11:31 PM.
 
Old 06-26-2015, 11:35 PM   #3
Yuhan
Member
 
Registered: Oct 2010
Posts: 374

Original Poster
Rep: Reputation: 3
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.
 
Old 06-27-2015, 12:25 AM   #4
ArfaSmif
Member
 
Registered: Oct 2008
Location: Brisbane Australia
Distribution: Fedora, Centos, Manjaro
Posts: 317

Rep: Reputation: 70
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.
 
Old 06-27-2015, 07:15 AM   #5
Yuhan
Member
 
Registered: Oct 2010
Posts: 374

Original Poster
Rep: Reputation: 3
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.
 
Old 06-27-2015, 10:37 AM   #6
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,479

Rep: Reputation: Disabled
Would be better to store them in a directory under your /home directory.
 
Old 06-27-2015, 12:58 PM   #7
Yuhan
Member
 
Registered: Oct 2010
Posts: 374

Original Poster
Rep: Reputation: 3
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.
 
Old 06-28-2015, 12:22 AM   #8
ArfaSmif
Member
 
Registered: Oct 2008
Location: Brisbane Australia
Distribution: Fedora, Centos, Manjaro
Posts: 317

Rep: Reputation: 70
Quote:
Originally Posted by Yuhan View Post
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.
 
Old 06-28-2015, 06:48 AM   #9
Yuhan
Member
 
Registered: Oct 2010
Posts: 374

Original Poster
Rep: Reputation: 3
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!
 
Old 06-28-2015, 11:47 PM   #10
ArfaSmif
Member
 
Registered: Oct 2008
Location: Brisbane Australia
Distribution: Fedora, Centos, Manjaro
Posts: 317

Rep: Reputation: 70
Quote:
Originally Posted by Yuhan View Post
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.
 
Old 06-29-2015, 07:26 AM   #11
Yuhan
Member
 
Registered: Oct 2010
Posts: 374

Original Poster
Rep: Reputation: 3
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.
 
Old 06-29-2015, 10:04 PM   #12
ArfaSmif
Member
 
Registered: Oct 2008
Location: Brisbane Australia
Distribution: Fedora, Centos, Manjaro
Posts: 317

Rep: Reputation: 70
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.
 
Old 06-30-2015, 11:37 PM   #13
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by Yuhan View Post
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting .flac to .aac hgnoel1980 Linux - General 2 11-24-2012 11:04 AM
FLAC to MP3 General Linux - Software 3 12-28-2009 06:43 AM
Sound Converter not converting leupi Linux - Software 2 05-03-2009 09:58 PM
Converting mp4 sound files to mp3? ceaseallfeeling Linux - Software 2 12-22-2007 05:45 PM
need a sound converter that rm -> mp3 adam_blackice Linux - Newbie 2 08-27-2007 12:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration