Personal tools
You are here: Home Service Personal Video Recorder
Document Actions

Personal Video Recorder

Notes on putting together a server-based PVR using a media hub (HTPC killer)

Project Goals

A server-based Personal Video Recorder (PVR) using open-source software and affordable hardware including an existing desktop computer. This approach avoids the need for a Home Theater PC (HTPC) that sits idle most of the time. Instead, it uses a media hub (thin Linux client) to fetch the media content from the server to one or more conventional entertainment systems.

Hard requirements: access to music, video, photos

Soft requirements: web access via TV, HDTV

Hardware

Software

PVR Card Notes

The Hauppauge WinTV-PVR-150MCE NTSC card finally works!! I am using Gentoo Linux with a 2.6.11-gentoo-r6 kernel configured as described here and running on a Shuttle XPC SK41G. I call this machine the shop vac because of the excessive fan noise. After a lot of fiddling with earlier version of the IVTV driver, version 0.3.8 works completely out-of-the-box.

MythTV Notes

By default, MythTV records video content at fairly high resolution (480x480) and bitrate (up to 6000 kB/sec) taking up about 2.3 GB per hour. I later changed the default recording profile to be within the DVD-compatible half-D1. This format is considered adequate for recording from S-video sources and takes up about 1.2 GB per hour. My specific parameters are:

  • video resolution: 352x480 (NTSC)
  • video bitrate: 2360 kbps
  • video frame rate: 29.97 fps
  • audio sampling rate: 48 kHz (unchanged)
  • audio bitrate: 224 kbps

Transcoding to this format worked for me using ffmpeg like so:

   ffmpeg -i in.mpg -target svcd -s 352x480 -b 2360 -acodec copy out.mpg

Specifying "-target svcd" seemed to be the easiest way to get all other parameters right.

There is one remaining problem: these recordings are missing the VOBU structure required by the VOB format for DVDs. This structure can be created very fast using ffmpeg:

   ffmpeg -i in.mpg -target dvd -vcodec copy -acodec copy out.vob

Linux-PAM Warning

After logging in as a non-root user, the permissions for the Video4Linux devices should read as follows:

  bash-2.05b$ ls -l /dev/v4l
  total 0
  crw-rw----  1 root video 81,  64 May  8 20:45 radio0
  crw-rw----  1 root video 81, 224 May  8 20:45 vbi0
  crw-rw----  1 root video 81,   0 May  8 20:45 video0
  crw-rw----  1 root video 81,  24 May  8 20:45 video24
  crw-rw----  1 root video 81,  32 May  8 20:45 video32

If that is not the case, Linux-PAM might be interfering with the udev permissions. The symptom is failure to record and "permission denied" errors in the MythTV backend logs. I finally figured this out after major distress caused by several missed telenovelas. In /etc/security/console.perms, make sure this line is commented out:

  #<console>  0600 <v4l>        0660 root.video

Media Hub Notes

The MediaMVP media hub, actually a diskless Linux system, is booting off my Gentoo Linux server using dhcp/tftp. It runs mvpmc as a MythTV front end and accesses other media content on directories mounted using NFS or CIFS.

I started with a precompiled binary for dongle.bin.mvpmc. Unlike described here, the mvmpc software seemed unable to find recordings using only the Myth protocol. It started working once I configured it to access the recordings via NFS.

Other Hardware Options

D-Link MediaLounge DSM-320
$155 at buy.com
Elgato EyeHome
$180
Pinnacle ShowCenter
$250 | TWINSBYTE review
PRISMIQ
$150 | PriceGrabber reviews
Neuston MC-500
not available in USA?

Resources

Acknowledgments

Special thanks to the developers of IVTV, MythTV, mvpmc, and the other excellent software used in this project for providing such high-quality software under the open source model.