Rusty's Blog

Thoughts and musings of someone who's not sure what 'normal' is…

Tuesday, May 26, 2009

Frustrations…

Prime for today is my frustration with transcoding videos. And audio files for that matter.

There’s a group of people building a tool called ffmpeg. The idea is great, it’s a fast processor of video/audio files, and will convert to and from mpeg2 as needed. Like I say, the idea is great. However implementation Sucks!

First of all, they release updates occasionally, they come with bugs. You want specific formats supported? Recompile, don’t want to re-compile because the library for accessing the format is already on your system and you would much rather the application came supporting plug in codexes? Sucks to be you. Oh, and by the way, all the information about how to use these tools that you learned from the last release? Forget it, we changed the API.

To be clear, they are doing great work, it’s just that you can’t relly upon what you had working yesterday, to be working today, or tomorrow. And if you are looking for solutions to problems you are encountering now, make sure you’re not looking at someone’s blog posting, or thread comments from before the release you are using now.

The bad part is that when everything is ‘right’ on the ffmpeg end, that doesn’t mean that you will get anything useful. I’m running a mythbuntu system, with two back-ends recording and playing back through one of many front ends. The front end might be a laptop, or it might be the front end running on one of the back end servers. For people wondering about this ‘front-end’/'back-end’ business, back-ends are responsible for recording and processing the TV and other media. The Front end should be a reasonably ’simple’ device that allows you to view the content stored on the back ends, and instruct the back ends in how to process that content. You may have a DVD drive in the front end so that you can watch DVDs without having to go hunt down the back end server, and so on.

So I have two computers functioning as the back-end for my MythTV/Mythbuntu setup. One of these is also my front end, and I can watch Live TV, and recorded media through my projector, and listen through my home theater tuner. All well and good. Right?

Well I was watching an episode of one fo the TV shows that I enjoy, and it occured to me that one of my neighbors would enjoy the show. Since my neighbor does not have access to my mythtv platform, I’m going to have to provide her with the media in one way or another, if she is going to watch that show. Now the ‘universal’ solution is to burn a DVD with the content on it. In fact, MythTV has that functionality built into the front end in the form of MythArchive. It’s a beautiful program. It also doesn’t do me any good, because the content I want to put to DVD is on the other back end, and MythArchive, can’t access it directly.

Ok, any way to fix that? Well, supposedly if you set up the front end to map the second back end’s drives to the same named mount points on the front end, you should be good to go. Minor issue here in that the second back end’s mount points have a name collision with the front end’s mount points. changing that will be a bit ‘interesting’ which is not ‘good.’

However there is a possiblity using nfs. followed some instructions, no good. Still not getting the content on the front end to be ready for the mytharchive program. However it is there, so I copy the file from the nfs share to the front end’s home user directory, and it’s now available for me to work with. Well, sort of. Apparently the transcode appication does not like something about the file now in my local directory.

Ok, well, what now. Well, since you have the mythtv file in a local directory, might just as well put it on the local directory of the computer you would otherwise use, and see if you can convert the file to something more useable.

After ripping out the video, and the audio, them multiplexing them together again with a third program and getting a DVD variety mpg file, I run the dvd-author application and out pops a bunch of errors about the audio needing to be re-muxed. In fact burning a DVD with the resulting output ends up with a very nice video, and no audio.

Some DVD players will handle .mpg files directly. I’m left hoping that’s the case for my neighbor, or that her computer will allow her to play the mpg file in Windows Media player, or the like. Because that’s about the only option I have left.

Oh, and for what it’s worth, the bugs have been out there for some time regarding pretty much very step of this process. I might get things working at some point, we’ll see. For the moment, I’m done. I suspect that the way that I’ll ultimately get this to work is to create new mount points on my primary backend/frontend, repoint at the new mount points, then point the shares of the secondary backend to the old mount points, so that the mount point entries match, and everyone is happy. (At which point I’ll probably find that something else does not work well, or has been broken.)

Ideal world? Mythbuntu gets put together in such a way that you build a backend and plug it into your network. It checks to see if there is another backend already sitting on your network someplace, and if not it becomes the ‘primary’ backend. You build another backend, and plug that one into the network. It checks to see if there is already a back end on the network some place, finds that yes there is. Now it offers you two options, Stand alone back end, (say you want to create a backend that is specificly for your kids, and doesn’t have access to the R rated movies) or attach to the existing backend.By attaching, all media sources become available to the primary back end, and are re-mapped if neccesary on the secondary backend to point to non-coliding namespaces. Next up, a userfront end is configured. It might be sitting on one of the back ends, or it may be a stand alone micro-box that happens to have a DVD+/-RW drive that can be used to archive or play movies. No matter what system is hosting the content, the front end MythArchive tool treats it as local. That may include copying files over the network if you need faster access at some point, or it may mean using resources on the back end to store the content while you work on it. It may even check to see if there is a ‘best’ DVD burner to wor with rather thean the one on the front end. Perhaps you have one on a backend that will burn significantly faster, or more reliably, who knows.

Sadly we are not qutie there yet. I think we are getting close. UPNP is becoming viable. File sharing and storage sharing technology is getting to the point where somewhere down the line we will be able to reference a common ’storage’ location, that may be distributed across multiple devices, I’m not holding my breath though. I tend to suspect that such updates are a couple of generations down the line.

Frustrating…

posted by Rusty at 12:09 am  

Sunday, January 4, 2009

Entertaining…

At some level the concept of an entertainment center comes up for the home. In the past this might have consisted of a TV and stereo system, or even one or the other. Add a VCR, and now you can watch your favorite TV show even if you are going to be working late. Or well so long as you remember to set up the recording. And there was no power glitch that sets the clock to 12:00 blinking, and wipes out all the recording schedules.

A few years later people started getting a game station of some sort. Maybe a Genesis, or a NES. Since we considered that to be entertainment for the kids, that got relegated to the TV in the kids play room.

For Mom and Dad a few years later the DVD player came along, and you ran into your first major conundrum. The TV had one or possibly two speakers which worked well for watching the news, or sitcoms, but if you wanted to get a bit of that theater experience, you are going to need a bit more than the TV speakers. This is probably the first time people even considered using there stereo in conjunction with their TV. Up till then the Tuner on the stereo selected whether you were listening to the radio, a tape, or the record player. You may have had a CD player in th mix as well, but that was about it. Also most of our stereos were just that Stereo. If you wanted the Movie experience you had to add a few more speakers. First up are the ’surround’ back speakers. You do want to get that helicopter audio coming in from behind you right? The early surround sound systems actually fed the same signal to the left rear and right rear speakers.

For most people the next decision was a sub woofer. Get the really low sounds that were pretty non-directional. Sounds below something like 200 hz are so low that your ears are not far enough to provide the needed spatial information. Put that wherever is convenient. That takes the 2 channel stereo system up to 4.1. In many cases people would still run the speaker in their TV. It gave a great reference for voices and ‘center’ of attention activities. As a result many people who decided to migrate to a ‘large’ screen ran into a problem with the missing ‘center’ information. So add another channel for ‘center’ and we get the 5.1 that most people end up with. Today most ’stereo’ receivers support a 7.1 arrangement, and all 8 speakers are fed with different audio.

All that to support the ‘theater’ sound of movies. ‘Audiophiles’ all tend to go for the 2 chanel systems. What do you need more than that for to listen to the most important variety of entertainment around, music? I think in part that’s why dvd ’super’ audio has not taken off. Along with the fact that the media tends to be even more expensive.

In any case we’ve gotten to the point that along with the TV, VCR and DVD, we need an audio system in the mix. Where you go from here varies for different people. Some people went with the PVR. The Personal Video Recorder (PVR) takes the idea of a VCR, and gets rid of the tapes. When one of my uncle’s passed away we ended up having to figure out what to do with something like 500 VHS video tapes. Only a few of these were pre-recorded, most were recordings off the air, or from cable. That worked for him. By that time I had almost completely eliminated video tape from my own entertainment systems. I picked up my first Tivo as a DirecTivo.

Ah, I see I missed a device. The ‘Cable Box.’ Well to be honest, we had cable boxes because we were paying the cable companies to control what we watched on TV. And they didn’t trust that filtering the channels we had not agreed to watch would be sufficient, or they wanted control over who could watch the ‘pay’ channels. They still don’t, but if all you are looking for are the channels with commercials in them, then you could set up your TV with one of the new tuners to tune directly to cable channels. Ok, most people first did this with their VCR. After all, it made sense to be able to tape the game when you were on being dragged out to the mall for some shoping, but HBO would re-run the movies several times over several months, so we can probably find a time to watch that. So this box was ‘hit or miss’ for being in the entertainment center. Sort of like the game system.

On the other hand a couple of satelite services came up as alternatives to Cable TV. All of them required a receiver next to your TV. The one I had chosen was DirecTV. Since I already had this, it made sense to me to get the DirecTivo when I saw a really good price on it. This device allowed me to record a couple of TV shows while I was watching something that had already been recorded, or record one thing while watching another.

One of the advantages to the TiVo was that it was a ‘hackable’ device. Meaning that I could do a number of things with it that had very little to do with watching TV. Or that gave me advantages while watching TV. As an example, the TiVo would use a modem built into the system to call up the TiVo service and get schedule updates. However the phone line was not generally disconnected when that call was being made, and the modem in the box supported caller id. Through a software hack initially, you could add some software that would put the caller id information for an incomming call up on your TV. Mom’s calling on a Tuesday? Better take the call. About this time I had a network of computers at home, with a dedicated internet connection. One of the hacks that I installed was a network card. This allowed me to get rid of the phone line entirely after service had been established.

When it comes down to it, a TiVo really is nothing more than a computer that has a TV tuner card built in, and can present it’s output on a TV. Since the core of the system is a general purpose computer, you could set it up to show the pictures you had been taking, or getting scanned, as a slideshow, and eventually people were playing their music through this box as well. Why get up every hour to replace the CD, or after every couple of songs to select something else to play, when you could craft a custom play list ahead of time, and have it play background music for the party, or for that photo slide show you want to show your parents.

After a while though, TiVo, or more accurately DirecTV wanted more control over their version of the TiVo. And about the same time I moved to an apartment on the north side of a building with no balcony, or other means of seeing satelites which were all to my south. So I started looking at other solutions. Since I was already using Linux for most of my computing needs, I tried a couple of solutions that gave me functionality similar to TiVo, one of them being an application suite named FreeVo. I ran into a few problems there, but finally found MythTV, using Knoppix as an installer and base to run it under. For a few years that was all I used for watching TV.

I’m still using MythTV, but have changed to a different distribution, and currently am recording across two different computers.

About 3 years ago I picked up my first video projector. It was not a ‘great’ projector, it’s native resolution was 640×480, but would project a passable 800×600. Also the bulbs have an expected life time of 50 to 75 hours. Fortunately they are not particularily expensive, which is a bit unusual for projectors these days.

I’m actually on my 3rd projector now, as I needed a projector that supported some advanced HDMI support for my PS3. Also my PVR supports HDMI out, though not audio (yet.) For a ‘video switch’ I am using a Yamaha tuner. Since audio out through HDMI is not supporte yet on my PVR, I’ve been using a SB external interface with optical out into the tuner. This lets me do 7.1 input with only 1 lead for audio. Granted having it embedded within HDMI would be even better, but that will come in time.

As you might imagine, that amount of hardware takes a significant amount of space. Since I don’t have cable in my closets, or for that matter, much space there, I’m not keeping either of the computers I’m using to receive TV in there. If I were in a house I would have the cable and antenna feeds going to one room separate from the projector, and feed that essentially from a front end with no hard drive or if possible fans. I might even just run it all from the PS3, if I could figure out how to watch TV that way. (I can watch most of the rest of my content that way.) In any case I’ve had everything pretty much crammed together in too little space.

The base for everything was a coffee table that allowed me to put the tuner under, one computer on top, and the PS3. Along with the network firewalls, cable modem, switches, Access Point, Game controllers, antennas, CD player, Record player, and UPS to prevent power glitches from taking down the computers immediately, I had a narrow folding table above the coffee table, and the space involved a bit cramped. The big problem this causes is really heat. The one thing you don’t want to have to listen to when watching a movie, is the fan of the PS3 kicking in and wiping out the softer audio.

So when someone moved out, and tossed a wood shelf structure this last summer, I was able to pick up a bunch of 2′x4′ laminated pine boards, with the vision of making a better entertainment center for all the hardware. I just needed some way of supporting it. I picked up some 3/8″ aluminum rods, and some 3/4″ pvc pipe, and this weekend I finally took a day and put it all together. It’s not perfect, but for the moment everything is holding. I’m expecting it to hold till I can get a fix put in place.

The arrangement is that there are four boards acting as shelves. To either end there are 2 boards, with an overlap of about 3 feet in the middle The outside corners have a post running from top to bottom and 2 posts run through all 4 boards in the center, 2 and 1/2 feet from the ends. The aluminum rods provide ridgidity for the the posts, and the pvc pipe is cut in sections of 8 inches for the first shelf and center poles, and 16 5/8″ for the outside ends between the shelves. So that things can be moved about I put caps on the ends of the sections acting as feet.

One of the flaws is that when I assembled everything, I did so away from the wall. After putting everything back together, it turns out the aluminum rods are not sufficiently strong for moving the assembly back to the wall with all the weight on it. As a result the back center post has started to fold. I’ve provided a support that will hold for now. for the future I’m planning on a better base. First of all the ‘feet’ will have latteral support between them. I’m also hoping to get iron or steal rods, possibly threaded. If I get the threaded variety, I’ll add nuts and washers for better vertical support, and hopefully better structural integrity. (Less wobble.)

But for now, this will do.

posted by Rusty at 9:30 pm  

Saturday, September 6, 2008

On Not watching TV…

If you ask people if they watch TV or not, you generally get two responses. The vast majority of people will say “Yes, I watch TV. Of course.” Often followed by water cooler talk about the latest episode of whatever happens to be their favorite show.

Occasionally you will find people who say that they don’t watch TV. but if you ask a bit more carefully, they will admit that they do have a TV, it’s in the living room, and occasionally they will watch a news program, or something on cable, etc….

I’ll admit that I don’t really fit in either group. What I can say is that “I watch television programs that have been on TV or some cable channels, occasionally in near realtime.” I do not have a ‘TV.’ Well, I might have an old B/W 5″ portable burried in the garage some place, likewise for a color edition of the same sort of thing. Battery powered, etc. I don’t recall seeing it the last time I was rooting around in the garage cleaning things out, but I have a ways to go. I have to admit that I don’t think a portable manually tuned b/w or color TV that’s burried someplace in the garage quite qualifies as ‘having a TV.’ But that’s me.

What I don’t have is a 25″ or 52″ or so Color TV sitting in an entertainment center, or the like, in my living room. I subscribe to Cable TV, as the combined cost of the Cable Modem service, and the Cable TV is something like $30 more than the cost of the Cable Modem alone. Granted the Itemized bill suggests that Cable TV is about half of my bill, but if I were to drop the Cable TV service, my costs for Cable Modem would jump between $20 and $30. And as I say, I do enjoy some of the programming.

So how does all this work? I have a computer dedicated to capturing programs that I’m interested in. This requires a TV tuner card to capture analog TV or Cable, and alternatively other devices for capturing Digital TV. For that I’m using what is called an HD-HomeRunner. Two actually. One is attached to the Cable service with 2 tuners and I can capture unencrypted digital cable (which ism’t all that much, and I have not been using it for that for a while.) I have another that is attached to an antenna that I have setting on my window sill outside of my apartment. Odd as it may seem, each HDHomeRunner has an ethernet interface, and 2 digital tuners/receivers.

What I’ve had setup for the better part of a year has been a computer with 2 analog tuners built into it, and able to control 2 tuners on each of 2 HDHomeRunner receivers, including capturing from them.

About a week ago this computer effectively ‘went up in smoke.’ Actually the video card appears to have failed and taken out the motherboard with it. It also left a bunch of soot inside of the computer. Because it was an electrical fire, and appears to have centered on the power conductors of the pci-e interface for the video card, I’m afraid that the power supply for the computer is somewhat suspect at this time. Since the power supply is specific to the case, I figured it was probably time to get a new case (with power suply) and build a new system.

As I believe I mentioned back in June, I tend to run Linux on things. That is the base operating system for this box. My plan at this point is to transfer the hard drives from the old computer case, into the new computer case. Well, that was originally what I had in mind. It turns out the new case does not support as many drives as the old one did. So now I have to figure out how to attach the drives that don’t fit into the case. I think I will be visiting one of the local computer stores, and seeing if they have some reasonablly priced esata housings. If so, then things should work out OK. If not, I’ll figure something else out.

As I’m writing this, I think that 1 of the two video cards in the old computer is salvagable. It is possible that both are, however it is also possible that neither are. This system had 3 of these cards before I replaced the motherobard with one that only had 2 pci slots, so somewhere around here there is a spare card I can use. I have other tunner’s available as well, though I don’t know how well they will work in my setup.

I may be able to pull the memory, but I’m not really inclined to do much else with the hardware in the old computer. Later on I may try one of the motherboards that I pulled from another system along the way, but it’s not critical to get that today. And as I say, I’m not sure of the power supply. But that’s for later.

For now though, it’s pull things together to get my system back together, and running. I still need a couple of parts here and there. CPU cooler, and possibly a bit of extra memory, though I may also have that covered. We’ll see.

As to costs, it’s one of those things. I enjoy the experience of learning new things, as well as getting back to recording those shows I happen to want to watch, and watching them at my convienence. (Eureka just happens to be on at the same time as a meeting I am planning on being at this next week….)

For now though, I suppose I should go and get some sleep.

Updates to follow.

posted by Rusty at 10:35 am  

Powered by WordPress