Results 1 to 6 of 6

Thread: How to control flac to mp3 conversion using mirror-flac?

  1. #1
    Junior Member
    Join Date
    Apr 2009
    Posts
    13

    How to control flac to mp3 conversion using mirror-flac?


    When I use the mirror-flac command for conversion of my existing flac-files to mp3-files it doesn't use the same directory-structure as in the flac-directory. And it always convert to mp3 bitrate 128 kb/s.


    Can I change this?


    I have without any luck tried to change the /etc/ripit/config file. It works fine when I rip a cd, but the mirror-flac doesn't seem to use this config file.


  2. #2
    Administrator andrew's Avatar
    Join Date
    Nov 2008
    Location
    New Hampshire
    Posts
    3,617

    How to control flac to mp3 conversion using mirror-flac?


    Yes, mirror-flac is just a script I found on the Internet. It is not really very configurable. If you want to change the bitrate you can edit /usr/local/sbin/flac2mp3 and change the default bitrate. Its under the comment "Specify the default variable values" near the top. If you know some bash scripting you my be able to get it to do other things.


  3. #3
    Junior Member
    Join Date
    Apr 2009
    Posts
    13

    How to control flac to mp3 conversion using mirror-flac?


    Thank you very much. I now can resolve the bitrate-problem.


    About the directory-structure problem: I can see you use another script to copy the coverart (MusicUtil). It just works flawlessly and places the covers in the right place. But the mp3files are misplaced and given wrong names in the directorystructure?


    Example of the bug (seen from a windows pc):


    Flac:
    \\VORTEXBOX\files\music\flac\4 Non Blondes\(1992) - Bigger, Better, Faster, More!\01 - Train.flac


    Mp3 (wrong):
    \\VORTEXBOX\files\music\mp3\4 Non Blondes\(1992) - Bigger, Better, Faster, More!01 - Train.mp3


    Cover (right):
    \\VORTEXBOX\files\music\mp3\4 Non Blondes\(1992) - Bigger, Better, Faster, More!\cover.jpg


    I have on Windows used the flac2mp3.pl Perl-script by Robin Bowes and it works without any problems. Can I suggest, that you in a later release use this script instead?


  4. #4
    Administrator andrew's Avatar
    Join Date
    Nov 2008
    Location
    New Hampshire
    Posts
    3,617

    How to control flac to mp3 conversion using mirror-flac?


    No problem. Where did you get this script?


  5. #5
    Junior Member
    Join Date
    Apr 2009
    Posts
    13

    How to control flac to mp3 conversion using mirror-flac?


    I learned about the script in forums.slimdevices.com where it is often recommended.


    The projects site is here: http://freshmeat.net/projects/flac2mp3/


  6. #6
    Junior Member
    Join Date
    Apr 2009
    Posts
    13

    How to control flac to mp3 conversion using mirror-flac?


    I researched a little more on this problem and it seems kind of solved now, but it's not a very solid solution.


    The flac2mp3 script you use have this Usage documented:





    Usage: flac2mp3 [-b bitrate] [-d dirstoretain] [-l lameopts]
    [-o outputdirectory] [-r] FILES


    This script uses the tools flac, metaflac and lame to convert flac files to
    mp3s. Accepts both individual files and directories (the latter when using the
    -r option).


    Explanation of the options:


    -b bitrate Specifies the bitrate of the converted mp3. Defaults to
    128. Specify a bitrate of “none” to stop the -b option
    from being passed to lame.


    -d dirstoretain Specifies how many directory names to retain when using both -r and -o. Works from right to left. See the -r
    option for an example.


    -l lameopts Allows to give custom options to lame. Make sure to
    surround them with quotes (e.g. -l “-V 6&Prime!


    -o outputdirectory Specifies the directory to write the mp3s to. If not
    specified, the mp3s will be written to the directory
    where the flac files are located.


    -r Makes the script look for flac files recursively. If
    this option is specified together with an alternative
    output directory, the mp3s will be written to the
    specified output directory plus the current relative
    path of the flac file. Example:
    ”After Edmund/Hello/01_Thank_God.flac”
    will be converted to
    ”/After Edmund/Hello/01_Thank_God.mp3.”


    ATTENTION: When using full paths (like
    /home/user/music/After Edmund/Hello/01_Thank_God.flac),
    you can determine how many directories the script will
    retain using the -d option. With -d 2, the full path
    file just above will be converted to:


    ”/After Edmund/Hello/01_Thank_God.mp3.”


    -s Do not use this option unless you know what you are
    doing! It is used internally to self-execute the
    script for conversion.


    -v Be verbose; makes the script tell what it is doing.


    For more information see http://www.linuxtutorialblog.com/.
    No warranty included with this script [img]/wp-includes/images/smilies/icon_wink.gif[/img] Rechosen




    It is the dirstoretain parameter that should be changed to a higher number, in my example 6 (-d 6) otherwise it will snap some of the directorystructure.


    I changed it directly in the flac2mp3 scripts default settings where the bitrate also can be changed:


    # Specify the default variable values
    bitrate=”192″
    dirstoretain=”6″


    Maybe you could change this dirstoretain value in a future release?


    But I still think you should consider using Robin Bowes excellent flac2mp3.pl Perl-script.


    It has the big advantage that it only convert newly touched flac-files and even can be called with a –tagonly switch. That is what you like when you are changing tags in a few flacfiles. Afterwards you just have to call mirror-flac and the tags are replaced in the according mp3file using –tagonly switch.


Similar Threads

  1. flac mirror and mp3s
    By UNCMo96 in forum Help
    Replies: 8
    Last Post: 05-13-2011, 02:13 PM
  2. FLAC Mirror and embedded album art.
    By ottovonkopp in forum Help
    Replies: 8
    Last Post: 01-12-2010, 01:58 AM
  3. Using Flac Mirror
    By StefanP in forum General
    Replies: 8
    Last Post: 11-13-2009, 01:53 PM
  4. Flac Mirror isn't working from web gui
    By phoch00 in forum Help
    Replies: 5
    Last Post: 09-17-2009, 03:59 AM
  5. mirror-flac times out
    By JoshK in forum Help
    Replies: 2
    Last Post: 08-24-2009, 03:14 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •