Blog
Video Encoding
Date: 3/5/2005
We seem to have run out of VHS tapes at home and the machine is dying anyway so last night when I needed to record some tv (not for me) I installed the TV card drivers again and played around with the encoding settings. I have a Leadtek Tv2000 which is a basic PCI TV tuner card and it works Ok I guess. Despite it saying that it supports MPEG4 in hardware don't believe it.

The bundled PVR/record/view software 'Winfast PVR' is a mix of good and bad, firstly it gives you a functional UI to setup channels, setup encoding options and capture video. It does 'skin' everything but it looks hideous. However 15 minutes in to my hour long capture it crashed. So stability is not good enough for everyday use. Oh and you do get a hardware remote and IR receiver with it but it only worked for the first few days I had it and then died. No amount of fiddling with drivers and new batteries would resurrect it.

After recording the show I had a go at optimizing the encoding settings, because the default use of MPEG2 was a) eating all the CPU and dropping frames/audio and b) creating 2gb files for less than an hour of video. So I started by dropping the MPEG2 bitrate down to 4000, and it looked terrible. So I started exploring the other codecs. The most obvious one to try was DivX 5. So I made some test encodings, and at full rez (PAL: 720 x 576) it would drop frames badly, as the CPU (1.4ghz Athlon) would by pegged at 100%. So I tried half res (which is still watchable for TV) and it would sit around the 90% CPU mark. However when the scene pans around it has blocky artifacts which are very noticable even with the bitrate ramped up to 4000. So I kept looking and the next thing to try was Xvid. With half res video and Xvid's quality rating set to about 3.5 the output video was very watchable with only very slight video artifacts and the CPU would average about 85% load. Very nice! I checked the output avi with GSpot and it told me the file was 90% audio?!?! What the? Ok so the audio compression was set to "ogg" (my fravorite format) but according to the filesize it seems like it was actually PCM (uncompressed). So I switched to mp3 encoding for the audio and wow... the output capture files are now tiny! I'm encoding at about 250-300mb an hour, with very watchable picture quality and decent audio. Most people expect to get about 1gig/hr. So I'm doing way better than that.

When playing back these Xvid/mp3 avi files back it uses about 20% of the CPU, nice in of itself, but it does mean that I can't encode and playback reliably on my current setup (85+20 = 105%). So no Xvid PVR for me. At least until I upgrade.

Now what I need to find is a reliable capture and PVR application that I can hook into a tv guide to auto record shows of interest. That search is still ongoing. The WinFast PVR software is a) too unreliable and b) can't be scripted to record shows, their schedule file is a binary .DAT thing (grrr!). I'm hoping that some freeware app can do good video capture off a TV card... any suggestions?
Comments:
Mario Cassani
19/05/2005 7:47am
Maybe is not exactly what you are expecting but take a look at this:
http://tvtime.net/
fret
19/05/2005 11:23pm
That looks good for watching TV, but it doesn't do encoding, which is one of the primary tasks I have at the moment.
Mario Cassani
24/05/2005 5:33pm
Ehm... sorry for the misunderstanding!
On the same site, anyway, you can click on the "related sites" link and get this:
http://www.mythtv.org/
Quoting it:
MythTV is a homebrew PVR project that I've been working on in my spare time. It's been under heavy development for two years, and is now quite useable and featureful
Compresses video in software using rtjpeg (from Nuppelvideo) or mpeg4 (from libavcodec). Full support for Hardware MPEG-2 encoder cards (Hauppauge PVR-250 / PVR-350). Preliminary support for DVB cards and the new pcHDTV tuner card.

I did not tested it as the tv card I was using was not working with Linux and I was too lazy to search for a compatible tv card (in Italy it lokks like the computer shops either sell very expensive card or deal unexpensive windows only tv cards...)

Let me know...
Chris
26/05/2005 1:11pm
I have been using MythTV for a couple of years now. Using a Hauppauge PVR-350 is the best way to go. It can encode full frame DVD quality MPEG2 on a 300 Mhz machine while using practically no CPU. The hardware MPEG2 decoder output is beautifully/perfectly synced for TV output, much better than you can get using a standard video card.

MythTV's code sucks and there is a never ending stream of bugs, but it works for the most part. Although it runs on a 300 Mhz machine it would be kinda slow do to the poor design (it uses MySQL and other high overhead stuff even though the amount of data it is handling is relatively tiny). I currently run it on an 800 Mhz machine and that makes the UI responsive enough.

For Windows there is the commercial SnapStream which is suppose to be decent.

There is also FreeVo but it is seriously lacking in features and good looks compared to MythTV. Plus it's written in Python, gak.
 
Reply
From:
Email (optional): (Will be HTML encoded to evade harvesting)
Message:
 
Remember username and/or email in a cookie.
Notify me of new posts in this thread via email.
BBcode:
[q]text[/q]
[url=link]description[/url]
[img]url_to_image[/img]
[pre]some_code[/pre]
[b]bold_text[/b]