GUI Tools
I'm sure that there are many GUI tools which can do this. I know for sure that k3b supports it (though I've never tried it myself), and I assume that there are many others as well. I tend to spend most of my Linux time on the Commandline, though, and that's where I wanted to stay, so I didn't investigate this at all. If you have no such qualms about GUIness, you'll probably have an easy enough time with it. (NOTE: It's possible that even with a GUI tool, you may end up needing to mess around with the driver being used to do the burning - see my second note at the end of the cdrado section.)cdrecord
cdrecord, part of cdrtools, apparently supports CD-TEXT via two methods:- *.inf files created by cdda2wav
These .inf files aren't documented terribly well (that I've found, anyway), and the files I looked at after a test cdda2wav run looked quite cryptic. The cdrecord manpage also had this to say:If this option is used, the pregap size information is read from the *.inf file that is associated with the file that contains the audio data for a track.
I wasn't terribly keen on having to worry about the inf files changing behavior in how cdrecord was writing the actual audio data, so I decided not to go this route. Plus, it looked like I'd need a .inf for each track? Not for me. - CUE sheets
CUE sheets are very well documented (see the Wikipedia article on them) but everything I've seen on them indicates that you've got to include timing information in them (for instance, how long each track is, or at least at what point on the CD to put the data). The cdrecord manpage had this to say, in addition:Take all recording related information from a CDRWIN compliant CUE sheet file.
Once again, I don't want to have to deal with timing issues in a file which I only want to use for defining track titles. I'm happy letting cdrecord (or whatever) do the track length calculations and the like. So, I decided not to go with this option either (which takes cdrecord out of the loop.) If I'm wrong about CUE sheets requiring this info, feel free to let me know.
cdrdao
So, I turned to cdrdao for this. cdrdao uses a "TOC file" to define how to burn things, and while it's not as widely-documented as CUE sheets, the cdrdao manpage is quite helpful on the matter. It also lets the program itself figure out how long the tracks are, and where to put them on the CD, which is nice. Here's a valid TOC file which defines two tracks and sets the CD-TEXT info like I want:CD_DA CD_TEXT { LANGUAGE_MAP { 0 : EN } LANGUAGE 0 { TITLE "A Short EP Or Something" PERFORMER "Imaginary Band" } } TRACK AUDIO CD_TEXT { LANGUAGE 0 { TITLE "The First Track" PERFORMER "Imaginary Band" } } FILE "01-The_First_Track.wav" 0 TRACK AUDIO CD_TEXT { LANGUAGE 0 { TITLE "Track TWO" PERFORMER "Imaginary Band" } } FILE "02-Track_TWO.wav" 0As you can see, it's pretty straightforward. It's definitely a bit wordier than I'd like to create by hand, but a few seconds in any scripting language would be enough to create a quick template.
There's a couple of important things to note in there:
- I had PERFORMER defined for both of the tracks, even though it's the
same as the PERFORMER defined for the whole disc. This is because apparently
CD-TEXT requires that each data point used anywhere on the disc has to be
present for ALL sections of the disc. There are a number of bits of data
you can define:
- TITLE
- PERFORMER
- SONGWRITER
- COMPOSER
- ARRANGER
- CD-TEXT writing support is apparently not available by default on all
combinations of drivers/drives. By default on my burner, cdrdao was using
the generic-mmc driver, and no CD-TEXT data was making it to my
discs. It turns out that if that's the case, your best chance is to use
generic-mmc-raw instead. Here's the cdrdao commandline that I used:
cdrdao write --device /dev/sr0 --driver generic-mmc-raw -v 2 -n --eject toc.txt
(Obviously, you'd want to change some of those options to suit. The original version of this page used "ATA:1,0,0" for the --device option, but more recently I've just been using a standard device name, and that works for me.)
Browsing around in the code, it looks like the CD-TEXT capability is probably defined in dao/CdrDriver.cc, in the BUILTIN_WRITE_DRIVER_TABLE array, which starts at line 156 at the time of this writing (revision 1.48). Presumably the necessary bit is the presence of OPT_MMC_CD_TEXT in the fourth field, like the following block:
{ "generic-mmc", "HP", "CD-Writer+ 7570", OPT_MMC_CD_TEXT, NULL }, { "generic-mmc", "HP", "CD-Writer+ 8100", OPT_MMC_CD_TEXT, NULL }, { "generic-mmc", "HP", "CD-Writer+ 8200", OPT_MMC_CD_TEXT, NULL }, { "generic-mmc", "HP", "CD-Writer+ 8290", OPT_MMC_CD_TEXT, NULL },
My burner wasn't anywhere on that list, so my guess is that the generic-mmc driver won't attempt CD-TEXT writing unless it would have been included in that table. As soon as I switched to generic-mmc-raw, things started working again.
Update December 2016:
It seems that at least in some circumstances, switching to generic-mmc-raw doesn't work. If you're seeing errors similar to "receiving sense code 2 on writing" (or if it's just not working at all), you may want to try using this driver option instead: --driver generic-mmc:0x10. So the full line would look something like:
cdrdao write --device /dev/sr0 --driver generic-mmc:0x10 -v 2 -n --eject toc.txt
On my own system, this doesn't seem to be required, but others have found it necessary. See cdrdao bug #180 for potentially more info. Thanks, Markus, for sending this info my way!
Conclusion
So, there you go. cdrdao ended up doing the trick quite nicely for me, and on my burner I had to use the generic-mmc-raw driver in order for it to work (this is where the majority of my tracking-down-the-problem came into play). Hopefully this will help someone out.
Feel free to drop me an email if you find any info out-of-date in here!
Changelog
- Fixed a couple of outdated links
- Update to driver arguments
- Initial version