Monthly Archives: February 2007

General

Psychology of info-space navigation

I’m also fascinated by the psychology of getting around in unfamiliar info-spaces. In order to find a workaround for my problem outlined in Geek TV: open source rocks, I had to:

  • find anchor points
  • learn terminology
  • learn systemic interactions
  • build an environment for experimentation
  • build models of a system with dozens of components
  • perform experiments
  • twiddle code

and finally, reason about interactions between things I don’t understand, within a system I don’t understand, driven by a practical problem that I wanted to solve. And this all took place in a period of days, in a total of a couple dozen hours, on and off, with the final effort between getting annoyed with the problem and having a workaround occurring in a couple hours.

I’d really like to know more about how all that happens. I know that lots of academics have spent lots of effort on learning about that, and I have spent some time delving into their research, but still, I don’t feel like I have much of a feel for the most important parts of the whole process. It’s fun, in any case.

General

Sociology of software

I’m pretty fascinated by the concept that there’s a sociology of software, that the patterns of relationships in the little world of software components installed on a computer mirror, to some degree, the patterns of relationships in the world of users and developers. I suspect that some academics out there study such things, so I’ll have to see what they’ve learned some day.

I did find one interesting paper in an earlier search: Sociology in machines (PDF). It’s not hitting quite the nail with the exact hammer I’m thinking of, but it might be a good starting point.

Anyway, I was reminded of this when I was researching my problem in MediaPortal as mentioned in Geek TV: open source rocks. In that situation, we have at least three development groups (Nero, Team MediaPortal, and Microsoft) plus one user participating in transactions, specifically, User wants to use software from all three groups on the same computer. The sets of components are developed pretty independently of one another, but there are significant dependencies on Microsoft for both Nero and MediaPortal. Each set of components can be installed and uninstalled in somewhat independent ways. Nero and MediaPortal make calls to Microsoft components, but Microsoft also makes calls back to both. It’s in that particular web of interactions that problems arise.

I could go on, but won’t.

General

Geek TV: open source rocks

I’ve said it before, and you’ve heard it before me, but open source rocks.

I had a problem with MediaPortal that was bugging me. Certain things were taking too long, and too much memory. Long story short, I worked around the problem, in code, it in a couple hours of work. Given that it would have taken a similar amount of less intellectually stimulating work to find such a problem in a closed-source program, and I probably wouldn’t have been able to fix it, I consider this a great thing.

If you want lots of detail about the problem, and maybe its ultimate resolution, you can check out the forum thread I started over at MediaPortal support. We’ll see how that turns out. Could be that I’m an idiot, so my pointing to this thread may turn out to be a bad idea :-). Anyway, Slow graph rendering for analog card. I’ve reproduced my first three posts below for my own reference later, but you can read them too: I totally give you permission.

———

Slow graph rendering for analog card

Hello,

I hope nothing in this message is obvious or dumb; I don’t know MediaPortal, DirectShow, or Microsoft TV technologies all that well. However, I did find a problem and found a workaround for it, so maybe with some help we can find the right fix for it.

On my system with a Hauppauge WinTV-HVR-1600, it takes a very long time (probably 90 seconds), with the CPU maxed out, to bring up the Edit form for the analog side of my card in Televison->Capture Cards in MediaPortal Setup. It also take a long time, with a maxed out CPU, for MediaPortal to start up.

The line of code that takes a long time is line 297 in TVCapture/Graphs/Analog/SinkGraph.cs (from tag “Version 0.2.2”, I’m trying to stay with the stable build)
int hr = _captureGraphBuilderInterface.RenderStream(cat, null/*new Guid[1]{ med}*/, _filterCapture, null, _mpeg2DemuxHelper.BaseFilter);

I don’t know how to debug further down, since that’s a call to Microsoft code. I did notice in my early investigation that there’s lots of registry activity that looked consistent with DirectShow searching hard for matching filters.

It does eventually find a rendering (hr is 0 upon return), and everything works from there.

I saw that there is fallback code after the line above. So, I commented out the line (and the three lines after, and re-declared ‘int hr’) and let the fallback code try. It quickly finds an acceptable answer. After that change, the setup dialog comes up quickly, MediaPortal starts quickly, and analog TV is still available for viewing and tuning.

This problem may have become worse after I installed Nero ShowTime, which probably installs some DS filters. I’ll have to try uninstalling that to see if that really was a factor.

What are some good next steps to narrow down this problem and find the right solution? Or, is there enough data here for someone else who knows this system better to fix it?

[By the way, in looking at this, I noticed that the FillInAll method in EditCaptureCardForm gets called three times in the process of bringing up the form. I suspect it really only needs to be called once, which would lessen the problems with the form coming up.]

Thanks,

Steven
—–

Here’s a little more info. Nero is possibly part of the problem, but definitely not all of it.

Here are the actual timings for bringing up the Edit form in a few situations. (The ’90 seconds’ above was just a guess).
Original configuration: 196 seconds
After uninstalling Nero completely (I had a mishmash of OEM 6 Suite and Ultra 7 Suite installed; I uninstalled and deleted everything I could find): 20 seconds
With the workaround described above (removing the call to RenderGraph): 1 second

—–

And some more info:

After I reinstalled part of the Nero Ultra 7 Suite (details below), the Edit form took 168 seconds (without the code workaround). So Nero must be installing some filter(s) that are confusing to DirectShow’s search. However, if I capture the filter graph in GraphEdit before executing the RenderGraph, then render various pins in the graph, none of them take very long.

Nero likes DS filters; Program FilesCommon FilesAhead includes 46 files with extension .ax. (I deleted that directory before installing the Suite again, so I know these are Nero-related files).

Now, the question is: is there something wrong with how MediaPortal sets up its graph, or is it something bad about Nero’s filters? Or does it really matter, since Nero is a fact of life and it seems likely that MediaPortal can work around the situation?

Here’s what I installed from Nero:
Burning ROM
Vision
CoverDesigner
WaveEditor
SoundTrax

Recode
CD-DVD Speed
DriveSpeed
InfoTool

But I didn’t install:
Home
SmartStart
BackItUp

ShowTime
MediaHome
PhotoSnap
InCD
BurnRights
ImageDrive
Fast CD-DVD Burning Plugin
Mobile

General

PCHDTV

I was pondering new business ideas, and came up with a great new convergence device. I really need some help with it, so I’m posting a plea to the wide world. However, I don’t want to give away too much information about my design (patent pending, patent pending, patent pending!).

So, I’ll just say this: if you have experience relevant to designing lubrication systems for machines that feed card stock at 7700 mph or faster, please contact me for a great partnership opportunity.

General

Geek TV: the Microsoft stack

I mentioned that MediaPortal is open source. Well, there’s some truth to that, but there’s also the fact that what MediaPortal is doing is tightly tied to a big stack of software that isn’t open source.

Microsoft TV technologies forms the bulk of the hard core of the system. Microsoft has apparently spent some significant effort on laying a foundation for TV on their platform; from my look at what’s there, it’s pretty extensive. I’m guessing the effort went into their Media Center Edition and its associated applications, then they distributed the core components for use in XP, allowing various other parties to build user interfaces around the services.

Hauppauge/Conexant supply another bit of closed-source in their drivers. Hard to see what’s going on in there, although maybe we’ll get a peek when Linux drivers come. And I say, they will come. Go Hans!

I started looking into the underlying software as I discovered various problems in the various applications I tried with the card. I figured I might as well see what the effort would be to write my own bits to cover the holes. Some things are not that hard to do. For example, you can grab GraphEdit and build a graph in about two minutes (I mean, after learning some about how DirectShow graphs work, which I did in the process of getting MediaPortal to recognize my card) that will run and give you audio and video.

I used that to verify that it was at least possible to play PS2 again. See, the interesting thing about an MPEG-encoding card is that it takes a couple seconds for the signal to crawl through the MPEG pipe and back out to get to your screen. A couple-second lag makes playing real-time video games rather impossible. But, I was able to configure a little filter graph that bypassed the MPEG encoding/decoding, instead using UYVY format (and don’t ask me what that is, all I know is that it doesn’t have interframe compression and so doesn’t suffer from the time lag), run it, and see no perceptible lag. So, it’s theoretically possible to play PS2 still, and in a pinch I can use GraphEdit to do so, but I’m hoping that MediaPortal or DScaler can be used in that way too.

Geesh, that was a boring post. Sorry.

General

Geek TV: protocols and such

I mentioned TSReader at the end of my last post. I was pleasantly surprised to find such a program, and that the ‘lite’ version was free for non-commercial use. I’m no television engineer, I just play with my TV. Playing with TSReader gave me some insight into the structure of digital TV, MPEG, the software stack that puts the signal through to the screen, etc. I grabbed “DTV Survival Guide” from the library to give me a bit more detail on what’s going on, without diving too deep technically. I’ll tell ya if I find out anything particularly cool.

General

Geek TV: software

OK, so I mentioned that I was not completely thrilled with the Hauppauge bundled software. I won’t get into why:

  • one part of the install failed, “MPEG SW decoders”. Not knowing the architecture of this system as I now do, and seeing that it was an optional component, I figured, not a big deal. Well, knowing what I know now, I’d change the label to “You don’t need this, except if you want any of the other software to work, like to watch TV or record it or something. Good luck installing it!”. Turns out that the sub-installer just doesn’t work if you have a TMP envvar set (only took an hour with ProcMon to figure that out), and, well, that’s bad.
  • the TV app isn’t too great
  • scheduling recordings is… I did I say I wasn’t going to get into this.

I went off in search of some other options. Luckily, the market is rife with options. Let’s see:

  • Beyond TV: not bad. If I hadn’t found a cheaper solution, I might have dropped the $60 on this. Critically, it provided the confirmation that the hardware and drivers actually work.
  • Power Cinema: didn’t actually look past the $100-$120 price tag, but I have had reasonable success with Cyberlink products in the past.
  • Windows MCE: not gonna go get a new OS to watch TV, if that’s even possible outside of pre-built computers. I accidentally have it on my laptop, but that doesn’t do me much good.
  • Meedio: already gone.
  • MeediOS: not here yet.

Well, it goes on, but I don’t seem to have links to many others. Anyway, none of that matters, because I finally found MediaPortal. Wicked-cool! Open source (even if in C# and tied tightly to Windows), pretty, very active community, lots of plugins, lots of builtins, PVR, DVD, EPG, all the good stuff you expect, and free. Granted, it was unstable while I was setting it up, and it didn’t support my card initially. But my patience was not exceeded and was rewarded: I got it working on my card according to the developers’ instructions (and submitted my work so y’all HVR-1600 people don’t have to do it after the next release), and it just started stabilizing after a while.

Not to say that it’s everything a person could want or bug-free, but I’ve gotten a lot farther with it than with any other free solution, and as far as with Beyond TV, so I’m quite happy.

That gets me to the point of basic end-user functionality, which is good. My hardware works, I think the drivers are actually stable, and I don’t have to wretch my back working around bugs in the software.

In the process of figuring all these things out, I also found some tools that are kinda nice. This is where things get fun, right?

  • VideoReDo, despite its somewhat odd interface, is a quite capable cut/join MPEG editor, with support for all the sorts of MPEG that get thrown around (.mpg, .ts, .dvr-ms, res up to and beyond full HD), surprisingly capable automatic ad-cutting, etc. Possibly worth the $50, but I’m keeping my eye out for an OSS solution of similar quality, that, yeah, runs on Windows.
  • Speaking of cutting commercials, a neat OSS tool is Comskip. Good cleaning fun.
  • This is bleeding into my next post a bit, but TSReader is a very in-depth tool for looking at DTV streams and being very impressed with all the numbers and stuff. From $0 to $400.

Speaking of my next post, see ya then.

General

Kids’ TV

[This doesn’t count as my next post, relative to my last post. Skip this, mentally.]

Man, kids’ TV is some weeeird shit sometimes. I grabbed some Boohbah because I wanted HD test content. Well, I gave you the link, I don’t need to explain too much what the level of weirdness there is, as you’re listening to primary-colored blobs of stem cells farting their way across the screen.

It makes for some good HD test content. They’d sell at least as many HDTVs with this playing in the stores as with football.

General

Geek TV

[I’m not referring to the excellent and when-is-season-two-ever-going-to-start Cringley series Nerd TV, though if I were going to write a post about that, I’d say, go watch ’em all, and maybe send PBS a few bucks to encourage them to produce such simple yet enlightening content and continue to make it available for free download.]

[Nor am I referring to any of the hundreds of other things named Geek TV or GeekTV or geekTv or whatever that are everywhere out there.]

[I should just retitle this post. But I’m too lazy to do that.]

[I still use ‘cat’ as my editor, see. Haha, get that?]

I recently bought a Hauppauge WinTV-HVR-1600 as my new TV tuner. Wanted to step into the world of digital timeshifting. I don’t watch a ton of television, but I do watch more than people claim to when they’re trying to impress their friends at the coffeehouse.

At first, I was just going to replace my old Hauppauge WinTV-Radio. OK, Hauppauge makes some decent hardware and cheap, but damn if they can figure out the concept of software. I replaced their drivers with some open-source ones a while back, btwincap. I replaced their TV app with the open-source DScaler. I was fairly happy with the combo (well, technically, DScaler bypasses the drivers on 8×8 hardware), but still couldn’t really do the timeshifting thing reliably, either due to crashes or CPU hoggery or VfW bit-rottery or ffmpeg command-line-arguments-confusery. So I said, how about I spend $100 instead of 100 hours. I mean, the software, at least, must have evolved.

I started shopping at the “just equivalent hardware but different manufacturer” level. Heard reasonably decent things about the ATI TV Wonder series, and it even seems to use the same BT8x8 chipset. But, ya know, hopefully better software. In the process of getting more info on the competitors in that space, I ended up deciding I better at least get a hardware MPEG encoder. Should give a great improvement in reliability and let me get work done while I’m recording. Important work, like writing blog posts about TV hardware.

So that led me to stuff like the TV Wonder 550, PVR-150 and brethren, even junk like Pinnacle (OK, I have an irrational dislike for Pinnacle because of the horrific experience I had with another of their products), which I’m not sure really does hardware anything.

The good news in that sphere is that the PVR-150 is highly recommended for MythTV, and if I were completely insisting on Linux compatibility today, I would have stopped there. But I didn’t; I let my good judgment about driver compatibility slide because someone mentioned OTA HDTV, and I said, why not, unless it’s really expensive.

Turns out that it’s quite cheap. Thanks to the various converging technologies of the world, and let’s not forget those sports fans who provide the bulk of the market for HD stuff that drives down the prices to let the rest of us watch Nature in HD, getting an analog tuner, an ATSC tuner, and hardware MPEG for the analog side only sets ya back $100 or less, in the case of the HVR-1600. Not bad. Well, not bad if you’ve read my next post, which tells you how to replace that DAMN HAUPPAUGE WinTV 2000 CRAP. 🙂

General

NDS for handheld computing?

I’ve got a bit of an itch again these days to find a good handheld computer that I can write software for. I have a couple PalmOS things, but developing for PalmOS is not great, from what I can tell.

I happened to be playing around with my Nintendo DS these days, too, and thought, hey, maybe it’s a decent little platform. It does have some things going for it.

However, it’s not really that hot, and there’s considerable difficulty in developing for it, or even getting to the point where you can run what you write. There’s that homebrew excitement associated with it, but that’s not really that valuable to me.

Anyway, I did some research on what I might do if I did try to get homebrew development going on the DS, and I figured I’d blog it in case someone might care. This isn’t going to be a substitute for your own research, but maybe some good pointers for where to start. It can be a bit difficult to figure this stuff out, partly because of the intersection with the cartridge piracy crowd (the same hardware tech is needed for both piracy and homebrew).

[Here’s a link to Wikipedia’s Nintendo DS Homebrew entry. I should have looked there earlier; that is probably a better starting place than anything mentioned in this post.]

I think what I’d do is get a Supercard Lite/MicroSD, a Passcard 3, and an SD card.

The nice things about that combo are:

  • doesn’t stick out of the case (the Supercard is a GBA cart, but made to fit just like that dummy cart does on the Lite)
  • adds 32MB RAM (which may not be useful in general, but is useful for DSLinux)
  • seems to be well-supported in terms of development tools/libraries, including DSLinux.
  • uses standard flash memory

The bad thing is that it needs the three pieces, which makes it more complex and costly (about $100)

There are a few “Slot 1” solutions, I think Supercard DS (One) looks like the best one there. Again, uses MicroSD for flash, but is more straightforward and cheaper. Just doesn’t give you the extra RAM. (People say that it’s impossible to extend the RAM with a Slot 1 solution). The DS-Xtreme looks kinda good, partly because it seems to have good support from the designers. But it’s pretty new, and it only has the built-in flash, and it doesn’t have the RAM.

Anyway, like I said, I’m probably not going to act on any of this, so the quality of my research may reflect a lack of investment.

One thing I found out today that’s pretty cool is that it seems like the homebrew development environments support an OpenGL-alike interface for graphics. I was also impressed by all the work that’s going on to support homebrew on the various consoles. It’s a weird pursuit, in a way, but also kinda neat.

Here are some links that seem useful:
http://www.bottledlight.com/ds/
http://www.dslinux.org/
http://www.dslinux.org/blogs/pepsiman/
http://www.natrium42.com/shop/
http://www.ds-x.com/
http://eng.supercard.cn/

Unrelated to DS, here’s one of the handheld Linux boxes out there that’s pretty cool. Far better hardware than a DS, except maybe in 3D, and Linux is completely supported by the manufacturer. ‘course, it costs $400.
http://europe.nokia.com/phones/n800
http://www.maemo.org/