Re: [cdg123-devs] Extracting CD+G CDs on Linux
Status: Alpha
Brought to you by:
enjolras
|
From: Miguel R. <yo...@mi...> - 2004-09-07 11:30:45
|
Hi, El Lunes, 6 de Septiembre de 2004 14:58, Steve Fosdick escribi=F3: > Hi, > > I was looking for a CD+G player for Linux and found this project. I have > downloaded and built libcdg123 and libxmms_cdg123 so the next step was to > see if I could get input data in the right format while reading the CD+G > disc on Linux. > I hope you have the version 0.0.2 of the plugin, as it fixes an audio/graph= ics=20 sync problem. > I have found the cdrdao command claims to be able to extract sub-channel > information from a CD provided the CD-ROM drive supports this. In my case > the drive did though I was only able to get this to work in raw mode > (option --read-subchan rw_raw). In this mode cdrdao appears to write a > single file consisting of a series of 2448 sectors each being the 2352 > bytes of audio data followed by the 96 bytes of sub-channel data. > I extracted some CD+G info with cdrdao a few months ago. It is possible to = do=20 but requires a lot of options tunning. > I was able to use the TOC file generated by cdrdao to split the tracks > appart and then splitting the audio and sub-channel data by reading chunks > of 2448 bytes at a time and writing the first 2352 to the audio file and > the next 96 to the sub-channel file. > > Playing the resulting files with the XMMS plugin doesn't work though - the > SDL output window cycles between black and blue backgrounds with occasion= al > junk appearing on the screen. This makes me think that the format of the > .cdg file may not be the same as the sub-channel data from the disk or th= at > the sub-channel data may still need rearranging in some way before > libcdg123 can process it. > The format of the .cdg in actually the same as the subchannel data. Each CD= =2DDA=20 frame (96 bytes) can contain up to 4 cdg frames (24 bytes each). The fact=20 that the SDL window changes color means that there is something on the file= ,=20 as libcdg123 first checks if the frame is really a cdg frame before drawing= =20 it. I am working on a new package called cdgutils that basically will contain s= ome=20 utils to extract, rip and so cdg information. But ripping subchannels in=20 Linux is almost impossible, at least in a generic way valid for most drives. > Is there a specification for the .cdg file format available publicly and = is > an extract of the .cdg test file available from anywhere? I attach the document cdgrevealed, which I used to write libcdg123. Also it= =20 might be a good idea to look at the source code of libcdg123, specially for= =20 the part of XOR tiles, as it's difficult to figure how it works from the=20 document. Miguel |