Linux: APE tag reader and FLAC conversion script |
![]() ![]() |
Linux: APE tag reader and FLAC conversion script |
Aug 13 2006, 22:43
Post
#1
|
|
![]() Group: Members Posts: 102 Joined: 3-January 06 Member No.: 26831 |
This post will likely only be of interest to Linux users, but it should be a big help to those who use Linux and have to work with APE files. I've written a couple programs to help manage APE files under Linux.
The first apeinfo, which is a C++ program that returns a detailed list of information about a given APE file. It's largely based on a sample program included with the Linux MAC port, and relies on MACLib provided by the same package (Monkey's Audio Codec non-win32 ports, by Matthew T. Ashland). Running it on an APE file in its default mode will yield output like the following: CODE $ apeinfo ~/ape/bitch.ape File Information File Name: bitch.ape File Size: 30232 kb APE Version: 3.99 Compression: Normal Tag Format: APEv2 Audio Information Track Length: 4:12.760 (252 s) Samples/sec: 44100 Hz Bits/sample: 16 Channels: 2 Peak level: -1 Tag Information Album: Blurring The Edges Artist: Meredith Brooks Comment: Exact Audio Copy Genre: Rock Title: Bitch Track: 2 Year: 1997 It can also be run with the -t option, which outputs the tags in VORBISCOMMENT format: CODE $ apeinfo -t ~/ape/bitch.ape ALBUM=Blurring The Edges ARTIST=Meredith Brooks DESCRIPTION=Exact Audio Copy GENRE=Rock TITLE=Bitch TRACKNUMBER=02 DATE=1997 The second program is shell script that transcodes an APE file to a FLAC file. It uses the VORBISCOMMENT output from apeinfo to migrate tag information as well. The reason I wrote these programs is because prefer the FLAC format, but occasionally have to work with APE files instead. So, I wanted an easy way to transcode the APE files FLAC files. Decoding with mac and then reencoding with flac is easy enough to do, but as far as I can tell there is no readily available program that can read APE tag information from the Linux command line. So, I fixed that problem. For anyone interested in trying it out, full details and download links can be found on the application website at http://www.legroom.net/mysoft. Any and all feedback is welcome. Hope you find it useful. -------------------- http://www.legroom.net/
|
|
|
|
Aug 13 2006, 23:30
Post
#2
|
|
![]() Group: Members Posts: 57 Joined: 2-April 03 Member No.: 5795 |
The reason I wrote these programs is because prefer the FLAC format, but occasionally have to work with APE files instead. So, I wanted an easy way to transcode the APE files FLAC files. Decoding with mac and then reencoding with flac is easy enough to do, but as far as I can tell there is no readily available program that can read APE tag information from the Linux command line. So, I fixed that problem. You’d be a hero if you could make it convert APE plus cuesheet to single FLACs while conserving the tags. I know about shntool but using it is always a longish procedure. |
|
|
|
Aug 13 2006, 23:59
Post
#3
|
|
![]() Group: Members Posts: 102 Joined: 3-January 06 Member No.: 26831 |
You’d be a hero if you could make it convert APE plus cuesheet to single FLACs while conserving the tags. I know about shntool but using it is always a longish procedure. Hmm... I wouldn't really mind trying my hand at it to see if it could be done, but I don't even know exactly what it is you're describing. Starting with an audio CD, how do I create the kind of "APE plus cuesheet" that you want to convert? -------------------- http://www.legroom.net/
|
|
|
|
Aug 20 2006, 18:06
Post
#4
|
|
![]() Group: Members Posts: 57 Joined: 2-April 03 Member No.: 5795 |
You’d be a hero if you could make it convert APE plus cuesheet to single FLACs while conserving the tags. I know about shntool but using it is always a longish procedure. Hmm... I wouldn't really mind trying my hand at it to see if it could be done, but I don't even know exactly what it is you're describing. Starting with an audio CD, how do I create the kind of "APE plus cuesheet" that you want to convert? In former times I was a proponent of CD Images with cue sheets. I’ve moved to Linux and Quod Libet now and need to cut all that into pieces. I have a VMWare machine with foobar running but accessing my big disk via samba always results in "lost write" errors. These images are usually generated by EAC with the Copy Disc (or whatever != single tracks) mode. |
|
|
|
Aug 21 2006, 07:42
Post
#5
|
|
![]() Group: Members Posts: 138 Joined: 23-December 05 Member No.: 26599 |
foobar2000 works fine (for conversion, tagging etc, not playing) under wine w/o any tunings. Why use vmware? Just put flac.exe (or lame.exe, oggenc.exe, wavpack.exe etc.) to "~/.wine/drive_c/program files/foobar2000" directory after installation of fb2k.
|
|
|
|
Aug 21 2006, 12:45
Post
#6
|
|
![]() Group: Members Posts: 57 Joined: 2-April 03 Member No.: 5795 |
foobar2000 works fine (for conversion, tagging etc, not playing) under wine w/o any tunings. Why use vmware? Just put flac.exe (or lame.exe, oggenc.exe, wavpack.exe etc.) to "~/.wine/drive_c/program files/foobar2000" directory after installation of fb2k. In needed the Windows install for other tools anyway so installing Wine seemed redundant. |
|
|
|
Aug 21 2006, 16:10
Post
#7
|
|
|
Group: Members (Donating) Posts: 482 Joined: 12-August 02 From: Cheltenham, UK Member No.: 3029 |
XP within VMWare actually works fine on my server. I use foobar2000 for tagging/replaygain/conversion to single file flac etc. The only problem was slow networking speed which I fixed using this on the host Linux box:
ethtool -K eth0 tso off It's a real pity I have to use it though as the Linux tools available just don't seem 'joined up' enough for my needs. I did strip my XP install CD to a ~130mb ISO file, removing all the crud I don't need for foobar. This lets the VM run in 192mb of memory just fine. |
|
|
|
Aug 22 2006, 13:42
Post
#8
|
|
![]() Group: Members Posts: 57 Joined: 2-April 03 Member No.: 5795 |
|
|
|
|
Aug 22 2006, 14:21
Post
#9
|
|
|
Group: Members (Donating) Posts: 482 Joined: 12-August 02 From: Cheltenham, UK Member No.: 3029 |
ethtool -K eth0 tso off May I ask why you tweak eth0? I thought the VM communicates with the host via the vmnet[0-9] adapters. No idea, it did the trick though. Does it make a difference what networking you choose (bridged, etc)? |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 22nd November 2009 - 01:29 |