The Hauppauge HD-PVR is the first consumer-level analog HD capture device available. The HD-PVR is a USB device that captures the [http://en.wikipedia.org/wiki/Component_video component video outputs] and analog/optical audio outputs of any consumer device (including cable/satellite set-top-boxes, HD disk players, video game consoles, and various other home media devices). The HD-PVR is a highly popular capture device because it captures video via component output, permitting the user to capture high-definition video from most sources and without concern for encryption. In other words, since component video is not and cannot be encrypted, previously uncapturable HD sources such as satellite and premium television will now be fully accessible in MythTV. Prior to this device, component capture devices were cost-prohibitive and were not directly supportable within Linux.

The Hauppauge HD-PVR is the first consumer-level analog HD capture device available. The HD-PVR is a USB device that captures the [http://en.wikipedia.org/wiki/Component_video component video outputs] and analog/optical audio outputs of any consumer device (including cable/satellite set-top-boxes, HD disk players, video game consoles, and various other home media devices). The HD-PVR is a highly popular capture device because it captures video via component output, permitting the user to capture high-definition video from most sources and without concern for encryption. In other words, since component video is not and cannot be encrypted, previously uncapturable HD sources such as satellite and premium television will now be fully accessible in MythTV. Prior to this device, component capture devices were cost-prohibitive and were not directly supportable within Linux.

−

The HD PVR captures at resolutions from VGA/D1 (480i) up to 1080i, and encodes the component inputs in real time using the H.264/MPEG-4 video codec and the AAC audio codec. The streams are multiplexed into a slightly modified MPEG-2 Transport Stream container. Capture resolution is dependent on the source (ie 720p video will be captured as 720p, 1080i as 1080i, etc.) but the bitrate is user-selectable from 1 [[Megabit|megabit/second]] up to 13.5 [[Megabit|megabits/second]]. The H.264 video codec is, bit-for-bit, up to 40% more efficient than the MPEG-2 video codec commonly used in US HDTV broadcasts today. A 13.5 Mb/s H.264 stream is roughly equivalent to a full-channel-bitrate MPEG-2 recording at approximately 19 Mb/s.

+

The HD PVR captures at resolutions from VGA/D1 (480i) up to 1080i, and encodes the component inputs in real time using the [[H.264]]/MPEG-4 video codec and the AAC audio codec. The streams are multiplexed into a slightly modified MPEG-2 Transport Stream container. Capture resolution is dependent on the source (ie 720p video will be captured as 720p, 1080i as 1080i, etc.) but the bitrate is user-selectable from 1 [[Megabit|megabit/second]] up to 13.5 [[Megabit|megabits/second]]. The H.264 video codec is, bit-for-bit, up to 40% more efficient than the MPEG-2 video codec commonly used in US HDTV broadcasts today. A 13.5 Mb/s H.264 stream is roughly equivalent to a full-channel-bitrate MPEG-2 recording at approximately 19 Mb/s.

−

The HD-PVR uses modern codecs capable of exceptional compression rates at excellent quality. The tradeoff is that decoding H.264 material is very processor-intensive. If not using [[VDPAU]], even systems which easily play back US broadcast HD are likely to fail altogether when playing back a recording from the HD-PVR. Hauppauge recommends a dual-core CPU as a minimum if not using VDPAU; a frequently cited minimum for medium-bitrate H.264 playback is a Core 2 Duo 1.8 Ghz processor. [[HD Playback Reports]] acts as a repository for processor requirements to play high definition material. HD-PVR users are encouraged to contribute to the page to ascertain real-world playback requirements with MythTV.

+

The HD-PVR uses modern codecs capable of exceptional compression rates at excellent quality. The tradeoff is that decoding H.264 material is very processor-intensive. If not using [[VDPAU]] or [[VDA]], even systems which easily play back US broadcast/cable MPEG-2 HD are likely to fail altogether when playing back a recording from the HD-PVR. Hauppauge recommends a dual-core CPU as a minimum if not using VDPAU; a frequently cited minimum for medium-bitrate H.264 playback is a Core 2 Duo 1.8 Ghz processor. [[HD Playback Reports]] acts as a repository for processor requirements to play high definition material. HD-PVR users are encouraged to contribute to the page to ascertain real-world playback requirements without VDPAU or some other form of hardware-accelerated playback with MythTV.

In all HD-PVR firmwares later than 1.0.3.53, AC-3 multiplexing via S/PDIF is available, allowing one to multiplex the original 5.1 channel audio track into the captured stream. To enable this functionality, be sure to set the audio input to S/PDIF by editing the capture card definition in mythtv-setup and setting the preferred input device to S/PDIF.

In all HD-PVR firmwares later than 1.0.3.53, AC-3 multiplexing via S/PDIF is available, allowing one to multiplex the original 5.1 channel audio track into the captured stream. To enable this functionality, be sure to set the audio input to S/PDIF by editing the capture card definition in mythtv-setup and setting the preferred input device to S/PDIF.

+

+

== Hardware versions ==

+

Hauppauge sells several h.264 high-definition encoders.

+

+

The '''[http://www.hauppauge.com/site/products/data_hdpvr.html 1212 HD-PVR]''' is the original product. After the company discovered that many who purchased the HD-PVR did so not for recording high-definition television but to capture their video game play to upload to YouTube, it introduced the '''[http://www.hauppauge.com/site/products/data_hdpvr-gaming.html 1445 HD-PVR Gaming Edition]''', with the following minor differences:

+

+

# Comes with cables for connecting a PlayStation 3 or Xbox 360 instead of component cables for a cable or satellite settop box.

+

# Does not come with an IR blaster output cable (it still has an IR sensor); one can be [http://store.hauppauge.com/accessories2.asp?product=blaster purchased from Hauppauge for $7].

+

# The Windows software it comes with is different.

+

# The light that signals recording status is a different color.

+

+

If the prices of the 1212 and 1445 are the same buy the 1212, but if the 1445 is cheaper then buy it and get the component and IR cables separately.

+

+

The '''[http://www.hauppauge.com/site/products/data_colossus.html 1414 Colossus]''' is a PCI-based encoder card. [http://www.gossamer-threads.com/lists/mythtv/users/490834#490834 It does not have Linux support].

+

+

The '''[http://www.hauppauge.com/site/products/data_hdpvr2-gaming.html 1482 HD-PVR2 Gaming Edition]''' is an USB-based external encoder. Along with component video, it can capture [[HDMI]], but does not support [[HDCP]]. It does not support 5.1 or greater audio over HDMI, and unlike the 1212/1445 it lacks an S/PDIF input so cannot capture 5.1 sound that way. [http://www.gossamer-threads.com/lists/mythtv/users/528092#528092 It does not have Linux support].

== Configuring the HD-PVR in MythTV ==

== Configuring the HD-PVR in MythTV ==

−

MythTV includes support for the HD-PVR from v0.22 and up. See below for caveats and setup information.

+

MythTV includes support for the HD-PVR from v0.22 and up. See below for caveats and setup information.

==== Caveats ====

==== Caveats ====

Line 34:

Line 50:

If you have the ir_kbd_i2c module loaded, this can cause the HD-PVR to hang after a short amount of recording (60-120 seconds). Remove this module via 'rmmod ir_kbd_i2c' and try again if this is affecting you.

If you have the ir_kbd_i2c module loaded, this can cause the HD-PVR to hang after a short amount of recording (60-120 seconds). Remove this module via 'rmmod ir_kbd_i2c' and try again if this is affecting you.

+

+

The HD-PVR is unable to capture [[closed captioning]] data while recording. [[Captions With HD PVR|A workaround is possible]] if another tuner is available.

==== Steps to Add the HD-PVR as a Capture Device in MythTV (0.22 or later) ====

==== Steps to Add the HD-PVR as a Capture Device in MythTV (0.22 or later) ====

Line 56:

Line 74:

*Firmware ''1.6.29207'', dated July 27, 2011 causes oversaturation and color issues with the encoding of the analog signal. Until this is resolved, you do not want to upgrade to this version. Version 1.5.7, from June 17, 2010 appears to work. Hauppauge has acknowledged the issue and provided a link to the earlier firmware for non-Windows systems on their support page: [http://www.hauppauge.com/site/support/support_faq_linux.html] Hauppauge HD-PVR support. A patch has been submitted upstream to fix this issue and it has been merged into Linux kernel v3.3-rc5.

*Firmware ''1.6.29207'', dated July 27, 2011 causes oversaturation and color issues with the encoding of the analog signal. Until this is resolved, you do not want to upgrade to this version. Version 1.5.7, from June 17, 2010 appears to work. Hauppauge has acknowledged the issue and provided a link to the earlier firmware for non-Windows systems on their support page: [http://www.hauppauge.com/site/support/support_faq_linux.html] Hauppauge HD-PVR support. A patch has been submitted upstream to fix this issue and it has been merged into Linux kernel v3.3-rc5.

−

*[http://hauppauge.lightpath.net/software/hd_pvr/hdpvr_1.7.1.30059.zip Version ''1.7.1''], dated March 25, 2012, stability is 'much improved'. Previous versions would not handle the input signal switching its resolution making it hard to use reliably in MythTV. 1.7.1 now it rides right through without exiting the recording! The oversaturation and color issues that surfaced in version 1.6.29207 is ''still'' present (even with kernel 3.4.3). This, however, is easily fixed with a call to

+

*[http://hauppauge.lightpath.net/software/hd_pvr/hdpvr_1.7.1.30059.zip Version ''1.7.1''], dated March 25, 2012, stability is 'much improved'. Previous versions would not handle the input signal switching its resolution making it hard to use reliably in MythTV. 1.7.1 now it rides right through without exiting the recording! The over-saturation and color issues that surfaced in version 1.6.29207 is ''still'' present (even with kernel 3.4.3).

+

+

If you still experience problems with stability, a small kernel module re-load script is included below in the [[#Bitrate_and_Picture_Controls|Bitrate and Picture Controls]] sub section that re-loads the kernel modules and acts like a power cycle on the HD-PVR.

+

+

=== Over-saturation and Color Solution ===

+

+

If you run firmware versions 1.6.29207 or 1.7.1.30059 you may experience over-saturation and color issues. This is easily fixed with using one of the following solutions. Only the last one worked for me, but as always YMMV. No matter which route you go, the following command will always need to be run:

:: sudo may or may not be required depending on permissions. I did not need it.

−

If you still experience problems with stability, a small kernel module re-load script is included below in the [[#Bitrate_and_Picture_Controls|Bitrate and Picture Controls]] sub section that re-loads the kernel modules and acts like a power cycle on the HD-PVR.

+

The first place you can run this is in a startupScript. Simply have it run when your mythtv backend boots up. Since every distro is different please consult your distro's documentation on how to add it.

+

+

The second place you can run this is in your channel change script. I use 6200ch as my channel changer. In order to run the above code I created a script and use that script in mythtv-setup for my channel change program. Here is mine:

Next, open "mythtv-setup -> System Events -> Recording started" and give it the path to your new script (/opt/bin/setHDPVR.sh). Repeat for the "LiveTV started" event. After that, every time a recording starts it will run the fix and your recording should have proper colors.

#Do it a few times, sleeping in between. there seems to be some timing issue

+

#waiting for the hdpvr device to be ready after recording starts.

+

for count in 1 2 3;

+

do

+

fix_hdpvr_color;

+

sleep 1;

+

done

+

</pre>

+

+

Put this script in /usr/local/bin or /opt/bin and configure it as an event handler in your MythTV backend setup.

== Miscellaneous Kernel Module Options ==

== Miscellaneous Kernel Module Options ==

Line 372:

Line 466:

# Plug the IR emitter in to the HD-PVR. Affix the sticky portion to the front of your set top box, aligned towards the box's IR receiver.

# Plug the IR emitter in to the HD-PVR. Affix the sticky portion to the front of your set top box, aligned towards the box's IR receiver.

# Install LIRC as appropriate for your distribution. '''Note''': If your distribution does not package a sufficiently recent copy of LIRC to include support for the HD-PVR IR emitter, you may need to compile it yourself.

# Install LIRC as appropriate for your distribution. '''Note''': If your distribution does not package a sufficiently recent copy of LIRC to include support for the HD-PVR IR emitter, you may need to compile it yourself.

# Download the [http://www.blushingpenguin.com/mark/lmilk/haup-ir-blaster.bin HD-PVR IR firmware](yes, this is different than the firmware running the HDPVR). Put the firmware in your distribution's firmware directory, (commonly /lib/firmware).

# If necessary (usually not), set LIRC to start at boot (''service lirc on'' in Fedora, or ''update-rc.d lirc defaults'' in Debian-based distributions)

# If necessary (usually not), set LIRC to start at boot (''service lirc on'' in Fedora, or ''update-rc.d lirc defaults'' in Debian-based distributions)

Line 421:

Line 515:

</pre>

</pre>

−

== Possible Countermeasures ==

+

== Limitations ==

−

+

−

Some UK television providers (notably Virgin and Freesat) have attempted to counter the HD-PVR and similar devices by selectively [http://bbcfreesathdtvblog.blogspot.com/2008/05/humax-foxsat-component-connection.html disabling the component outputs] of their set top boxes. In the US, the Motion Picture Association of America has [http://arstechnica.com/news.ars/post/20080608-mpaa-wants-to-stop-dvrs-from-recording-some-movies.html requested] that the Federal Communications Commission allow providers to disable the component outputs of their devices when showing recently released movies.

+

−

+

−

There is a new solution to this countermeasure. A company called [http://www.hdfury.com HDFury] makes HDCP-compliant HDMI converters. The HD-FURY2 converts HDMI input into sound and component outputs. It is available from http://www.curtpalme.com. The original HDFury converts HDMI to RGB. It is available from [http://www.monoprice.com Monoprice] or http://www.curtpalme.com. The RGB output of the HDFury can be converted to component with a second device called [http://www.curtpalme.com/Box1020.shtm Box1020]. A user with an HDMI-only device could use the following path to convert HDMI to component video:

At the time of this writing, the original HDFury and Box1020 cost approximately $210 US. The HD Fury2 sells for $249 US, but it eliminates the need for the Box1020 and adds a host of picture quality and stability improvements. Some users will be put off by the high cost and circuitousness of the solution, but for an increasing number of MythTV users, it may be the only option.

+

Some UK television providers (notably Virgin and Freesat) have restricted the HD-PVR and similar devices by selectively [http://bbcfreesathdtvblog.blogspot.com/2008/05/humax-foxsat-component-connection.html disabling the component outputs] of their set top boxes. In the US, the Motion Picture Association of America has [http://arstechnica.com/news.ars/post/20080608-mpaa-wants-to-stop-dvrs-from-recording-some-movies.html requested] that the Federal Communications Commission allow providers to disable the component outputs of their devices when showing recently released movies. In the US, the FCC granted [http://www.mpaa.org/resources/cd3d4fa0-218d-482b-8388-0e4b0c19ab35.pdf the waiver] in specific conditions.

The Hauppauge HD-PVR is the first consumer-level analog HD capture device available. The HD-PVR is a USB device that captures the component video outputs and analog/optical audio outputs of any consumer device (including cable/satellite set-top-boxes, HD disk players, video game consoles, and various other home media devices). The HD-PVR is a highly popular capture device because it captures video via component output, permitting the user to capture high-definition video from most sources and without concern for encryption. In other words, since component video is not and cannot be encrypted, previously uncapturable HD sources such as satellite and premium television will now be fully accessible in MythTV. Prior to this device, component capture devices were cost-prohibitive and were not directly supportable within Linux.

The HD PVR captures at resolutions from VGA/D1 (480i) up to 1080i, and encodes the component inputs in real time using the H.264/MPEG-4 video codec and the AAC audio codec. The streams are multiplexed into a slightly modified MPEG-2 Transport Stream container. Capture resolution is dependent on the source (ie 720p video will be captured as 720p, 1080i as 1080i, etc.) but the bitrate is user-selectable from 1 megabit/second up to 13.5 megabits/second. The H.264 video codec is, bit-for-bit, up to 40% more efficient than the MPEG-2 video codec commonly used in US HDTV broadcasts today. A 13.5 Mb/s H.264 stream is roughly equivalent to a full-channel-bitrate MPEG-2 recording at approximately 19 Mb/s.

The HD-PVR uses modern codecs capable of exceptional compression rates at excellent quality. The tradeoff is that decoding H.264 material is very processor-intensive. If not using VDPAU or VDA, even systems which easily play back US broadcast/cable MPEG-2 HD are likely to fail altogether when playing back a recording from the HD-PVR. Hauppauge recommends a dual-core CPU as a minimum if not using VDPAU; a frequently cited minimum for medium-bitrate H.264 playback is a Core 2 Duo 1.8 Ghz processor. HD Playback Reports acts as a repository for processor requirements to play high definition material. HD-PVR users are encouraged to contribute to the page to ascertain real-world playback requirements without VDPAU or some other form of hardware-accelerated playback with MythTV.

In all HD-PVR firmwares later than 1.0.3.53, AC-3 multiplexing via S/PDIF is available, allowing one to multiplex the original 5.1 channel audio track into the captured stream. To enable this functionality, be sure to set the audio input to S/PDIF by editing the capture card definition in mythtv-setup and setting the preferred input device to S/PDIF.

Hardware versions

Hauppauge sells several h.264 high-definition encoders.

The 1212 HD-PVR is the original product. After the company discovered that many who purchased the HD-PVR did so not for recording high-definition television but to capture their video game play to upload to YouTube, it introduced the 1445 HD-PVR Gaming Edition, with the following minor differences:

Comes with cables for connecting a PlayStation 3 or Xbox 360 instead of component cables for a cable or satellite settop box.

Configuring the HD-PVR in MythTV

MythTV includes support for the HD-PVR from v0.22 and up. See below for caveats and setup information.

Caveats

Once the tuner has been added as an encoder in MythTV, it is vital that the user not access the tuner in outside programs such as cat, VLC, and mplayer. This can lead to MythTV's connection with the driver becoming unstable, and subsequent recordings failing until the driver is reloaded and power is cycled on the HD-PVR.

The last sync with libavcodec did greatly improve stability when playing material from the HD-PVR. If you still get playback crashes, try compiling myth with --disable-ssse3.

For Motorola STBs, it is also important to set the "4:3 Override" option to Off or Stretch. For some Motorola STBs, both the aspect ratio settings and output resolution controls can be found by powering down the STB and then pressing the Menu button.

Myth can become non-responsive due to run-away "mythbackend --generate-preview" processes. If you check your mythbackend logs and see it being flooded with ac3 or faac errors, it is likely the "generate-preview" process doing it. A "pkill -f generate-preview" will return your myth system to a usable state. You may even want to add that pkill to a cron job.

The HD-PVR previously had problems gracefully dealing with resolution changes but those issues have been fixed in MythTV. You can now allow your receiver to float between 480i, 480p, 720p and 1080i without causing the HD-PVR or MythTV to hang.

If you have the ir_kbd_i2c module loaded, this can cause the HD-PVR to hang after a short amount of recording (60-120 seconds). Remove this module via 'rmmod ir_kbd_i2c' and try again if this is affecting you.

Steps to Add the HD-PVR as a Capture Device in MythTV (0.22 or later)

Compile the driver and test it for proper operation as described above (if necessary)

Run mythtv-setup, and enter option 2, Capture Cards.

Add a new capture card. When prompted, select "H.264 Encoder Card (HD-PVR)" as the card type. Set the /dev/video node to the number of your HD-PVR. Finish adding the new capture card. You can also set the audio input on this screen. All cables must be functional and properly attached in order for capture to succeed with the HD-PVR. If every recording fails with a "Unknown type, recording width was 0" error in the mythbackend log, it is possible that one of your cables is faulty or has become disconnected.

Enter option 3, "Video Sources." Set up a video source for your HD-PVR's tuner as described in the manual.

Enter option 4, "Input Connections." Connect the video source to the appropriate input on the HD-PVR. Important Note: You must set a channel change script for the HD-PVR to work properly. If you don't care about channel changes, you can set it to /bin/true, but there absolutely must be a channel change script defined. Important note 2: You must leave Preset tuner to channel empty or LiveTV and channel changes will not work.

Assuming you followed the directions carefully, you should now be able to record with the HD-PVR. If you get "Select Timeout" errors, these can sometimes be overcome by stopping the backend, removing the hdpvr module, cycling the power on the HD-PVR, modprobe-ing the hdpvr module, and restarting the backend.

You can set the bitrate for the HD-PVR by going into Recording Profiles, and editing the profiles associated with HD-PVR encoders. These recording profiles have bitrate settings for low (480i/p), medium (720p), and high (1080i) resolution material, allowing you to set appropriate bitrates based upon the resolution of the material. If the max bitrate is set lower than the average bitrate, the result is CBR (constant bit rate) at the rate specified by the average slider. If you want VBR (variable bit rate), set the max slider to maximum, and then use the average slider to achieve the desired bitrate.

Firmware Version Stability

Firmware versions earlier than 1.5.6 should update the firmware as soon as possible. Hauppauge has fixed a bug that can under certain conditions cause the HD-PVR to become inoperable.

Firmware 1.5.7 may have issues with MythTV 0.25 and live TV .

Firmware 1.6.29207, dated July 27, 2011 causes oversaturation and color issues with the encoding of the analog signal. Until this is resolved, you do not want to upgrade to this version. Version 1.5.7, from June 17, 2010 appears to work. Hauppauge has acknowledged the issue and provided a link to the earlier firmware for non-Windows systems on their support page: [1] Hauppauge HD-PVR support. A patch has been submitted upstream to fix this issue and it has been merged into Linux kernel v3.3-rc5.

Version 1.7.1, dated March 25, 2012, stability is 'much improved'. Previous versions would not handle the input signal switching its resolution making it hard to use reliably in MythTV. 1.7.1 now it rides right through without exiting the recording! The over-saturation and color issues that surfaced in version 1.6.29207 is still present (even with kernel 3.4.3).

If you still experience problems with stability, a small kernel module re-load script is included below in the Bitrate and Picture Controls sub section that re-loads the kernel modules and acts like a power cycle on the HD-PVR.

Over-saturation and Color Solution

If you run firmware versions 1.6.29207 or 1.7.1.30059 you may experience over-saturation and color issues. This is easily fixed with using one of the following solutions. Only the last one worked for me, but as always YMMV. No matter which route you go, the following command will always need to be run:

sudo may or may not be required depending on permissions. I did not need it.

The first place you can run this is in a startupScript. Simply have it run when your mythtv backend boots up. Since every distro is different please consult your distro's documentation on how to add it.

The second place you can run this is in your channel change script. I use 6200ch as my channel changer. In order to run the above code I created a script and use that script in mythtv-setup for my channel change program. Here is mine:

Next, open "mythtv-setup -> System Events -> Recording started" and give it the path to your new script (/opt/bin/setHDPVR.sh). Repeat for the "LiveTV started" event. After that, every time a recording starts it will run the fix and your recording should have proper colors.

Firmware Versions

The firmware version reported by the HD-PVR device on Linux is not the same version number as the driver package for Windows. The table below shows the driver package filename for installation on Windows, the date of the driver package (when downloaded directly from Hauppauge's site, this is from the timestamp of the file on their server), the date of the firmware ROM files within the driver package (the hcwhdpvr.rom file), and the version of the firmware reported on Linux. The majority of these driver packages can be downloaded from http://hauppauge.lightpath.net/software/hd_pvr/ or http://www.shspvr.com/ftp/download/wintv-hdpvr/.

Driver Package Filename

Package File Date

Firmware ROM Date

Firmware Version

hdpvr_1.0.3.46.zip

2008-05-23

hdpvr_1.0.3.47.zip

2008-06-13

hdpvr_1.0.5.3_whql.zip

2008-11-18

hdpvr_v1.0.5.301.zip

Mar 20 2009

2009-03-11

0xf

cd-hd-pvr-v22f.zip

2009-05-07

0x12

hdpvr_1.5.6.1.zip

Nov 24 2009

2009-05-07

0x12

2010-05-12

0x14

hdpvr_1.5.7.0.zip

Jul 02 2010

2010-06-23

0x15

hdpvr_1.6.29199.zip

Jul 22 2011

2011-07-20

0x16

hdpvr_1.6.29207.zip

Aug 01 2011

2011-07-27

0x17

hdpvr_1.6.29277.zip

Nov 14 2011

2011-10-19

0x18

hdpvr_1.6.29333.zip

Dec 06 2011

2011-11-30

hdpvr_1.6.29353.zip

Dec 23 2011

2011-11-30

0x1a

hdpvr_1.7.1.30059.zip

Mar 26 2012

2012-03-07

0x1e

Firmware Upgrade Process

The firmware on the device cannot be upgraded through a GNU/Linux system at this time. Use the following process within a physical MS Windows installation: (it is known to not work from VMWare Fusion, or with VirtualBox running on OS X)

Connect the HD-PVR to your computer via the USB cable and connect the power

A window may pop-up asking you if you want to search for a driver, press the cancel button if possible

Run the executable in the folder you created above

If necessary, your firmware will be updated

Disconnect the HD-PVR and reconnect to your backend system

Hardware Stability and Troubleshooting

While the majority of users have used the HD-PVR trouble-free for years, many users have reported various issues in regards to stability of the HD-PVR device itself. These issues usually materialize either as 0-byte recordings or heavily damaged (i.e., artifacts) within MythTV. There are a few different theories on what can cause these issues, as well as a variety of solutions to try.

A few things known to impact the stability of the device:

Heat

Bad Power Supply

Bad USB Hub/Port

Improperly connected equipment / Bad cables

A few things to try if you discover you are having intermittent failures of recordings from the HD-PVR:

Power Cycle The Device - Many times, you can power cycle the device either by pushing the power button, or pulling the power cord, and it may resolve any recording issues (for new recordings from that point on). Of course, this may be a temporary band-aid rather than an actual fix - but it all depends if the failures were a one-off or recurring. If failed recordings happen very infrequently, then simply power cycling the device manually may be a sufficient "fix". If it happens a little more frequently, you could also consider leveraging an "HD-PVR Killer Device" which monitors HD-PVR recordings within MythTV and determines if they are 0-byte. If so, the device will automatically power cycle the device for you. The device was created by a MythTV developer who was experiencing sporadic failures where the HD-PVR wouldn't successfully record until power-cycled.

Ensure Proper Cooling - Some people have reported that the device will become unstable if it gets too hot. Make sure the unit is properly ventilated. Some people have added fans to circulate air across the device, and some have even modified their HD-PVR to include a fan that blows directly into the case. However, this shouldn't be necessary as long as you make sure you use common sense on where you HD-PVR is stored (i.e., in a space that's properly ventilated, not covered up, not next to other hot A/V equipment, etc.)

Check / Replace your power supply - Some of the very early delivered models of the HD-PVR had defective power supplies. Hauppauge offered to replace many of these power supplies as they were believed to have defective capacitors in them causing them to fail or become unreliable. Users who had seen repeated instability (often degrading over time) with their HD-PVRs have reported that their devices were once again performing solidly once replaced with a new power supply.

Try a Different USB Port - Some users have reported a bad USB port and/or bus on their motherboard. Try switching ports to see if that helps.

Ensure Good Cables / Tight Connections - The HD-PVR can be finicky if it doesn't receive a good signal. A bad signal could be caused by dozens of reasons, many of which may not have to do with the HD-PVR at all. The first thing to make sure of is that your cables are good and that they are tightly and securely connected to both the HD-PVR and the device it is recording from.

HD-PVR Driver Compilation Howto

Note: As of Linux Kernel 2.6.30 the driver for the HD-PVR is now included by default. However, the driver may not have the necessary bits to enable the IR transmitter. You only have to follow this procedure if

your kernel does not include the driver

you want to use the IR transmitter and those bits are not in your kernel

you need a newer driver (A newer driver may also be necessary if you have a newer device as Hauppauge introduced a new USB device ID for the F1 revision.)

Fedora 12 (and above) includes backports of the relevant drivers for the HD-PVR and IR Blasting, no compilation is necessary.

Ubuntu 10.10 (as well as MythBuntu) do not have the IR driver bits. In addtion, the USB ID for the latest hardware revision (Rev F1) isn't detected. Compiling from the source is necessary to correct this.

Ubuntu 11.04 and above, as well as MythBuntu, includes the relevant drivers for the HD-PVR and IR Blasting, no compilation is necessary.

Note: This how-to has been upgraded to support a more current kernel versions (2.6.32 and greater). The historical Mercurial [instructions] may still work on older kernels.)

Currently, firmware loading is unimplemented in the driver. As a result, if you have a "rev c1" or newer unit you must install the HD-PVR at least once on a Windows machine to load the firmware into it. If you have a Revision 2 unit (including a sticker marked "rev c2" on the bottom of the unit) then it will come loaded with a firmware. Once you have done so, you will need a working build environment, git, and kernel headers installed on your system. In Debian and debian-based distros, the following command should install all necessary dependencies to build the driver.

sudo apt-get install build-essential git linux-headers-`uname -r`

On some systems (e.g. Ubuntu 10.04), it is git-core instead of git, so use:

If compilation fails with timblogiw.c:XXX: error: implicit declaration of function 'mfd_get_data' then edit v4l/.config, and change any line like CONFIG_*_TIMBERALE to equal n Then rerun "make" and continue on.

If compilation fails due to an error with the firedtv driver, then edit the file "v4l-dvb/v4l/.config" and change the line: "CONFIG_DVB_FIREDTV=m" to "CONFIG_DVB_FIREDTV=n". In addition, changing all lines to "=n" except for CONFIG_VIDEO_HDPVR will greatly speed up compile time.

For other errors, realize that keeping the latest media tree code compiling on older kernels is a losing battle. If you report build failures to linux-media@vger.kernel.org you'll usually either see them fixed and/or receive suggested workarounds.

If compilation and installation succeeded, it should be possible to load the HD-PVR driver with:

sudo modprobe hdpvr

If dmesg only shows "registered new interface driver hdpvr" and no /dev/video# device has been created, you probably have a newer device than your kernel module supports.

If dmesg shows "wrong firmware version," and "device init failed," then you did not install the device in Windows first and the firmware has not been loaded. Install the HD-PVR on a Windows machine, install the drivers, and after that the device should work fine in Linux.

In Ubuntu, the module may fail to load and refer you to the dmesg command. If this happens, reboot and see if the error resolves itself. It is also possible that Ubuntu is prioritizing another, older copy of the v4l-dvb modules above the one you just installed, and the HD-PVR will fail because the two versions do not match. Try a command like:

locate cx88-dvb.ko |grep `uname -r`

This will search for the cx88-dvb kernel module, which is provided in the Hg tree you just built, and also in default Ubuntu installs. If you see more than one copy of this file, you may need to move the older versions out of the way. In at least one case, alternate versions of all the modules were located in "/opt/ltsp/amd64/lib/modules/kernel version number/ubuntu/". The symbol mismatch was solved by moving the "/opt/ltsp/amd64/lib/modules/kernel version number/ubuntu/media" directory into a backup directory in the user's home, then rebooting.

Testing the Driver

Even if you didn't compile your own kernel module, you should always test your box outside of MythTV before trying inside of MythTV.
Once the module has loaded successfully, you can check dmesg for output and to determine which /dev/video node it has created. You can then test the device as with any hardware encoder:

cat /dev/video1 > test.ts

Press your interrupt character (usually ctrl-C) to stop the capture, and play it back with any compatible media player (i.e., mplayer, xine, mythfrontend).

Bitrate and Picture Controls

The HD-PVR driver is compatible with the v4l2-ctl command line utility included in ivtv-tools. To see a list of adjustable controls, use the following command:

v4l2-ctl --device=/dev/video0 -l

Substitute the correct video# in the example above. The following controls are presently supported in the driver:

Control Name

Values

Default

Description

brightness

0 to 255

134

Brightness picture control over recordings.

contrast

0 to 255

128

Contrast picture control over recordings.

hue

0 to 255

128

Hue picture control over recordings.

saturation

0 to 255

128

Saturation picture control over recordings.

sharpness

0 to 255

128

Sharpness picture control over recordings.

audio_encoding

3 to 4

3

Control for audio encoding. 3=AAC, 4=AC3.

video_encoding

2

2

Non-adjustable control for video encoding (H.264).

video_bitrate_mode

0 to 1

1

Control for VBR versus CBR. 0=VBR, 1=CBR.

video_bitrate

1000000 to 13500000

6500000

Bitrate control over recordings in bits, from 1 Mbit/s to 13.5 Mbit/s.

video_peak_bitrate

1100000 to 20200000

9000000

Peak bitrate control in bits, from 1.1 Mbit/s to 20.2 Mbit/s.

You can adjust any of these values with a command like:

v4l2-ctl --device=/dev/video0 --set-ctrl=controlname=value

Or, for example:

v4l2-ctl --device=/dev/video0 --set-ctrl=video_bitrate=13500000

This command will set the bitrate to the maximum of 13.5 Mbit/s for the HD-PVR at /dev/video0.

The audio_encoding selection only works for PCM input. If the HD-PVR is fed AC3, then AC3 will always be multiplexed into the H.264.

Note that the picture controls did not have any known effect prior to firmware version 0x16 (1.6.29199).

Firmware 0x16+ Picture Control Defaults

Control Name

Values

Default

Description

brightness

0 to 255

128

Brightness picture control over recordings.

contrast

0 to 255

64

Contrast picture control over recordings.

hue

0 to 30

15

Hue picture control over recordings (shown as even numbers between -30 and 30 in Windows).

saturation

0 to 255

64

Saturation picture control over recordings.

sharpness

0 to 255

128

Sharpness picture control over recordings.

Until a patch that sets the new defaults is committed to the kernel, you can use

Put this script in /usr/local/bin or /opt/bin and configure it as an event handler in your MythTV backend setup.

Miscellaneous Kernel Module Options

Several options exist that may be of assistance when troubleshooting or for certain use cases. If the audio output is too low, you can boost the audio signal by adding the following module option for the hdpvr module:

boost_audio=1

If you wish to see more verbose dmesg output, you can use the following module option:

hdpvr_debug=#

Where # = an integer between 1 and 7, increasing in level of verbosity.

video_nr=#

Sets the device node to /dev/video#

default_video_input=#

default video input: 0=component, 1=S-Video, 2=composite

default_audio_input=#

default audio input: 0=RCA back, 1=RCA front, 2=S/PDIF.

Note: For firmware 0xf, default audio input must apparently be set to 2 to enable spdif/optical recording. This does not change the encoding default (AAC) and does not up-convert to 5.1 if the spdif/optical input is stereo. Simply edit /etc/modprobe.d/hdpvr.conf to have this info (without quotes): "options hdpvr default_audio_input=2". If this doesn't work for you or if you want to be able to easily change it on the fly, try this script.

IR Transmitter Support

As of September 1, 2009 IR Blasting and receiving is tentatively working. Jarod Wilson has created patches for the lirc and hdpvr drivers. He's in the process of having his patches approved and committed.

For Ubuntu/MythBuntu 10.10 the above compilation process was necessary.

Ubuntu/MythBuntu 11.04 currently has built-in support for the HD-PVR's IR Blaster. Follow the steps below to enable the IR transmitter.

Note: As of April 2011, numbers of users have reported instability if the HD-PVR is configured as an IR receiver. To workaround this, make sure that "options lirc_zilog tx_only=1" is set in the modprobe.conf or /etc/modprobe.d/hdpvr.conf depending on the distribution

The HD-PVR, as with many other Hauppauge on-card emitters, only supports a fixed set of IR codes. The HD-PVR includes a wide variety of codes for most common set top boxes, but it may or may not contain codes for special buttons like arrow or menu buttons. See below for more information on codesets and lircd.conf.

Compile LIRC Modules for IR Transmitter Support

The HD-PVR's IR Blaster must be supported in both the LinuxTV driver and the LIRC driver. If your distribution doesn't include support for the IR Blaster you may build it yourself. Follow the steps mentioned above to download and compile the hdpvr driver from linuxtv.org (lirc_zilog.ko and lirc_dev.ko are also included in that process).

Load the LIRC module (sudo modprobe lirc_zilog) and check dmesg for errors. Note: Be sure the HD-PVR firmware file is in place before you load the driver. If the firmware is missing, modprobe will segfault and the new modules may lock up.

Steps to Enable IR Transmitter

Plug the IR emitter in to the HD-PVR. Affix the sticky portion to the front of your set top box, aligned towards the box's IR receiver.

Install LIRC as appropriate for your distribution. Note: If your distribution does not package a sufficiently recent copy of LIRC to include support for the HD-PVR IR emitter, you may need to compile it yourself.

Download the HD-PVR IR firmware(yes, this is different than the firmware running the HDPVR). Put the firmware in your distribution's firmware directory, (commonly /lib/firmware).

Download the lircd.conf file and place it where your distribution keeps LIRC configuration files (commonly /etc/lirc/).

If necessary (usually not), set LIRC to start at boot (service lirc on in Fedora, or update-rc.d lirc defaults in Debian-based distributions)

Find the LIRC hardware.conf file in the LIRC configuration directory and edit it to include the following. If the HD PVR is the only IR device attached to your system, make sure and comment out all other TRANSMITTER and RECEIVER blocks that may already be in there. You may have to adjust the device and socket values depending on your particular setup.

#Chosen IR transmitter

TRANSMITTER="HD-PVR"

TRANSMITTER_MODULES="lirc_dev lirc_zilog"

TRANSMITTER_DRIVER=""

TRANSMITTER_DEVICE="/dev/lirc0"

TRANSMITTER_SOCKET=""

TRANSMITTER_LIRCD_CONF=""

TRANSMITTER_LIRCD_ARGS=""

Restart LIRC and if needed load the module, lirc_zilog (modprobe lirc_zilog). Check dmesg to see if the module has successfully loaded. Check your devices (e.g. ls /dev/lirc*). If the HD-PVR is the only device attached, then /dev/lirc0 and /dev/lircd should be the only devices. If there exists an lircd1 then hardware.conf may not be set up properly.

When the STB changes power state, the terminal will show which command set was used. Edit /etc/lirc/lircd.conf and remove the codes you don't need and (optionally) rename the ones you do. For instance 0_125_KEY_POWER becomes KEY_POWER.

At this point the IR transmitter should send the codes properly to the STB. Channel changes will still require a channel change script. (In this example, 0_74 was the remote number supported.)

Limitations

Some UK television providers (notably Virgin and Freesat) have restricted the HD-PVR and similar devices by selectively disabling the component outputs of their set top boxes. In the US, the Motion Picture Association of America has requested that the Federal Communications Commission allow providers to disable the component outputs of their devices when showing recently released movies. In the US, the FCC granted the waiver in specific conditions.