Stag’s Head Karaoke

GD Star Rating
loading...

Stag’s Head Karaoke

As usual, last Thursday I headed down to the Stag’s Head on Campus for Karaoke.

Mark (our DJ) was already there with John from Entz and I decided to give them a hand (I always have done, and it’s good fun). Mark told me he’d bought some new discs for the system. The next question was how to import them.

Courtesy of a little research I’d done just before Christmas, I knew of PyKaraoke and more importantly, cdgtools. cdgtools is a set of programs designed for converting a CD+G disc into CDG and MP3 files. The software we have takes AVI files (which are XviD encoded). Of course, the first bit wasn’t going to be the challenge. I could get as far as CDG and MP3 files. It was the last stage to get them into AVI format. I guessed ffmpeg, the swiss army knife of AV conversion would probably suffice for this, and I was right, although I did have to compile it from source to get CDG support.

Of course, Entz really want a system where you put in a CD, and leave it and it’ll import it. Come back half an hour later and swap the discs and press go again. They’d also like it to run on Windows.

I already knew of the ffmpeg autobuilds so that wasn’t going to be an issue porting to Windows (less any issues with broken builds). cdgrip and friends were python programs, so that would be OK. It just left one part of the puzzle – cdrdao. cdrdao is a Disc-At-Once reader and writer for CDs. cdgrip can’t work on a raw disc, but it can work on a table-of-contents and binary image of a disc. Hence the need for cdrdao to make an image of the disc with its table of contents. I was completely unaware, until yesterday, of fetal.de’s cdrdao binaries for windows. Armed with a Windows version of cdrdao, ffmpeg, lame, cdgrip and python, I set to work on making it easy to import tracks for Karaoke.

On Thursday night, I managed to get the conversions working flawlessly, but I failed to get the video portion of the avi file working on the Karaoke PC. It simply didn’t want to work. I think I’ve now figured out why – the machine is Windows XP with just the software on it (and not much else). The karaoke software included with it the XviD codec. Every file must be correctly tagged with “XVID” for Windows Media Player to read it. Not “xvid”, “XVID”. We’ll find out whether it works properly on Thursday this coming week.

Back to the Windows conundrum – how to make it easy? The answer lies in writing a C#.NET app that runs cdrdao, cdgrip (with lame), and then ffmpeg in the right sequence, followed by prompting for track names (or grabbing them from the CDDB if possible). That app is now pretty much done and we’ll test it on Thursday, but man it’s been fun working out how to make everything work!

OK, ECS hasn’t taught me all of this, and most of it was from my previous experiences with Linux, and a few random coincidences, but still, only an ECS student would think up a way to link N programs together to make it do something special. Anyone want to see my few-hundred-odd line BASH script that pulls a load of data from a Bromcom School Management database and converts it to csv and then creates the relevant groups and users in active directory? I think not.

GD Star Rating
loading...

Leave a Reply

Your email address will not be published. Required fields are marked *