life of a linux multimedia nerd … it’s fun

I’ve been thinking for a couple of weeks now that maybe it’d be good to post some stuff about multimedia on Linux again. Good for *you* that is, o snap!

Just kidding. I do have a ton of stuff floating around in my head though, that’s not all that organized, or helpful if it doesn’t have any real way to explain how to use. Case in point my awesome (awesome to me, not you, z snap!) DVDs wiki where I have a looootttt of stuff. A wiki is great for braindumps, but not for writing articles.

I’ve toyed with the idea on and off, and one of the reasons I don’t want to post stuff on my wiki is the likelihood of someone finding it pretty low. Another big reason is that I don’t want my braindump wiki to begin to have *any* sort of expectation or order or other-party direction … the site is mainly for me, and you’ll see that browsing around that a lot of it is “oh yeah, here’s the encoding settings for this random thing and a flag you won’t need to forget.” So I guess I can’t keep it all in my head.

I don’t feel really qualified to comment on the state of multimedia in Linux too much, not nearly as much as I could years ago when I was doing a lot more development in Gentoo. The reason being is that I’ve gone completely in one direction, and one only — DVDs and media centers.

mythtv
My old MythTV setup from who knows how long ago

I’ve had this dream for years — fifteen to be exact — of how I wanted my multimedia setup to be. It was when I first found out about MythTV and got into it. I loved the idea of it, but I hated the implementation of it. I could never get it quite the way I wanted to. But that’s okay. What really grew out of those years of experience was learning a lot about multimedia in general. That’s what I find really fascinating, is chasing the dream of how to get where I want, and all the little stops on the way … an example being of how I play with containers and codecs that I have no intention of actually using, just so I can see what it does and doesn’t have.

My happy little media center was always just slightly out of reach, and my library of TV shows and movies grew and grew over the years as well. The thing that made it finally happen was a drop in prices of hardware.

current hardware setup

You have to realize that ten years ago, when you have 250 DVDs, and are lucky to have 250 GB of hard drives (combined), that doesn’t leave you a lot of options. And from day one, my goal has always been to have **all** of my library available in **one** place. No way that was gonna happen. So my original goal could never have been met early on simply by logistics alone (to say nothing of encoding).

I am also really, really pick about how I like things to be, and so it legit does take me years to get used to the ideas of some things. For instance, it wasn’t until about a year ago that I finally conceded that re-encoding my DVDs from MPEG2 to MPEG4 was okay. I’ve always held firm on the idea that I prefer, above all, quality as close to the original as possible — the holy grail being that it’s not reencoded *at all*. Remuxing I was always totally fine with — as long as it was a container I was fond of, but that’s a whole nother rabbit hole.

Interestingly enough, what finally convinced me that encoding was okay (going in this random direction) was that there is source material that *needs* it before it can look presentable in how I like it. Some sources are interlaced or telecined, and some need to be cropped. And that’s about it. But what really got me changing my mind and direction was … again … hardware.

I bought a new Sony TV a few years back (about three I think) that was running Android TV on it. I remember I got it for fairly cheap, brand new, at about half the retail cost everything else was going for. It’s also a 4k display. Well, long story short, I didn’t like it. It was too bright, mostly, and the idea that I had to boot up my TV and *wait for it* was beyond unacceptable. What’s the point of having a multimedia library on demand, if I couldn’t watch it when I demanded to?? (I have since realized that it only needs to boot up once, and then stays up … but hey .. first impressions are everything, and I was not impressed)

So, I would use it, and then not use it, try it, and then not try it, on and off for three years. It was too big to be a monitor, and it was smaller than my rear projection TV, and so, there was no real actual practical purpose for it.

I call situations like that “a solution without a problem.” I had it, but I didn’t need it, and when I tried to create a need for it, it wasn’t able to duplicate what I wanted, or do anything better.

The whole point of this though, is how it’s actually hardware that has changed everything for me.

Jumping back a bit to the storage problem. Hard drives just kept getting cheaper and cheaper, and I kind of woke up one day and had 1 TB of hdd space that I could use. Not bad! However, that was not nearly enough to reach my golden dream of having all my content untouched MPEG2 video and Dolby Digital audio. Nope. As my friends can attest, getting me to change my mind is incredibly difficult, if not impossible. My media library was huge — just storing Star Trek: The Next Generation was massive. To be specific, all seven seasons are 384,352 MB. That’s a third of one series just to have it on there. Hmm. Nope.

So, I had a couple of choices: encode my video (bleh), store only parts of it (bleh), or buy more hard drive space (nopes). Once again, I find myself pretty frustrated.

My personal website to manage all my DVDs.

I also need to interject in here that it was about two years ago that I got diagnosed with OCD [Edit: I realized later that since I reference this a few times, it’d make sense to talk about it in detail, so added more info at the end of the post]. By two different professionals over a six-month period. The first time I heard it, I scoffed at the idea and said there’s no way that would apply to me. The second time, I still scoffed. But as I thought more about it over time, I realized how many ways it affected my life. Typically once I see how things *are* then I’m able to deal with them much better. I realized that it was my brain that wanted to be completely rigid, and that there were other options out there that could meet my basic requirements, even if my goal of perfection is not possible.

“If you’re watching, it’s working,” is a motto I use a lot when it comes to testing and setting up my media library. It basically means, that none of the chasing of ideals is relevant in the least if I’m not actually using the tools I’m building. It’s like building a perfect gravestone for yourself, but never considering that you’d die and be buried there. There was no practical point to it, other than to have it exactly how you want it. That’s what I was doing — perfecting my little graveyard so that everything is shiny. Media libraries are meant to be watched though, not put on display (another thing I had to learn over the years), and since I wasn’t reaching my goal, it was time to try something different. More compromises. Now that I realized I had OCD, though, it became much simpler.

Back to hardware. It played another big part when I got a four-core desktop about five years or so ago. I finally had something that could encode video at a decent rate, using x264. I think it ran at around 60 fps or so to encode video. That was awesome. That meant that I could wait about double the length of the video, and come back and it’d be done. Before this time, I’d only had dual cores, and encoding at 120 to 150 fps is kind of … a buzzkill … if you start doing the math on how long it’s going to take to encode one series.

The better hardware helped out not because I could encode my library, but because I could *test* encoding multimedia. I have spent years tinkering with everything, my idea of perfection evolving, and having intense fanatical debates in myself of why I shouldn’t use this codec, container, profile, setting, and so on (which, I realize now, is also caused by OCD). So while I couldn’t necessarily have the *library* I wanted, I could easily chase down the dream of the *standard* I wanted. And that took a really, really, really, really long time. Once again, though, it was hardware that saved the day! But not without wrecking it first.

For some reason, over all this time, it never actually occurred to me to get better, new hardware to *watch* my media. I had my trusty old Sony DVD player that could remember the playback position of six discs (SIX!!), and I loved it because one of the requirements of my perfect box was that I’d be able to resume playback of my media. Early, early on, back in the 2002s, I was already writing my own scripts for resuming playback on both a video and a series. I’d have MythTV call a wrapper script, and it’d resume perfectly. Great idea, one of my goals met, but … I wasn’t watching media. So it kind of died on the vine.

My trusty old (22 years old) Sony CRT TV with the Blu-ray player on top.

You think after reading this far that it looks like I’ve gone down the rabbit hole, believe me we have not even begun. This whole thing is a high level description.

Maybe it’d be better if I didn’t go into details, and just list out some of the things I played with:

* Hacking an open-source DLNA server so that it could resume playback
* Using the Opera store on my Blu-ray player so that I could stream video that way
* Beginning to write my own website that could stream video to my PSP
* Writing code that would detect audio breaks and commercial breaks in TV shows so that I could generate chapter points (this was actually an amazing project)

Ben 10 PSP
This video wasn’t streamed, it’s sitting on the memory card. I really did start working on a website though where I could stream video from its web browser.

 

All of that is insane, but again OCD is all about being *locked* into one thing. Part of the mental circus is that there is only *one* solution. Also, that list above is not complete. But that one solution features only the hardware that I really like. Things have to be exactly the way I want, even if that means using an old Blu-ray player from five years ago that can play videos in a Matroska container with VobSub and chapters, but only if it’s plugged into a USB (I legit got an entire series encoded and put on a thumb drive just so I could watch it this way .. I didn’t).

While this may all seem like a huge waste of time, the reality is that there are huge payoffs — I learn what I want by learning what is out there, researching those paths, accepting or rejecting them. Because I’m so picky, every piece of new information I picked up on, might be the solution I was looking for, and so it was scrutinized and tested. So, I learned a lot, and that’s where all my multimedia know how has come from, either from things going the wrong direction I want, or usually more because it’s fun to tinker with and see what I can do. In fact, one of my favorite hobbies is to get a device and then in a lot of detail figure out *exactly* what video specs it contains (for example, did you know that the PS3 supports one kind of video if it’s on USB vs streaming over the network?). The point is that even if nothing was what I wanted, I knew all the reasons why. That’s knowledge, yo.

My old Samsung phone

Remember how I bought that Sony TV and then never really found a use for that? That’s a common story with me — I’ll get *some* hardware because it looks fun (and it is), but ultimately end up with something I can’t really use. So I had this tiny little Zotac PC that I bought years ago, but couldn’t really do anything with. It didn’t have wireless, so I couldn’t just put it anywhere (which was an oversight on my part … when I bought it I told myself “nah, I’d never need that !), it only had one Ethernet port, so I couldn’t use it as a router, but it *did* have a sexy nvidia card on it that could do hardware decoding. And it was fanless, which made it even sexier. Still, though, a solution without a problem. The problem I had, again, was that there was no storage space … or not enough.

I’d grown up with desktops so of course all I ever had were the huge 3.5” drives. I had accumulated more than a terabyte by this point on my life (probably more like two, spread out across a lot of disks), but it didn’t really *do* me much good. Sure I could store video, but if I was going to have something that’d do video playback for me on my media center, the idea of throwing a desktop behind my TV and hearing the fan whir was not my idea of an enjoyable media experience (Ironically, part of my enjoyable experience is to turn up the volume so loud that I wouldn’t have been able to hear the moon fall from the sky, much less my case fan).

What happened though somewhere along the line (this part is a bit fuzzy, so I’m guessing a bit at this point) is I wanted to swap out my PS3 for an SSD. I had already upgraded the drive in there from the original 250 or so GB to a 750 GB. I was hardly using *any* space on it at all though .. maybe 200 max … if that. Basically, I had all this storage that I wasn’t using, and hey … why not throw that into my little Zotac box? I did that, and then it hit me … I suddenly had a lot of space on a tiny little fanless box that can sit behind my TV and not make noise or annoy me, and it had enough space on it to hold some media, *and* to make it even better … it had a sexy nvidia card on it that could do hardware decoding of MPEG4 *AND* MPEG2 … and … hmm … is this possibly the birth of my new media center? Maybe? Maybe …. ??

It wasn’t.

There was one problem. A remote control.

You see, another part of my big perfection problem is that I had to have only *one* remote that I could use. Ever. One! Just one. The end. No bargaining on that point. There was no way to control that little bugger, even though I could put media on it. This was where I came back to looking at DLNA servers a bit more closely, and started delving into what possibilities it’d hold.

I liked it, and I didn’t like it. I liked it because it had all my folders and I could easily *browse* my library, but it just wasn’t … fancy. There was no cover art, and resuming playback with my DLNA clients only worked in that powered up session. So. It was kind of a pain. It was close! And it was very close, and for the first real time I could actually get a lot of media on there. So that was a good start. I had a proof of concept, at least.

Resuming playback again had always been a big goal of mine, and I could at this point sacrifice continuing on a series, because I’d just remember where I left off, and I could just select the next one. That’s one concession I’d be willing to make, but there was also one workaround I could do as well — for the individual episodes, I could split the media files into chapters and use that as a poor man’s playback system. It was a good idea, in theory, and I probably would have pursued it further until I ran into another problem — a lot of shows on DVD don’t have chapter markers … which means that I’d have to go through them and find them myself. What about if I just cut it in five minutes increments though? No. Maybe the show has the same commercial breaks in every episode. Nope. Maybe, test, maybe, test, maybe. Nope, nope, nope. Nothing was working out.

Oh, well. I hadn’t had a solution that really met my needs in a long time, so I wasn’t really disappointed per se. I had just found another solution that didn’t fix my problem. It was fun to play with, though, and I did a lot of documentation on what would work streaming vs. local playback (another fun intricacy, my Blu-ray player would support different formats + codecs over DLNA than it would on USB .. same with the PS3).

Blah de blah de blah. If you’re getting bored reading by this point, coincidentally I’m getting bored by writing it, so I’ll wrap it up.

At some point, I discovered Plex. I don’t remember all of the details about how I found it or got started with it, and I think it’s because it all happened *so* fast. It probably overnight became the solution I was looking for. Here were some of the features that just slapped me in the face:

* Automatically fetches metadata
* I can *override* the metadata and use mine if I wanted
* PS3 app
* Web frontend that was sexy-go-nice
* Most importantly, direct hardware playback … no encoding!

Since I had played with the PS3 and (by this time) my PS4 with DLNA so much by now, I had really warmed up to the idea of using my game controller as a second remote. It didn’t bother me. Plus I’d use it to stream Netflix and Amazon Video since I liked it better than my Blu-ray player, and it worked out well. So, the timing was perfect and everything just kind of fell into place. And that’s what I’ve been using since.

I’ll go into more details in other posts about *how* I use Plex and *how* I encode stuff so I get direct hardware playback and all that stuff, but this post is just all about the journey.

Suffice it to say, that after fifteen years, I finally got the media setup I wanted. And I’ll explain how.

“If I’m watching, it’s working.” Well, it’s working. :)

My current setup!

Edit: Life with OCD!

  1. I have meds now that help me not super-hyper-focus to a point where it’s detrimental in my daily life.
  2. Being labeled with a mental illness for me “gives a name to the beast,” and by so doing, it helps me realize the source behind some madness. That’s what happened here. I still “have it,” but have much better perspective knowing it’s there, and am able to circumvent it by acknowledging it’s presence and “input” on ideas.
  3. OCD stands for Obsessive Compulsive Disorder — however, did you know that those are two different disorders lumped into one? It’s not unusual for that to have a diagnosis cover a spectrum of issues. There’s the obsessive disorder, and there’s a compulsive disorder. Someone may have one, the other, or both. In my case, I have the first. I get obsessed with how things are in my life, the most common being trying to reach a level of perfection — this entire post illustrates that point. It doesn’t affect me too much other than that, since it’s highly personalized on what I’m obsessive about, which is almost always, the way things are set up for things that I highly care about. Meaning, not everything.
  4. It’s common when someone hears about OCD to picture a person scrubbing their hands multiple times when washing their hands when they bleed. That’s compulsive. I don’t have that, thank goodness, and I can only imagine how stressful for people it would be that do.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s