Archive for the ‘MythTV’ Category

no more mythtv

Wednesday, October 18th, 2006

I’m sick of MythTV, and I’m finally going to get rid of it once and for all. The thing that has really ticked me off is that in trying to archive my shows, I have to jump through so many hoops just to get my video back out in a file format that isn’t a total hack and still manage to not get it to squelch.

That’s just my latest problem, though. Myth drives me insane for a lot of reasons. Here’s all of em:
Things I hate about MythTV:

  • Stupid file format incompatible with everything else in the world (hacked NuppelVideo)
  • Lame naming scheme of recording files (like it would be hard to save a file as “TV Show - Episode Name.mpg” instead of something like 1071_20061017220000.nuv)
  • How they reinvent the wheel on freaking *everything* — let’s ignore the fact that there’s already VLC, MPlayer and Xine, we’ll just write our own internal media player! Yah!
  • Subversion tree of the fixes release branch segfaults so much you have to have create a cron job to check every few minutes if its running

Things I like about MythTV:

  • Skips commercials for me

I could go on about all the stupid things that totally nag me about mythtv, but I’ll tell you this much — it’s worth the pain of having to fast forward every now to use something that isn’t going to screw me over when I try to do something *outside* of mythtv with my files.

Even then, instead of complaining, I’m actually going to do something about it. MPlayer is already working on adding native support for the IVTV cards, and I’m going to find out what I can do to get the Plextor ConvertX working as well. It’s about freaking time we had some options, and if it means me buying some hardware and giving it to developers, well I’m definately all up for that idea.

Plus, I’m seriously starting to think of just writing my own PVR system. Nothing too exotic (definately nowhere near the compelixty of MythTV or Freevo), but something simple to just setup a recording schedule. I was looking at the xmltv data that I grabbed from DataDirect, and there is a lot of stuff in there. It would be trivial to just setup some kind of combination of cronjobs, a webpage, and mencoder to record what I schedule. It’s not that hard to say “Foo Show” is on at 5:00, see if the file already exists, if not, record it.

I’m gonna see what I can whip up. In the meantime, I’m gonna downgrade back to 0.19 of mythtv so I can at least get nuvexport working again.

mythtv 0.20 public service announcement

Monday, September 11th, 2006

MythTV 0.20 was released today. Yay. There’s a whole lotta fixes, but the one I like the most is the fading menus.

Anyway, I posted this on the Gentoo forums, but it’s worth repeating:

*BACKUP* your mythconverg database before upgrading.

If you don’t, you won’t be able to go back to 0.19-foo. The reason is because with each point release, the schema for the database changes. When you run mythbackend for the first time, it will upgrade your database schema if it needs to. But running an older version won’t roll it back, meaning you will lose all your settings and entries in ‘Watch Recordings’, etc.

Backing it up should be pretty simple. Just get the mysql connection settings from ~/.mythtv/mysql.txt

Then do:

Code:
mysqldump -u mythtv -p mythtv mythconverg > mythconverg-`date +%F`.sql

and save that file in a safe place. Heck, I would recommend doing regular database dumps anyway.

Good luck and have fun. :)

steve’s mini mythtv magical quest

Friday, September 8th, 2006

Okay, well I’ve decided to try something completely new and different — I’m going to do a lot of research, read up on all the relevant subjects, and then use my mad consumer skillz and make some planned purchases. How freaking boring.

I’ve pretty much already come to the conclusion that nothing short of a slightly beefy computer is going to cut it as a usable mythfrontend. I’m highly skeptical (hence the research part), but I think that a 1ghz mini-itx system might be able to pull it off. Apparently, there are motherboards that have onboard MPEG2 hardware decoding, taking a huge load off of the CPU on playback. I’m pretty skeptical about how easy it is to get those working too, but I’m willing to consider it.

One thing I know that would be a shoo-in replacement is using a Hauppauge PVR 350 which does both hardware MPEG2 encoding and decoding. I know right now you can use it’s S-Video out connection to watch the TV, though I kind of remember reading something about that disappearing soon or X not using it anymore or something. Gah, I really need to read up.

multiple myth backends

Tuesday, September 5th, 2006

So what do you do when you have multiple TV tuners?  You setup mutiple myth backends, too!

I actually had no idea you could even do this until yesterday, but apparently you can have slave backends for mythtv, not just frontends.  It is really cool how it works, too.  In my scenario I have two amd64 Gentoo boxes both running the 0.19-fixes svn release.  On my main master myth backend, I have the Plextor tuner and all my recordings.  Then on my slave backend I’ve got the PVR-500 with dual tuners on it.

Setting up a master-slave backend relationship is actually much, much easier than I thought.  Just run mythtv-setup, first of all, and setup the IP addresses of the machine.  Myth will know if your box is the “master” backend server if (and only if) both IP addresses are the same in the General configuration — one is for the ip of the box, and one is for the ip address of the master server it should connect to.  By default they are both set to 127.0.0.1 for localhost.  Just change those to 192.168.1.x and now others can connect to it.

Then, on the slave just set the master ip address and the subnet address for the slave too.  The only other big thing to do is make sure you setup MySQL on the master server to accept connections from the subnet.  Up until this point though, your “slave” box is just a frontend, since you haven’t really done anything with the backend.  In fact, I’m assuming the only difference between running it as a frontend or backend (or both) is if you actually start running mythbackend on that box.

I went through the rest of mythtv-setup on the backend and added the tuner cards.  The DataDirect listing showed up in my list already from the master server (wow, that’s cool) so I knew they were already talking to each other.  Then it was time to try out the little booger.  Sure enough, I could record three shows at once, and set the scheduling from either of the two frontends.  Plus, I could watch things in the library from either one, not to mention stream video from the live tv recording streams on the tuners from the other boxes.  Very cool stuff.

I started playing around with myth a bit more after that, and it started dawning on me quite a bit more how cool this application really is.  Even when you take it down to the bare basics — it is an awesome PVR.  I still remember pretty well how crappy my Comcast DVR was, mostly lack of features and huge bugs, and mythtv just totally pushes the standard.  It’s great stuff.

gentoo + mythtv: just the way I like it

Thursday, July 13th, 2006

I was just thinking to myself about all the custom tweaks and odd settings I’m using to run MythTV, and it occurs to me that it’s a miracle the thing runs at all. Especially when you add me to the equation.

Let’s take a look at some of my not-so-run-of-the-mill options:

  • Gentoo Linux (yay!)
  • amd64 (still a relatively new architecture, imo)
  • Custom kernel module settings
  • Subversion checkout of MythTV developer tree
  • USB TV Tuner with external kernel modules
  • Streamzap USB IR receiver with the remote mapped to my all-in-one
  • SPDIF digital out to receiver
  • Two RAID1 partitions
  • LVM2 spanning three harddrives
  • Slightly hacked version of mplayer
  • Matroska videos
  • Custom playback wrapper to mplayer
  • Owner who can’t seem to be content with status quo

You see, mythtv really isn’t as hard as everyone makes it out to be. All you need is some disposable income, the social skills of a caveman, a little hyper-attention and you’ll be set! And when you’re finished with it, you can show it off to your friends who by now have gotten married and have children.

It’s the American dream, I tell you. :)

success at last

Thursday, July 13th, 2006

Well, I finally got MythTV working again. And, once again, it was user error. Once I actually calmed down enough to think about it rationally (versus my previous attempts at just randomly trying configs) then I managed to start seeing what was going wrong.

The first thing I realized was that my original myth setup wasn’t using ALSA. I was using /dev/dsp as my output device, so I was using ALSA’s OSS emulation. So, when I tried watching a movie in mplayer with -ao oss, there was no sound. Exact same thing as was happening in myth — it wasn’t throwing any errors, just no sound.

So then I googled for ‘mythtv spdif’ which took me to a good mythtv guide. Then I quickly saw what had happened. I’m loading ‘alsa’ as a module, and while doing that, I have to tell the module parameters to remap everything that OSS uses to device 2, my SPDIF. Somewhere along the line of upgrading ALSA and my kernel, my original /etc/modules.d/alsa was changed back to a vanilla config file, which didn’t have those extra settings in it. That was the problem the whole time. I’m not entirely sure what overwrote it, either. ‘equery’ tells me that the file is owned by alsa-utils, but re-emerging it didn’t overwrite it. I wonder if it’s when I make the modules from the kernel that it clears it out, or something.

In all fairness, I recant my original rant about mythtv always needing some kind of external third-party config to get it working right. That is true, however, when you’re using complex setups, such as remote controls, audio receivers, and USB TV tuners. I would have had to configure things no matter what the program that used them. I was wrong.

However, I still stand by my opinion that I think it’s stupid that it was complaining about the ALSA parameters. Throw me a bone, here. Just play the stupid thing.

I’m actually glad for all the grief I went through, though. I needed to reinstall myth anyway so that I could get MythVideo back on there. I got both of those accomplished, and the new myth is looking really slick. I like it. The ‘Internal’ player is working now in MythVideo as well, but it doesn’t save the movie position still, which was my biggest hope. That’s not a big deal though, because I finally discovered a hack so that I can write my own wrapper to save position. I’ll have to post that up here another day.

And so, things are finally moving forward. With mythvideo working and a player that I can resume playback, I can finish ripping my DVDs and have everything in one central place. It’s definately all been worth the hassle to be able to watch Transformers any time I want without having to pop in a DVD. :)

mythv: a love-hate-hate-hate-hate-hate-hate-love relationship

Wednesday, July 12th, 2006

This hasn’t been my week. I finally figured out the problem with MythTV last night — it is complaining that my recordings are 48000khz, and it wants to send them through to SPDIF at 32000khz. That’s all fine and good, and I don’t mind and all … but it illustrates the main problem that I have with myth that drives me out of my freaking mind: No matter what you do to set it up, there is always something, somewhere outside of mythtv that you have to tweak just to get it to even work.

Case in point, my ALSA settings. The solution I found on the mailing list was to setup my .asoundrc in my home directory so that it would re-rate the audio files to be processed at 32k. What the freaking crap? I have an idea, why don’t you get it working like every other audio player out there that doesn’t require third-party config hacks just to get my sound working. I upgraded mplayer. That worked perfectly fine from the transition to new kernel and ALSA libraries. It didn’t complain about it not liking my kHz levels of the audio I was playing. That addresses another fundamental issue I have about myth: it tries to be “smarter” than everything else, and so instead it can’t do simple things.

While I’m ranting, here’s my laundry list of things about myth that really bug me. Now, I’ll admit, take this all with a grain of salt, because I’m not a myth developer and I don’t know if there’s a good reason behind some of these decisions. However, as a user, it sure bugs me:

  • Doesn’t record to any standard wrapper. They could use Matroska and cram everything in there, but instead they use a hacked NUV export format which everyone else has to patch their players so they can read it.
  • Doesn’t use a standard media player. It’s not enough that we have VLC, MPlayer and Xine that will already play everything under the sun, they have to have their own media player that to configure you have to go through a maze of configuration menus just to setup right.
  • Sucky configuration UI. First of all, it’s extremely confusing. mythtv-setup and then mythfronted both have places to configure stuff. Why not put it all in one place and then password protect the hardware setup? Even then, the configuration options are confusing as well. Just look at the General Setup for sound. If you flip through the options, it doesn’t even give you the choice of “ALSA:default” so you have no way of knowing how to even set that up — instead you get to google the mailing list on how to use MythTV with ALSA.

Okay, actually, that’s my only really big beefs. On the flip side, I absolutely *love* mythtv. That’s why I keep coming back to it. In all fariness, these are some of the things that I think are extremely cool, well-done, and keep me coming back for more:

  • Development and stable subversion branches. How freaking cool is that? They have a 0.19 bugfix subversion repository that you can checkout. That is awesome.
  • Commercial flagging. I absolutely love it. Works perfect about 95% of the time — other times it just skips a few seconds too much ahead. Seriously, no complaints there.
  • Scheduling engine. This thing never ceases to amaze me and probably keeps me staying with myth more than anything else (yes, including commercial flagging). I love how it knows which ones I’ve already seen. Seems simple enough, I know, but I wouldn’t want to have to code something like that.
  • MythWeb. I love it. Web programming done right. There’s a few things I’d tweak to fix it if I had the time, but by all means, just minor nags.
  • MythVideo. It lets you use any external player you want — hallelujah. It also has three display menu options, and one of them is just the way I like it.

Anyway, I really love MythTV. But I really hate it at the same time. A lot of the configuration needs to be tweaked to explain stuff in more detail, I think, and the player needs to be less anal. Then I’d be really happy.

Oh, one more bonus thing — I did end up upgrading my mythtv version (latest development snapshot), and I must say, it’s looking really nice. It’s getting better all the time.

more mythtv woes

Tuesday, July 11th, 2006

I’m convinced MythTV hates me, personally. I broke my long-standing unbreakable rule last night of never upgrading anything. And now MythTV is broken again. :)

Actually, I had to do a little tweaking. My kernel segfaulted while doing an emerge –sync. After poking around a bit, I found out that the partition was slightly corrupted (thank goodness for RAID). So I cleaned that up, and then I decided to upgrade to 2.6.16 since I’d heard that people were having success with it with my TV tuner.

The kernel upgrade actually went without a hitch. I had to upgrade my alsa libraries as well to 1.0.11, and as near as I can tell, that’s what threw myth for a loop. Naturally, everything else still works fine with ALSA (including MPlayer with all my funkalicious configs), just not this. It throws some weird error like ‘Cannot apply ALSA parameters’ or something or other when I change the audio device to “ALSA:default”. /dev/dsp doesn’t throw any errors, but it doesn’t produce any sound, either. And my mixer levels haven’t changed at all, so I’m pretty lost on what it could be.

I’m stuck with the only option that I can think of, and it scares me to death — upgrading MythTV. I’m running a fairly old 0.19 developer snapshot that’s had some bugs, but overall has been working great for me. I’m scared to touch it, but with Myth it’s always a gamble — you never know what’s gonna fix (or break) it next.

nuvexport, tv, and dvds

Thursday, June 1st, 2006

I’ve been playing around with nuvexport a bit more, and discovered that you can export to XviD with a two-pass encoding. Pretty cool. Depending on how many export features you use, it can take an incredibly long time. With all the extra options ticked on a two-pass XviD export, it took 3 and half hours to re-encode one 30 minute episode, at about 8 frames per second. When I export to DivX with no deinterlacing and no noise reduction, it runs at about 48 fps. Neither one is still quite as fast compared to just running mencoder and just re-encoding the video (about 90 fps), but I’m not quite sure what other steps nuvexport is running.

It’s not a big deal, really. I’m just glad I can actually export them to AVI in the first place. Now, though, I’ve got three shows I’m recording and manually cutting on a regular basis because the TV DVDs are completely missing in action: Malcolm in the Middle, 7th Heaven and Without a Trace.

It’s very frustrating when the studios (Fox, Paramount, Warner Bros., respectively) release only one or two seasons and then we hear nothing else for years. I’ve heard that most people won’t even buy the first season unless they see that the studio is “committed” to the series and has released more than just a few sets. Personally, I don’t much see the point of letting something so many people worked on so hard just sit on a shelf somewhere when people are willing to pay good money for it. Is it any wonder torrents are so popular? There’s some stuff you just can’t get any other way.

avidemuxxin’

Sunday, May 28th, 2006

Man, I’m stoked. :D

I spent all weekend repairing my MythTV box (which, btw, I have a lot of issues with the project as a whole … but that’s another post), and I finally got it to where I want it — working partially. Anyway, I just started playing around with mencoder to see how hard it would be to convert these files to something other than mythtv’s special nuv format (must … contain … rant…), and it actually turned out to be spectacularly simple. All I really have to do is just re-encode them so the AVI index is rebuilt.

The really cool part is coming up next though. I wanted to strip out the commercials myself, and at first I started thinking of how I could do that with mythtv’s commercial flagging. After all, it does just store the cutlist in the database, right? For the record: yes, it does, its in the recordedmarkup table, which took me a while to find out. Well, after my average research time of 2 seconds, I couldn’t find an easy intuitive way to use that to tell mencoder when to cut the video into pieces. I had heard of avidemux before, but last time I tried it (back when I was using Mandrake … eek. Nothing wrong with MDK, that was just a loooong time ago), it only crashed and burned horribly. I figured this was a good a time as any to give it a swirl.

And man, it works great. There’s this great feature it has “skip to next black frame” which pretty much finds the commercials for you. Then just set marker A and B at the start and stop of each break, cut it, and save the file and you’re done! All you need is about 15 minutes each to re-encode each NUV and then maybe 2 minutes to manually cut them, but you’ve got a great perfect looking pristine TV episode. Sweet. :)

I should mention that I already know about nuvexport, but I’ve never had much luck with that either. If anyone’s interested, here’s a raw howto I actually got this far:

  1. Set mythtv to keep original recordings (they’ll be saved as foo.nuv.old) or just don’t transcode at all
  2. Reencode from an MPEG4 NuppelVideo to an MPEG4 AVI, video only: mencoder foo.nuv.old -ovc lavc -oac copy
  3. Run avidemux2 on the AVI, cut out commercials and reencode the audio to mp3 (usually PCM audio works too, but sometimes it gets scratchy).