June 14, 2006

comclean2.bat

I did have to make some changes to some of the .ini and .bat files to get the whole comskip thing to work - it didn't work straight out of the box as it were. Comskip and comclean2 can be downloaded from here. Extract the files into your GBPVR directory. Cuttermaran can be downloaded from here. Extract the files to a temp directory and run the setup.exe file to install. Here's the changes I made:

1. Edited PostProcessing.bat in the GBPVR root directory to enable comskip and comclean2.bat - at the end of the file I think you have to un-comment the comskip line. Anyway, it looks like this at the end of the file, minus the comments:
comskip %1
:continue
call comclean2 %1
:eof

2. Edited comskip.ini file to enable creation of files needed by cuttermaran:
output_cuttermaran=1
output_demux=1

3. Edited comclean2.bat:
Rem bbdmux "%~dpn1.mpg" 0xe0 "%~dpn1.m2v"
Rem bbdmux "%~dpn1.mpg" 0xc0 "%~dpn1.mp2"

I remarked out these two lines because comskip demuxes the mpeg file when you set output_demux=1 as in step 2, so these two lines become redundant.
ren "%~dpn1_clean" *.m2v
This is the thing that drove me nuts - cuttermaran was creating a _clean file with no extension, but mplex1 expected a file ending with .m2v. It didn't help that mplex1 doesn't give any error message when it doesn't succeed in finding the file. This line renames the needed file with the appropriate .m2v file extension.
del "%~dpn1*.info"
del "%~dpn1*.txt"
del "%~dpn1.log"
del "%~dpn1.cpf"

There's a lot of useless files littering the directory when the process is done, I elected to delete them. If you don't mind the mess or you're debugging a problem, just leave these lines out.
if EXIST "%~dpn1_clean.mpg" del "%~dpn1.mpg"
if NOT EXIST "%~dpn1.mpg" move "%~dpn1_clean.mpg" "%~dpn1.mpg"

More cleanup, I delete the original file and leave the edited file with the original's name. I am risking getting stuck with a bad file if there's a problem with the editing process, but what the hell, I like to live dangerously. Plus, this leaves my directory with only one file, the edited mpeg of the recorded show. Nice and neat.

I think that's all I did. Hopefully this will help anyone having problems getting this thing to work. Oh yeah, in the GBPVR configuration program, under the processing tab, I have Commercial Detection set to None, I think that's just for using the comskip program during recording, the other way that I haven't tried yet.

Posted by Fungii at 08:41 PM

GB-PVR Icons

GB-PVR doesn't come with icons for any of the TV channels, you have to assemble those yourself. I got a bunch from LyngSat Logo, a pretty awesome resource for creating a collection of station logo icons. You need to put the icons in the proper directory - mine is D:\GB-pvr\media\ChannelLogos but I think if you used the default install directory for GB-PVR, it would be something like: C:\Program Files\devnz\gbpvr\media\ChannelLogos. Anyway, you also need a text file named TV Channels List.txt that associates each icon with a station number. The entries follow this template:
CFCN 3 CFCN - where channel 3 is associated with a file called 3 CFCN.jpg.

Here's my collection of icons for Shaw Calgary, it's not complete but it has most of the analogue channels that you can record with a tuner card. The ABC logo is a bit lame with the blue background, I should change that. My TV Channels List.txt is in there too.

StationIcons.rar

Posted by Fungii at 08:31 PM

GB-PVR

Last weekend I got a bit fed up with the "Scheduler" software that came with my Hauppauge tuner card. There's no way to set the quality for recordings in the damn thing, it goes by the last setting in the WinTv program. Well, last time I used it I must have done a VCD recording, because my scheduled recordings since then have been total shit looking. I was going to try hacking something together, but I heard good things about the GB-PVR software and it's free, so I thought what the hell, I'll give it a shot.

Wow, it's a pretty cool program, not perfect [more than a few bugs] but I'm so impressed I really want to put together a seperate, full-fledged HTPC, instead of running it off and on from my only PC that I do pretty much everything on. It downloads TV listings from a website like Zap2It and then you use those listings as an on-screen guide to see what's on and to schedule recordings. The menus are navigable via the Hauppauge remote as well as from the PC mouse and keyboard. You can download or create "skins" to customize the look of the program. There are also tons of plugins to add even more functionality, like the weather plugin that gives you your local weather forecast at the push of a button. You can also listen to radio, net-radio, mp3's, cds, watch divx movies, DVDs, rip DVDs and re-encode them... the list is endless!

Main Menu GB-PVR

[you can see a little graphical glitch in this screenshot - the current time is displayed overtop "Main Menu" - there are a lot of little niggles like that in there but it's still a great product!]


Another thing I found out about during this little experiment is the program comskip, that you can run during recording or immediately afterwards via a batch file [PostProcessing.bat]. It analyses the video file to locate the commercials and then you can run a program like cuttermaran [via another batch file, comclean2.bat] to actually snip out the commercials, leaving you with a pristine, commercial-free recording. I had my doubts that this would work, but with the few recordings I've done, it worked perfectly, I couldn't even tell where most of the commercials were snipped out. Awesome! Beats the hell out of removing them manually.

I did have a couple problems right off the bat though. The first was with the viewing window for the main menu. My desktop is set to 1280x1024 but my video card only outputs 1024x768 to my TV, so my desktop is not entirely viewable on my TV's "cloned" display. I got around this by "locking" the display on my TV to the upper left corner of my desktop so it wouldn't pan anymore. Then I edited GB-pvr's shortcut on my desktop so that it displays in the upper left corner, in a window sized at 1024x768. [D:\GB-pvr\GBPVR.exe -pos:0,0,1024,768] Now GB-pvr's window fills my TV's entire screen.

But the problem with that setup is that you also see the window's frame displayed on the TV, which looks pretty lame. I tried the -noframe switch to get rid of the frame, which worked but I lost the use of my remote that way. The iremote software uses the window frame's title to translate commands from the remote depending what program is running. But with the noframe attribute set, the window essentially has no name, therefore it refuses to obey commands for that window. I think you can get around this limitation by getting the window's handle instead and using that to translate commands from the remote, but I found a simpler hack. I simply positioned the window further and further "offscreen" until the frame was no longer visible -> D:\GB-pvr\GBPVR.exe -pos:-5,-27,1024,768. This almost worked, except then the bottom of the frame came into view. A problem easily fixed simply by increasing the size of the window -> D:\GB-pvr\GBPVR.exe -pos:-5,-27,1024,778. It worked, no more frame on my TV!

Another problem which became readily apparent was the on screen display [OSD] used when watching live TV. It was mostly offscreen, I could only see about the top half. I was trying to find out how to reposition the damn thing, but the fix was even simpler. I just had to set an element in an XML file [config.xml] from 1.05 to 1.00 and my OSD magically reappeared where it should be.
<HorizontalZoom> 1.00 </HorizontalZoom>

OSD

Posted by Fungii at 06:15 PM

June 03, 2006

Hooked new hard drive up to DVD player

I picked up a 250 GB Maxtor hard-drive from Future Shop earlier this week, a great deal at $99. Then I got a VANTEC Nexstar 3 Aluminum 3.5" Enclosure to put it in. It was easy to install, just hooked up the IDE cable and the power supply and screwed it all back together. After hooking it up to my computer, I used the MaxBlast software to partition and format it as a FAT32 drive, which just took a couple minutes. Then I dumped about 20 GB of MP3 files on it and hooked it up to my DVD player via the USB cable. And it works!! Woohoo! I'm surprised I didn't run into any problems, everything went so smoothly. Now I gotta rip a bunch of my DVDs and stick them on this thing. I figure I can put all 7 Buffy seasons on it, which should run around 50 GB or less using XVid. That'll be so cool to have every episode available at a touch of a button.

I just wish I could implement some kind of DVD type menu for this thing. The menu system this player uses is crap. It only reads DOS 8.3 filenames, it doesn't read MP3 ID tags, no playlists, and it's kind of ugly and clunky. When you first start it up without a dvd in it, it read the USB port and the entire directory structure of the hard drive. It doesn't take very long, but I wonder how much room it has in ram to store all that info. If I fill up the entire 250 GB of hard drive space, it's going to have a hell of a lot of filenames to load. Heh, I guess I'll find out.

It's also very quiet - the enclosure doesn't have a fan, it just uses the aluminum case as a heat sink. And the hard drive itself is pretty damn quiet. I only wish my computer was this quiet!

Update: I appear to have discovered the file number limit - 3000 items. I'm going to have to figure out a way around that as I can load way more than 3000 files on a 250 GB drive.

Update2: I got rid of some files and restarted the hard drive with my dvd player. It still couldn't find my missing files! For some reason it couldn't read one of the directories, cause when I moved the files to a directory I knew it could read, the files were found, no probs! So there might not be a 3000 file limit after all. I'll have to do some experimenting to find out what the hell is going on.

Posted by Fungii at 03:55 PM