Friday, July 22, 2011

Ceton InifiniTV 4 in MythTV 0.24 - Part 3 (Mythbuntu)

In Part 2 of this article, I provided all of the instructions for setting up MythTV 0.24 to use a Ceton InfiniTV 4 cablecard tuner. Today, I'm going to provide a simple step by step that should get a Mythbuntu 11.04 user up and running with Ceton support. However, before continuing, please first read Part 2 to see all of the disclaimers and important info. I'm going to assume you've read it, and thus won't be repeating all of the important details here.

Instructions

mkdir /usr/src/mythtv
cd /usr/src/mythtv

apt-get build-dep mythtv
apt-get source mythtv
apt-get install devscripts

cd mythtv-0.24.0+fixes.20110416.9ba3ece

dch -i

This will take you to edit a file containing a changelog. At the top of the file, it will have already filled in the framework for you to enter your change info. There will be a line with a single asterisk * about 3-4 lines down. Next to the asterisk, just put a brief summery like "applying ron's ceton patch"

For the following, I'm going to assume you've put the patch file (which you can get here) in your home directory. Also, substitute the XXX in the filename with the appropriate version you've downloaded.

cp ~/ceton_mythbuntu_verXXX.patch debian/patches/
patch --dry-run -p1 < debian/patches/ceton_mythbuntu_verXXX.patch

Make sure you got no error from the above. Also please double check the output to make sure it doesn't say anything about applying the patch with fuzz. Although patching with fuzz will work at this step, when you go to rebuild the package, it won't allow fuzz.

pico debian/patches/series

Add ceton_mythbuntu_verXXX.patch at the end of the mythtv section.

debuild -us -uc -iFFmpeg

In the above command -us and -uc are necessary so that we can build the packages even though we aren't setup to sign them. The -iFFmpeg is to tell the packager not to include the FFmpeg stuff in the package. I had to do this because the build process started complaining about the binary file being different. I couldn't find any good explanations on google, but since I didn't modify anything in ffmpeg, we can just leave it out and it will use the old version.


Now at this step you are going to need to install the packages to replace the binary files with your new version. First, I want you to run the following command and make note of the timestamps on the existing files (copy the output to a text editor and hold onto it for a few moments).

ls -l /usr/bin/mythbackend /usr/bin/mythfrontend* /usr/lib/libmythtv-0.24.so* /usr/bin/mythtv-setup*

Now lets install the packages. There are a ton of packages here, and you can try to install them all if you like. However, I only bothered with the following, and everything seemed to work

cd ..
dpkg -i mythtv_0.24.0+fixes.20110416.9ba3ece-0ubuntu2_all.deb
dpkg -i mythtv-common_0.24.0+fixes.20110416.9ba3ece-0ubuntu2_i386.deb
dpkg -i libmyth-0.24-0_0.24.0+fixes.20110416.9ba3ece-0ubuntu2_i386.deb
dpkg -i mythtv-backend_0.24.0+fixes.20110416.9ba3ece-0ubuntu2_i386.deb
dpkg -i mythtv-frontend_0.24.0+fixes.20110416.9ba3ece-0ubuntu2_i386.deb


Now, let's once again look at the timestamps on the files:

ls -l /usr/bin/mythbackend /usr/bin/mythfrontend* /usr/lib/libmythtv-0.24.so* /usr/bin/mythtv-setup*

Everything should have a new timestamp on it


At this point, all of the Mythbuntu specific stuff should be setup. Now go to Part 2 of this article and continue on from step 8.




6 comments:

Dan said...

Ron, thanks for the guide. I followed your instructions to patch and build mythtv on a fresh mythbuntu 11.04 install (no updates). I'm pretty sure my cable card and infinitv are working properly as I can use the web interface to manually tune a channel, then open that stream in mplayer. However, mythtv doesn't seem to be tuning my channels properly. I setup the appropriate lineup for FIOS through schedulesdirect.org and ran your perl script after mythfilldatabase, but when I try to watch any channel I get a "Signal 100% TL__ Partial Lock" message and no video. When I look at the channels table in the database, I'm finding my freqid entries don't match the infinitv's reported frequencies in the manual tuning webpage (I cross-checked the freqid list in Frequencies.cpp). Still, I've tried updating channel entries to match the frequencies in the manual tuning page but get the same TL__ Partial Lock message in mythtv. Any thoughts?

Thanks again for sharing your work.

Dan

ken said...

Ron, I've already posted on the mythtvusers list but I thought I should write here too: Thanks so much for this great patch. I got the Ceton only when I read that you had it working and am very glad I did.

sanosuke001 said...

So I've just set up your ceton patch and I'm new to mythtv so I'm not sure if I set up the tuner/source/connection correctly. However, when I create the source, I used EID only and even though the ceton web UI states it has 190 channels, mythtv doesn't load them as available and the two buttons in the connections screen, scan for channels is disabled, and the second, fetch channels from listings source" does nothing. Any ideas? Do you think its a mythtv issue and not a ceton issue? Do I *NEED* a tuning adapter for this all to work? Thanks for the help and for your hard work on this.

Eric B said...

Ron,

Have you tried consuming a remote (think LAN, not WAN) Ceton Tuner (i.e. the Network Tuner feature)?

I've tested this ability on the windows side of the house and it's a pretty great addition to get live TV on size restricted devices (laptop, nettop,etc).

Seems like it's all based on network access. Anyway, just curious.

Ron Frazier said...

The latest version of my patch allows accessing the Ceton remotely via RTP. However, about your comment that it's nice having live tv on the other devices...that's pretty irrelevant in mythtv. Even before I added this feature, mythtv has always had the ability to have a tuner in one device and watch live tv on another. I've been using mythtv for something like 7 years now, and that feature has been there the whole time. You just need to have mythtv running on both systems (the backend on the remote system, and the frontend on the system you want to watch on).

Eric B said...

Ron, I guess I asked my question a bit awkwardly. I am aware of the front-end/back-end power of Myth.

The use case I was thinking of is using Windows Hyper-V to virtualize everything, with mythin in an Ubuntu VM. The only physical box to plug the card into is in effect remote. Anyway, thanks for the response & the code ;-)