Page 4 of 4 FirstFirst ... 234
Results 31 to 36 of 36

Thread: Script converting APE + CUE to splitted FLACs

  1. #31
    Join Date
    Jan 2009
    Location
    Guanajuato, Gto.; México
    Beans
    35
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Script converting APE + CUE to splitted FLACs

    Quote Originally Posted by realoperadeal View Post
    Strangely it is now working just fine! I must have been doing something wrong. Thanks for your help.
    Great! Glad to help

  2. #32
    Join Date
    Sep 2010
    Beans
    1

    Re: Script converting APE + CUE to splitted FLACs

    Quote Originally Posted by marius_siuram View Post
    There are people (like me, with an amd64) that can't find any version of MAC that successfully works well in ubuntu.

    Well there is a workaround... I found myself that wine works perfectly well (at least for me) with the proprietary executable on the Monkey's Audio Codec's official web. Converting it to wav and then reconverting is a ugly solution, but hey, it finally Worked For Me(TM)

    To all those users that keep using the ape format: please please PLEASE Stop using it. Thanks
    I try to get rid of it as quickly as I can, but to do so I need to convert first xD
    The solution to the amd64 lack of MAC versions:

    “Here are newer and patched (some fixes) deb binaries (amd64 and i386) for mac: https://launchpad.net/~g-christ/+archive/ppa

    Someone has pointed it out in the following page: http://www.webupd8.org/2009/04/split...buntu-and.html

    Direct link to MAC for amd64 .deb file:

    https://launchpad.net/~g-christ/+arc...ppa1_amd64.deb
    Last edited by Felipe.; September 26th, 2010 at 05:15 AM.

  3. #33
    Join Date
    Jun 2008
    Location
    Ballard
    Beans
    2,329
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Script converting APE + CUE to splitted FLACs

    For those interested I have written a conversion script for APE/FLAC album length files:

    http://www.soundunreason.com/InkWell/?p=2485
    "We're all in this together, kid." --H. Tuttle (a.k.a. H. Buttle)
    "Maybe it's a layer 8 problem." --thatguruguy
    A High-Tech Blech!

  4. #34
    Join Date
    Jun 2008
    Location
    Ballard
    Beans
    2,329
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Script converting APE + CUE to splitted FLACs

    Have you noticed any problems with the eudoxos repository? I am trying to install MAC on a 10.04 machine and it's not working (I also tried it on a 9.10 with the same results).
    "We're all in this together, kid." --H. Tuttle (a.k.a. H. Buttle)
    "Maybe it's a layer 8 problem." --thatguruguy
    A High-Tech Blech!

  5. #35
    Join Date
    Jun 2008
    Location
    Ballard
    Beans
    2,329
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Script converting APE + CUE to splitted FLACs

    It appears that the eudoxos repository no longer includes the MAC. I was able to locate monkeys-audio by (cheating) using a different version's repository (I used intrepid instead of lucid).

    I'd like information about a current repository for MAC if anyone can help.
    "We're all in this together, kid." --H. Tuttle (a.k.a. H. Buttle)
    "Maybe it's a layer 8 problem." --thatguruguy
    A High-Tech Blech!

  6. #36
    Join Date
    Oct 2009
    Beans
    2

    Re: Script converting APE + CUE to splitted FLACs

    Quote Originally Posted by txust View Post
    Hi everyone. I only registered to post this script, for I couldn't find anything that does this.
    I'm spanish, so this script is in spanish too, but it's easy to understand, I think.
    It basically converts an APE + CUE file in several FLAC files and renames and tags them using the information provided by the cue sheet. It also installs any package needed, except mac-port, but tells you how to do it.
    Just copy this in an empty file, rename it to something like apecue2flac, save it and make it executable by doing this:

    Code:
    chmod +x apecue2flac
    Then you can copy it into /usr/bin, so it can be accesible anytime, anywhere:

    Code:
    sudo cp apecue2flac /usr/bin
    Any comment welcome. (I apologize for my broken english).
    It's been tested in Hardy and Intrepid.

    This is it:
    Code:
    #!/bin/bash
    
    clear
    
    # Presentación
    
    echo                              "APECUE2FLAC"
    echo
    echo
    echo
    echo "Script para convertir archivos ape con hoja cue asociada en archivos flac sueltos"
    echo
    echo
    echo "ATENCIÓN: ESTE SCRIPT INSTALARÁ AUTOMÁTICAMENTE ALGUNOS DE LOS  PAQUETES NECESARIOS PARA EJECUTARSE SI NO ESTÁN YA INSTALADOS."
    echo
    echo
    echo
    echo
    
    # Comprueba si se tienen todas las herramientas necesarias y las instala si es necesario
    
    MAC=`which mac`
    if [ -z $MAC ]; then
    echo "ERROR :-("
    echo "No tienes instalado Monkey's Audio Codec."
    echo "Busca en Google, que hay mucha información (Es fácil de instalar, pero no está en los repositorios). Te sugiero 
    que añadas los repositorios de Eudoxos (http://ppa.launchpad.net/eudoxos/ubuntu tuversióndeubuntu main), o que 
    descargues el deb de aquí: http://members.iinet.net.au/~aidanjm/mac-3.99-u4_b3-1_i386.deb"
    exit -1
    fi
    
    FLAC=`which flac`
    if [ -z $FLAC ]; then
    echo "ERROR SUBSANABLE ;-)"
    echo "No tienes instalado flac, instalando automáticamente..."
    sudo aptitude update && sudo aptitude install flac -y
    clear
    echo "ERROR CORREGIDO, CONTINUANDO..."
    echo
    fi
    
    CUE=`which cuebreakpoints`
    if [ -z $CUE ]; then
    echo "ERROR SUBSANABLE ;-)"
    echo
    echo "No tienes instalado cuetools, instalando automáticamente..."
    sudo aptitude update && sudo aptitude install cuetools -y
    clear
    echo "ERROR CORREGIDO, CONTINUANDO..."
    echo
    fi
    
    SHN=`which shntool`
    if [ -z $SHN ]; then
    echo "ERROR SUBSANABLE ;-)"
    echo
    echo "No tienes instalado shntool, instalando automáticamente..."
    sudo aptitude update && sudo aptitude install shntool -y
    clear
    echo "ERROR CORREGIDO, CONTINUANDO..."
    echo
    fi
    
    LL=`which lltag`
    if [ -z $LL ]; then
    echo "ERROR SUBSANABLE ;-)"
    echo
    echo "No tienes instalado lltag, instalando automáticamente..."
    sudo aptitude update && sudo aptitude install lltag -y
    clear
    echo "ERROR CORREGIDO, CONTINUANDO..."
    echo
    fi
    
    # Verifica que hemos elegido un archivo cue y sale si no es así
    
    for i in "$*"; do
    case $i in
    *.[cU][uU][eE])
    echo "Verificando que el archivo $i tiene extensión cue...";;
    *)
    echo "Advertencia: El archivo $i no tiene extensión .cue. Abortando."
    continue
    esac
    
    FILENAME="$(basename "$i")"
    FILENAME="${FILENAME%.[cC][uU][eE]}"
    
    # Procesa los archivos
    
    echo "Separando archivos..."
    cuebreakpoints  "$FILENAME".cue
    shnsplit -o flac -f "$FILENAME".cue "$FILENAME".ape
    
    echo "Añadiendo información de etiqueta..."
    cuetag "$FILENAME".cue split-track*.flac
    echo
    
    # Ahora renombra los archivos según el esquema "número de canción título", pero se puede cambiar como queramos,
    # usando los comodines habituales. Consultar el manual de lltag para más información.
    
    echo "Renombrando los archivos..."
    lltag --yes --no-tagging --rename '%n %t' `ls split-track*.flac`
    echo
    echo
    echo "Proceso terminado."
    done
    Now, this is the english version, as requested by nafihsus.
    My english is not so good, but I think it can be understood, please, feel free to correct it and let me know the changes you might thing desirable: Thank you.
    Code:
    #!/bin/bash
    
    clear
    
    # Introduction
    
    echo                              "APECUE2FLAC"
    echo
    echo
    echo
    echo "This bash script will convert and split ape files with associated cue files"
    echo
    echo
    echo "WARNING: THIS SCRIPT WILL INSTALL NECESSARY PACKAGES IF NOT ALREADY INSTALLED"
    echo
    echo
    echo
    echo
    
    # This will check your system for dependencies, and install packages if needed
    
    MAC=`which mac`
    if [ -z $MAC ]; then
    echo "ERROR :-("
    echo "Monkey's Audio Codec is not in your system"
    echo "Do a Google search (it's easy to install, but it's not in the  repositories). I suggest you to add the Eudoxos repositories  (http://ppa.launchpad.net/eudoxos/ubuntu yourubuntuversion main), or you  may prefer to download this deb:  http://members.iinet.net.au/~aidanjm/mac-3.99-u4_b3-1_i386.deb"
    exit -1
    fi
    
    FLAC=`which flac`
    if [ -z $FLAC ]; then
    echo "ERROR (Don't worry) ;-)"
    echo "flac not found, automatically installing"
    sudo aptitude update && sudo aptitude install flac -y
    clear
    echo "EVERYTHING OK, PROCEEDING..."
    echo
    fi
    
    CUE=`which cuebreakpoints`
    if [ -z $CUE ]; then
    echo "ERROR (Don't worry) ;-)"
    echo
    echo "cuetools not found, automatically installing..."
    sudo aptitude update && sudo aptitude install cuetools -y
    clear
    echo "EVERYTHING OK, PROCEEDING..."
    echo
    fi
    
    SHN=`which shntool`
    if [ -z $SHN ]; then
    echo "ERROR (Don't worry) ;-)"
    echo
    echo "shntool not found, automatically installing..."
    sudo aptitude update && sudo aptitude install shntool -y
    clear
    echo "EVERYTHING OK, PROCEEDING..."
    echo
    fi
    
    LL=`which lltag`
    if [ -z $LL ]; then
    echo "ERROR (Don't worry) ;-)"
    echo
    echo "lltag not found, automatically installing..."
    sudo aptitude update && sudo aptitude install lltag -y
    clear
    echo "EVERYTHING OK, PROCEEDING..."
    echo
    fi
    
    # The following will verify if we have chosen a cue file, and exits if not
    
    for i in "$*"; do
    case $i in
    *.[cU][uU][eE])
    echo "Verifying file $i has a cue extension...";;
    *)
    echo "Warning: file $i is not a cue file. Aborting."
    continue
    esac
    
    FILENAME="$(basename $i)"
    FILENAME="${FILENAME%.[cC][uU][eE]}"
    
    # Processes files
    
    echo "Splitting files..."
    cuebreakpoints  "$FILENAME".cue
    shnsplit -o flac -f "$FILENAME".cue "$FILENAME".ape
    
    echo "Adding tags..."
    cuetag "$FILENAME".cue split-track*.flac
    echo
    
    # Now it renames files this way: "song-number title", but this can be changed as liked,
    # using common parameters. Please read lltag manual for more information.
    
    echo "Renaming files..."
    lltag --yes --no-tagging --rename '%n %t' `ls split-track*.flac`
    echo
    echo
    echo "End."
    done
    P. S.: I have posted a similar script that does the same with FLAC + CUE files here.
    I modified the original script to fix a problem with filenames with spaces. If the encoding of the file is not UTF-8, the characters will not display properly. If you convert the format to UTF-8 with iconv (depending on what the original encoding is), cuetag will work properly.

    There is a more comprehensive tool available at http://code.google.com/p/split2flac/

Page 4 of 4 FirstFirst ... 234

Tags for this Thread

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
  •