Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Convert ape to mp3

  1. #11
    Join Date
    Aug 2006
    Location
    London, UK
    Beans
    Hidden!

    Re: Convert ape to mp3

    Pending your reply I have converted the ape files to wav and the result was very satisfactory. I have then gone to another folder with more ape files and this time it will not work.

    Code:
    rob@rob-desktop:/media/video/Music/VA - Ultimate Liszt/CD 01$ for f in *.ape; do ffmpeg -i "$f" "${f%.ape}.wav"; done
    FFmpeg version r11872+debian_3:0.svn20080206-12ubuntu3, Copyright (c) 2000-2008 Fabrice Bellard, et al.
      configuration: --enable-gpl --enable-pp --enable-swscaler --enable-x11grab --prefix=/usr --enable-libgsm --enable-libtheora --enable-libvorbis --enable-pthreads --disable-strip --enable-libfaad --enable-libfaadbin --enable-liba52 --enable-liba52bin --enable-libdc1394 --disable-armv5te --disable-armv6 --disable-altivec --disable-vis --enable-shared --disable-static
      libavutil version: 49.6.0
      libavcodec version: 51.50.0
      libavformat version: 52.7.0
      libavdevice version: 52.0.0
      built on Oct  3 2008 22:40:31, gcc: 4.3.2
    [mp3 @ 0xb7ec1388]Could not find codec parameters (Audio: mp3, 8 kb/s)
    I do not understand why it is referring to mp3 when I am trying to convert to wav. Can anyone spot why this time it will not convert?

    Robin

  2. #12
    Join Date
    Jun 2007
    Beans
    17,337

    Re: Convert ape to mp3

    Can anyone spot why this time it will not convert?
    Not really, are you sure they're ape files.

    Anyway I'd just use mac to decompress the .ape's to .wav instead of ffmpeg and then encode to what you wish, or burn to cd

    If you tried neroAacEnc and didn't like then try faac either from cli or with any number of apps. I'm not aware of any aac (m4a) parameters other using -br or -q (i think -q is superior

    I was just looking thru the source of soundkonverter and noticed it will convert ape (which it did in a quick test though it named everything 'unknown', so your better off just decompressing to .wav yourself, ect., ect.

    if you have cue files
    then ck. out that that script I linked to (ape to flac), or post there and see if he's got one for ape to mp3 (tagging from cue?)

    Otherwise maybe go (if you have cues) ape to flac, then flac to mp3 (tagging from flac metadata

    Any app like soundkonverter would do that or if you want more control of lame parameters here's a script to convert flac to mp3 with tags

    http://ubuntuforums.org/showthread.p...29#post6827629
    Last edited by mc4man; March 5th, 2009 at 02:24 AM. Reason: if you have cue's and tagging if wanted

  3. #13
    Join Date
    Aug 2006
    Location
    London, UK
    Beans
    Hidden!

    Re: Convert ape to mp3

    Although they had an extension of ape I think they were actually apeless because I was able to convert some other ape files with no problems. I would like to put your script into a file so that I can run it when needed. Can you please suggest the way to do this.

    Robin

  4. #14
    Join Date
    Aug 2006
    Location
    London, UK
    Beans
    Hidden!

    Scritp to convert ape to mp3

    Code:
    for f in *.ape; do ffmpeg -i "$f" "${f%.ape}.wav"; done
    This piece of code has worked wonderfully. Changes in inputs have enable it to work with flac as well.

    How do I attach it to an icon so I can click on the icon to run the code rather than having to hunt for the code when I need it?

    Robin

  5. #15
    Join Date
    Jun 2007
    Beans
    17,337

    Re: Convert ape to mp3

    you could make a simple little script, then at the dir. prompt just call the script with path to script/scriptname

    I still think it may be better to use mac to decompress to wav than ffmpeg, though maybe no difference.
    I linked to the source but meanwhile found a .deb (made for jaunty, doesn't matter, I just installed on hardy.

    https://launchpad.net/~quintasan/+archive/ppa/
    Don't add his repo, just expand the mac listing and scroll down to the "package files" listing and d. click to dl and install

    so a simple script (using mac) would be this, added a basic way to separate .wav's from .ape's. You can modify in several ways. Notice the path to save .wav's, ./temp/ is directly in front of "${f%.ape}.wav"
    you could path to anywhere in same manner

    Code:
    #!/bin/bash
    mkdir temp
    for f in *.ape; do mac "$f" ./temp/"${f%.ape}.wav" -d; done
    To use create a text file, name it something, ape2wav is what I'd use and paste in code.
    Put it either loose in home dir. or make a folder named scripts, then right click on the script -> properties -> permissions and mark as executable.

    Then at the dir. prompt for the folder with the .ape's go
    ~/scripts/ape2wav

    ---------------------------------------------------------------------
    maybe of no use to you but ....

    I was just making myself a little interactive script to convert .m4a (encoded w/ neroAacEnc) to mp3's with tags so I can add to an ipod.
    If you still wanted to go from .ape to .mp3 w/ tags give it a try, below I changed it to ape2mp3

    You'll need to install id3v2 and if you want to use genre with #'s id3 to get list.
    Code:
    sudo apt-get install id3 id3v2
    to see the number list for genre open a separate terminal and go
    Code:
    id3 -L
    If you want to you can remove the genre and year echo's and line below them if not wanted (if you remove an echo remove the read line below, you must Keep at a min the artist and album

    You can enter any number of valid lame commands as shown

    I have a line rm *.wav, you could change to rm *.ape or remove the line

    Your .apes should have a 'track' number, preferably like either (for tracks 1-9
    01- name of track
    02 - name of track
    ( otherwise if the folder is loaded into a player and you have 1-trackname, 2-trackname then 10 - 19 will be loaded above 2 - 9, 20 - 29 above 3-9, ect.


    ape2mp3

    PHP Code:
    #!/bin/bash
    echo "Artist name?"
    aread a
    echo "Name of album?"
    Aread A
    echo "genre?"
    gread g
    echo "year?"
    yread y
    for f in *.ape; do mac "$f" "${f%.ape}.wav" -ddone
    mkdir 
    "$a"'-'"$A"
    for f in *.wav; do lame --vbr-new -V2 --replaygain-accurate -q 2 "$f./"$a"'-'"$A"/"${f%.wav}.mp3"done
    rm 
    *.wav
    cd 
    ./"$a"'-'"$A"
    for f in *.mp3; do id3v2 "$f-"${f%.mp3}-"$a-"$A-"$y-"$g"done 
    Example of terminal entries
    doug@doug-desktop:~/Music/Jackson Browne/Late For The Sky$ ~/ape2mp3
    Artist name?
    Jackson Browne
    Name of album?
    Late for The Sky
    genre?
    81
    year?
    1974
    --- Monkey's Audio Console Front End (v 3.99) (c) Matthew T. Ashland ---
    Decompressing...
    Progress: 100.0% (0.0 seconds remaining, 14.5 seconds total) ...... ect, ect..................
    LAME 3.98 32bits (http://www.mp3dev.org/)
    CPU features: MMX (ASM used), SSE (ASM used), SSE2
    Using polyphase lowpass filter, transition band: 18671 Hz - 19205 Hz
    Encoding 01 - Late For The Sky.wav
    to ./Jackson Browne-Late for The Sky/ 01 - Late For The Sky.mp3
    Encoding as 44.1 kHz j-stereo MPEG-1 Layer III VBR(q=2)....ect.
    screen shows resulting tag info, loads fine into the ipod
    Attached Images Attached Images
    Last edited by mc4man; March 12th, 2009 at 08:07 AM. Reason: number tracks 1-9 as 01, 02, ect. if not already, | ck. your cp for link

  6. #16
    Join Date
    Aug 2006
    Location
    London, UK
    Beans
    Hidden!

    Re: Convert ape to mp3

    Thank you for that very helpful and comprehensive reply.

    Robin

Page 2 of 2 FirstFirst 12

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
  •