Archive for July, 2006

‘the incredible hulk’ and other extreme ownage

Tuesday, July 18th, 2006

It’s time for another DVD release update. Well, at least of the ones that I’m interested in. :)

Season one of The Incredible Hulk came out today, and I’m soooo excited to get my copy. I actually went to Wal-Mart last night after midnight (I kid you not) to mull around and see if they had stocked it yet. None of their new tags had anything that looked like it, so I left. I guess I’ll have to go to Best Buy or Circuit City and pay their ridiculous high prices. But, no price is too high to have the blessing of the kind green monster in your own home.

This series release is actually very exciting for a number of reasons. For one, I have always loved this show from the moment I saw it. It’s actually a good series of human interest stories as David Banner spends his life wandering and helping people on the way. But when people tick him off, watch out buddy, cuz the Hulk mysteriously appears and gives the bad guys the smackdown of a lifetime. His wardrobe cost must be enormous, with the way he rips all his pants and shirts.

The second cool thing about this one is that Universal finally did the right thing and released a full season set. Before, they released a smattering of DVDs just to annoy us real collectors, and did stuff like “The Best of” and “The Death of” the Incredible Hulk. Now you can enjoy everything including the great pilot episode.

Next week, and I already wrote about these, Animaniacs and Pinky and the Brain are coming.

In August, there are two more classic Hanna-Barbera cartoons coming to DVD. This time, Magilla Gorilla and Hong Kong Phooey. I’ve never seen any Magilla Gorilla cartoons, but I do remember Hong Kong Phooey really well. That show was freaking hilarious. Also, I love how Warner Bros. is releasing all this classic animation on DVD. Personally, I’m holding out for The Hair Bear Bunch and Captain Caveman.

Then in September, Voltron is finally coming to DVD! Yay! If you don’t remember, this was the classic kids cartoon where they had those five warbots and they would all join together to create Voltron, who would kick some serious booty. Good times. Teen Titans, season two is also coming. I actually just ripped season one the other day and started watching it … in fact, it’s been one of the ones I’ve been testing my whole variable-framerate encoding on … and let me say, it is a great show. The animation style is just like the other super-hero ones (Batman, Superman, Justice League, etc.), but they have taken a few liberties in style. It took me a while to get used to but now I really like it. Great stuff.

After that, in the sometime future, there are still some good releases lined up. Coming sometime soon is Star Trek: The Animated Series. Now, I’ve never seen one episode of this, but I’m sure going to get me a copy anyway. I’m sure it can’t be all that bad, especially as I’ve noted how it seems to be a real collector’s item to own over the years. Plus, you gotta check out the cool box art it’s gonna have.

The last one that I’m waiting for with baited breath is Dungeons & Dragons. I *loved* this show as a kid. It was cool, it was magical, and the kids kicked even more booty. It was a lot of fun. I just found out yesterday that the entire season is already on sale in the UK, so if you’re really up for converting stuff from another DVD region, hop on over to amazon.co.uk.

Oh, and how could I forgot? The new Star Wars DVDs come out in September as well, these are the ones that are the original screen version. I’m excited for that one, I really don’t like the new changes much.

That’s it for now … stay tuned to find out how you too can stay broke this month and many more to come by buying … pretty much every DVD you ever wanted. :)

stupid blogs

Monday, July 17th, 2006

I feel the need to rant.

Why don’t some stupid blog hosting websites have a link to the RSS feeds right on the page? There’s already 95,232 links on there, would adding ONE more absolutely kill you? Instead, I have to open up Firefox to load up the page (some of us use Mozilla, ya jerk), click on the little RSS icon, add it to my bookmarks, edit the bookmarks, grab the URL and then copy it into my RSS reader.

This would all be much simpler if they just added a stinking link.

Whoops, I just noticed mine doesn’t even have one. Well, it does, but with the stupid feed: in front of it. I better go fix that. Heh.

fun with mplayer: on-screen display

Sunday, July 16th, 2006

Yes, it’s time for another exciting episode of “Will Steve Ever Stop Tweaking?” I think we all know the answer to that one by now.

Anyway, now that my main problems are out of the way, I’m onto playing with other cool features that I never really cared about since my PVR wasn’t living up to my extreme level of standards. This time, I’ve been fooling around with LIRC. The reason is because I use an all-in-one remote that controls everything (TV, receiver, MythTV, DVD player and VCR) and it has a lot of buttons on it.

One of the buttons it has on there is an “Info” button. I thought it would be nice to setup the OSD (on-screen display) to tell me how far along in the media file I am when I pushed that little button. So, I did some research and it’s really not that hard.

First of all, you need to pick a font to use for the display. By default, mine didn’t have one and I was getting an error that said “osd text out of range” and all I would see was the Play button. The mplayer docs tell you to just pick a TrueType font to use, and then pass it in the CLI arguments. In their example, they use arial.ttf though I imagine you can use whatever one you like.

I ran locate arial.ttf and only came up with one hit from the corefonts package located at /usr/share/fonts/corefonts/arial.ttf. I fired up mplayer with that as the option, mplayer -font /usr/share/fonts/corefonts/arial.ttf movie.mkv and pressed the ‘o’ key to toggle OSD output, and it worked that time. :)

I don’t like passing CLI arguments, though, especially when I can cram them all in my ~/.mplayer/config file. So just add font=/usr/share/font/foo.ttf and you’ll be done with that.  Next up is configuring LIRC to display that stuff. We’ll be playing with buttons, so be sure to wash your hands for this step.

Looking at the mplayer docs again says that there are four OSD levels. The default is 0, none. You can play with them to see which one you like by hitting ‘o’ and cycling through the options, or just running -osdlevel as an argument. Myself, I like #3, “volume bar + seek bar + timer + total duration of media” so that’s what I want to set it to display in my config.

Using the slave commands as a reference, which also act as LIRC events (see ‘mplayer -input cmdlist’ for a shortened version), you can see that osd [level] will turn on the display.
Open up ~/.lircrc/ and add an entry for the button you are pushing to display your preferred OSD level:

begin
prog = mplayer
button = green
config = osd 3
end

After I did that, though I realized there was one little problem. The display doesn’t go away. That’s easy enough to fix, though. As I discovered yesterday, if you put *another* config line after that one, then LIRC will cycle through those options. So, to turn it back off, just add another line telling it to reset back to 0. The end result would look like this:

begin
prog = mplayer
button = green
config = osd 3
config = osd 0
end

And there you go. Now you can have a pretty OSD telling you the current playback position and the time left in your favorite show with the flick of a button. Love is all around, baby!

fun with mplayer: save / resume playback script

Sunday, July 16th, 2006

I must be on a roll. I just got my other big problem with mplayer solved: resuming playback. :)

It turns out that MPlayer has a lot more slave / LIRC events than I knew about, and one of them is ‘get_time_pos’ which prints out the current playback position to stdout. With that, I was able to write a php shell script to save that value to a file, and read it on playback and seek to that position. Pretty cool stuff.

Here’s the script, I’ve added it to my SVN repository for bend: http://spaceparanoids.org/trac/bend/wiki/mplayer-resume

Right now the only problem it has is that it’s PHP5 dependent, and only then because I use file_put_contents() and file_get_contents(). I haven’t been using PHP4 for a long time, so I was too lazy to make it backwards compatible, but I’ll fix it later.

I’ve documented how to use it in the script, so everything is already covered there. I’ve been testing it and it works great. Now I can seek chapters on my video files and leave and come back anytime I want. I’m pretty excited about that. :)

ask, and ye shall receive

Saturday, July 15th, 2006

One of my biggest beefs about media players (if you haven’t noticed yet) is the lack of support for my favorite media wrapper, Matroska. If you don’t know what that is, just ask me next time I’m around, and watch me shift into extreme-fanboyism explanation mode. Simply put, though, its similar in concept to AVI, but far superior in features.

My favorite part of it is you can have chapters in any Matroska file just like you can in an DVD. The reason I want something like that so badly is for two reasons. One is that once I have a feature in one format, I’ll go stir crazy until I have it another. The second one is that the chances of me sitting through one movie in an entire sitting are pretty low. My threshold is at about an hour, max.

So, if I leave and come back often … I want to be able to *quickly* get to where I left off. Either by resume playback completely (I’m working on that one) or skipping to the next chapter. No, I don’t want to skip ahead 5 seconds / minutes / hours. I want to skip to the next chapter.

My whole point of this is that it finally occurred to me to actually ask for this feature on the MPlayer mailing list instead of constantly complaining that it didn’t have it. Well, much to my surprise, someone much smarter than me posted a patch just a few hours later, and to make a long story short … it works great. :D

I’m hoping it gets included into the main program soon. That would be really cool. I’m still just really stoked that my most wished-for mplayer feature got added. Not to mention that it was really easy just to ask for it. :) I really should try out this strange thing called “communication” some more.

new problems gone, old problems back

Thursday, July 13th, 2006

Will the mythtv saga ever end? Will Steve ever be happy? Isn’t that way too many Twinkies in your cupboard? In answer to all three … probably not.

I have this strange little psychological tick that turns on anytime I encode video from a professionally formatted source (basically anything I didn’t make myself). I always think I can see that the A/V is out of sync. In reality, I can’t tell if it is or not. But after staring at people’s lips for a few hours straight, you’ll probably start to believe anything.

There actually is one legitimate problem though, and I know I’ve encountered these issues a long time ago and decided on using what I am now (transcode over ffmpeg / mencoder, an “fps” flag in the database, etc.) but for the life of me I can’t remember why.

The problem is that DVDs come in three different framerates: 29.97, 23.97 and a mix between the two. To handle the matter, I’ve got a trinary flag in the database. The default value will let transcode decide how to process the framerate. In most cases, that works just fine for me. Most DVDs are either 29.97 fps, or start off for a second or two in 23.97 and then switch to 29.97 for good.

Then there are my good friends that just switch back and forth between scenes from one framerate to the other — variable framerate. I know it sounds crazy, so here’s an example:

Starting playback...
VDec: vo config request - 720 x 480 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
VO: [xv] 720x480 => 720x540 Planar YV12
A:  44.8 V:  44.8 A-V: -0.007 ct:  0.076  16/ 13 ??% ??% ??,?% 0 0
demux_mpg: 24000/1001fps progressive NTSC content detected, switching framerate.
A:  62.3 V:  62.3 A-V: -0.002 ct:  0.296 203/200 11%  0%  2.0% 0 0
demux_mpg: 30000/1001fps NTSC content detected, switching framerate.
Warning! FPS changed 23.976 -> 29.970  (-5.994005) [4]    2.0% 0 0
A:  62.7 V:  62.7 A-V:  0.024 ct:  0.325 215/210 11%  0%  2.0% 0 0
demux_mpg: 24000/1001fps progressive NTSC content detected, switching framerate.
A:  63.9 V:  63.9 A-V:  0.009 ct:  0.386 246/240 11%  0%  2.0% 0 0
demux_mpg: 30000/1001fps NTSC content detected, switching framerate.
Warning! FPS changed 23.976 -> 29.970  (-5.994005) [4]    2.0% 0 0
A:  64.4 V:  64.4 A-V:  0.038 ct:  0.421 261/253 10%  0%  1.9% 0 0
demux_mpg: 24000/1001fps progressive NTSC content detected, switching framerate.
A:  74.3 V:  74.3 A-V:  0.013 ct:  0.182 672/664 11%  1%  4.5% 0 0
Exiting... (Quit)

Now, I can’t remember what I used to do about this problem. I think I used to force transcode to save the new file to 23.97 frames per second. I’d rather drop some frames on the 29.97 than try to stretch out the other ones, after all. Testing this stuff isn’t easy though. You have to stare at a lot of lips and try and convince yourself that you really can see a difference of a few milliseconds.

To solve my little problem (or to put my mind to rest, whichever’s easiest), I have three ideas:

1. Tell mplayer to fix the a/v sync on playback

MPlayer has an “autosync” feature (see the man page) that you can use to tweak how often it looks to see if the audio is delayed. I tried flipping it on on one pass, and I thought I could see an improvement (although, it was a cartoon so who knows if the lip sync was ever correct in the first place), and then I tried it while watching a live-action show with it turned on, and it seemed like the sync was off. So, who knows. One thing I’ve learned from all of this is that it’s not likely there’s going to be a setting that will work for every scenario.

2. Use some funky transcode flags

In transcode’s docs directory, theres a framerate.txt file that talks just about adjusting framerates. It even mentions the exact problem I’m running into … “Some video sources are not of constant framerate. This is mostly true for Anime and some DVD Releases of TV series.” Doh!

They then have this huge example using flags I’ve never even read up on before, so that seems kinda scary. There is one, though, that I noticed in the man page, –hard-fps, which will “disable smooth dropping (for variable fps clips)” and is off by default. That might be my ticket, too.

3. Don’t do anything

There’s always the exciting option of assuming that the developers of these multimedia applications are just a twinge more genius than I am, and that by using the defaults on everything, that things might just turn out fine. I’m not sure where the fun is in that, though.

When I’m encoding more than a thousand episodes of TV shows ranging from 6 to 60 minutes in length, I have a tendency to be a little picky. Eventually though, I’m sure I’ll just settle in and start watching the shows and not even realize that it’s transcoded from the original and that the A/V is off by 3/1000th of a second. And hopefully I’ll forget all about their lips, too.

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. :)

“the right to control…”

Wednesday, July 12th, 2006

Okay, so the news is starting to pick this stuff up. PC Magazine has a good writeup about it that covers the rights, while the Salt Lake Tribune fails to cover that stuff in detail whatsover.

What really irks me is this quote from the federal judge in California, “The right to control the content of the copyrighted work … is the essence of the law of copyright.” I thought the fundamental purpose of copyright was who has rights to copy something, not control it’s post-purchase status. Apparently I missed that boat.

Plus, the slashdot zealots are still at it with more nonsense, “This decision is based on the same principle that powers the GPL: The right to control Derivative Works! The GPL could not control the terms licences of derivative works without the basic right to control derivative works!”

By that same ruling, any “editing” that I do personally is also a derivative work. So, I guess now it’s against the law to rip a DVD myself and take out parts of it, since I’m creating a “derivative work.” Someone sue me.

While I personally don’t use or care too much about the businesses that “clean” the films, I do find it insane that our rights are being trampled on so much more, and I can’t understand why more people don’t see this as a copyright and fair use issue more than anything else.

I’m tempted to help out Jacob and start a site just with mplayer edit decision lists and distribute them for free so people can ignore the “naughty bits”, if only to piss off Hollywood even more.

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.