Sunday, December 28, 2008

Double tuners finally working

There are a lot of blind roads I got led down trying to figure this one out. To recap: Master backend in living room, slave backend in bedroom, PVR-150 in each. MBE refuses to see tuner in SBE, SBE refuses to see tuner in SBE.

Part of problem is related to both boxes defining tuner card as /dev/video0 which confuses MBE's database (not sure why). Googling 'force /dev/video1' was a mistake because the solutions to that had to do with boxes with multiple tuners, not ecologies with multiple tuners in separate boxes, and udev rules won't really fix my problem because they're more useful to fixing which device inside a box gets enumerated first.

No, what I needed was to tell the MBE that it was /dev/video1 and let the SBE stay /dev/video0. This isn't done with /etc/udev/rules.d/ rules files, this is done in /etc/modprobe/aliases with a simple line:

options ivtv ivtv_first_minor=1

Much, much easier than futzing with udev. The next step is to follow these instructions: Delete all the tuners on both boxes, set up the tuner on the SBE first (Mythbuntu deliberately doesn't have a menu option for mythtv-setup, so you'll have to run it from a terminal), then set up the tuner on the MBE. Nota Bene: you will not see the SBE tuner in the list of tuners as you create the MBE tuner. Do not freak.

Now, I have two machines which can simultaneously show separate live TV feeds, and the MBE automatically reshuffled the recording schedule to permit simultaneous recordings on both boxes. Amusingly the two tuners are known as 2 and 3 globally and each is Tuner 1 locally.

The remaining PITA at this point has to do with the audio on the new MBE: neither the VIA 82xx chipset nor the ancient Creative card I put in it allow Myth to control the volume, despite GNOME being able to do so. But the dual tuner situation has been a major victory.

Sunday, December 14, 2008

Further improvements and fixes

After years of unsuccessfully trying to have the Myth backend transcode its MPEG2 recordings (provided by the Hauppauge PVR-150's onboard MPEG2 encoder chip) down to H.264 MPEG4s which consume only a quarter the disk space, I finally managed it.

The key seems to be not using any of the default Transcoder profiles and creating a new one which is specifically MP4 based; the two Autodetect ones don't do what I expected them to and the Low-Medium-High are RTJPEG rather than MP4 (the anal retentive in me refuses to change their definition).

Commercial detection is good; what I expected was that once a recording was commercial flagged, it would automatically insert cutpoints for future DVD export. This is not the case, but if I watch a flagged recording and hit M to edit it, once in the editor hitting Z imports the commercial flagpoints as cutpoints. Sweet.

The slave backend in the bedroom does not automatically configure itself to find the videos on the MBE; however, once NFS was configured for both boxes, the slave backend's ftab now mounts the MBE's ~/ at startup and the SBE's videos directory is pointed at it.

The master backend's media settings now include /media as a directory, so that CDs/DVDs/USB sticks with standard format videos can be recognized by Myth's video player. Irritatingly, Myth still has to be told to scan the media, and incomprehensibly does not filter out files outside the list of allowed media file extensions. It also does not purge the scans when the media is removed.

Burning shows to Memorex DVD+R single layer media has had spotty results: two DVDs made with Mytharchive have reported success, but had major bad sectors resulting in unplayability. Both were exported again as DVDs using identical settings successfully (as far as I can tell from casual scanning). I don't know if Myth is doing a crap job of verifying the media.

A problem since the box swap with Mythdvd not playing discs was resolved when the udev rules for optical media were discovered to have added the new box's optical drive but not removed the old one, effectively removing /dev/dvd from the device tree. Commenting out the old one and rebooting fixed this and Myth's default DVD player now works again.

Tuner card and audio card problems are still on the "to be fixed" list.

Wednesday, December 10, 2008

More myth nonsense

The ability of Myth to burn DVDs quietly disappeared some time back and more recently for people using the Medibuntu repository. Apparently several ffmpeg-related libraries in Intrepid no longer work with Medibuntu's version of ffmpeg, and alternates had to be installed to get it to work.

I had foolishly believed that the PVR-150s could not capture closed-captioning based on several forum posts, when I tripped across something which pointed out that NTSC-capable tuners are legally required to decode this VBI information. As it so happens, all I had to do was go into Myth's preferences and tell it from now on to capture VBI CC. On this note, the maintainers should point their caption fonts at the default install's fonts directory instead of copying just two fonts to the Mythtv directory.

The bedroom slave backend needs to have its tuner assigned to something other than /dev/video0 in order to avoid conflicting with the master backend's tuner, but supposedly once this is done the MBE should be able to tune while recording.

Sunday, December 07, 2008

Nota Bene for people swapping out PCs in Myth systems

In the past I've gotten away with swapping out HDs from Linux systems to newer PCs. After the most recent swap, I noticed two things stopped working: sound volume and DVD playback in Myth's internal player. Checking the settings between the troubled backend and the slave backend did me no good; they were identical.

What had happened with the DVD was that /dev/dvd wasn't being created properly at boot. Error messages reading "can't stat /dev/dvd" turned up a search which led to /etc/udev/rules.d/70-persistent-cd.rules, the config file which describes your optical drives' default /dev/ creation. Another blogger had discovered that replacing his optical drive did not automagically bring everything up to snuff; another set of rules were added but the previous set of rules were not deleted.

I haven't nailed down the audio problem yet, but I suspect it's similar. Edit: Apparently this is a problem with Intrepid and the onboard VIA 82xx audio chipset driver. I'll be experimenting with an audio card to see what I can do there.