A Django site.
October 6, 2008

Steve Dibb
beandog
wonkablog
» pimp my mythvideo: coverfiles made simple

his being my third patch to fix some mythvideo nags, I’m actually starting to get comfortable going in there and trying to find this stuff. It’s still incredibly difficult to try and figure this out, since there’s little documentation and I vaguely understand C++, but it’s fun to attempt and cool to succeed.

This patch fixes an annoying problem I’ve had for a long time — it’s a royal pain setting a cover file for a video. A cover file would be the actual image that shows up in the gallery view for a media file. Without one, you just see a blank little icon which is pretty boring.

Folders are really simple — you just add folder.jpg (or .gif or .png) to the directory, and it will show that. Individual files are a bit tricker. If you were just using the interface, you’d have to first go into the Video Manager to let Myth scan the directory of files, create an entry in the database, then go find the file, edit the entry, and set the coverfile manually.

I originally wrote a script to do that part for me. I would just create a JPEG image for each media file, usually with the same filename, but a different extension, and code in a check to see if both exist, update the videometadata table. All the time, I kept thinking though, it would be so much simpler if Myth would just check to see if the file existed like the folders, and display it. That’s exactly what this patch does.

I pretty much just copied the same code from the part where it looks for the folder icon, and did the same thing. If, for example, you have movie.avi, just create movie.avi.jpg (or .gif, or .png) as the coverfile and you’re done.

Actually, you do have to put the file in the database first, since it still checks to see if there is any metadata for it at all. That is extremely simple, though, either by script or UI navigation. The UI will just add new ones quietly, and you can quickly exit out. The patch will still use your coverfile in the videometadata table too, if there isn’t a similar filename that it can find, so you can apply this and it won’t break your existing setup.

As usual, the ebuild is in my overlay. This one is mythvideo-0.20.2_p15087-r3.ebuild. I’m going to eventually document these a bit better and file bugs with upstream. I know I’m using an “old” version to patch it onto, but the reality is that SVN hasn’t changed at all since that revision, so even the latest version bump is the same code.

I also spent the weekend working out a number of small kinks in my system and setup. I drafted up a new “wishlist” that I have of stuff I’d like to eventually get fixed, and it’s getting smaller all the time. Right on.

As far as mythvideo patches, though, I only have one last small annoyance that, while it doesn’t really bother me, does kind of throw me for a bit of a loop so I’d like to see if I can fix it. The bug is that folder names and file names are sorted differently. I can’t remember which is which off the top of my head, but one of them will ignore prepositions like “The”, and “A” on the front of titles and sort by the second words. So “The A-Team” would show up near the top of the list. Maybe it does that on both file and folder. Anyway, I don’t like it. It’s a bit confusing. I tried looking for where it does that, but I haven’t had much luck yet.

October 1, 2008

Steve Dibb
beandog
wonkablog
» playlist resume

I wrote about this a little bit a while back, wrt mplayer-resume, that I wanted to work on a way to resume playback from a playlist as well using MPlayer. Well, I finally sat down and figured it out last week. For some reason it took me a good while to figure out the logistics of how to do it rather than the coding. I dunno why. Anyway.

I wanted to wait to bump mplayer-resume until after I added something else, and this is gonna be it. Just gotta clean up the code and package it now, and it’ll be ready to go.

Here’s how it works though: the script, like mplayer-resume, acts as a wrapper to mplayer. In fact, everything is pretty much the same except that it saves both the filename along with the position in the playlist.

The problem I was having a hard time figuring out was that I wanted to easily make two options available: resume playback in the current file I’m in (old mplayer-resume functionality), and resume playback in the position in the playlist I’m in. I just finally mapped two keys on my remote, exit and stop, to take care of both of them.

Hitting Exit on my remote will save the playback of the current file and write that to the playlist position file. Then it also saves the seek time where I left off. Hitting Stop will kill the old entry and just add a line to the playlist saved position file that says what the *next* file should be on playback.

Pretty simple when you consider it, but it took me some time to figure out, mostly so that it seemed intuitive. I figured I’d have a hard time getting used to it, and hit stop accidentally and losing my place where I wanted to be, but so far it’s worked out fine. I’m happy with it.

I’m using it for playback of my TV shows, which is pretty much 95% of what I’ve got ripped on my media setup. I have a few movies, but no AC3 output, so I prefer to just stick those in my DVD player. It is the only way I can watch my Region 2 or 4 DVDs though. For TV, it works great, since I generally want to watch them in general succession of episode order. And if I don’t feel like watching a certain episode, you just hit stop and it’ll skip to the next one. Very nice. I suppose I could map a button to go *back* in the playlist if I screw things up accidentally, but I’m kinda running out of buttons to map on my remote. Besides, vague mappings that I’m supposed to remember usually hurt more than help.

» gpnl and packages todo

I spent all last week working really hard on getting my MythVideo setup all cleaned up (and I still need to write a post or two about some new stuff), and moving next in my todo list, getting GPNL and the Packages websites back up to speed is my next goal.

The thing is though, I haven’t worked on this in so long, I can’t really remember what it is I want to do.  Sure, I have a bug tracker, but if there’s anything anyone thinks should take priority (on the list or not), lemme know.

I only really have three main things on my plate:

- robbat2 showed me how to access portage metadata directly instead of using the SQLite module + backend, so I wanna switch over to using that (attempt #3 at accessing portage data, whee!)

- Need to start checking for EAPI 2 usage in ebuilds.  I have no idea what will happen right now, which means it’ll probably break things.

- Make displaying the ChangeLogs optional on the packages site.  Man, that gets in my way.

Oh, and note to self — also want to get aliz’s old stable candidates website back online.

September 23, 2008

Steve Dibb
beandog
wonkablog
» gentoo’s growth

DistroWatch has yet another “the sky is falling” post about Gentoo, and, going against habit, I’m going to comment on the situation in general.

I see a panicked argument on the threads every now and then that Gentoo is dying because of a lack of manpower.

Well, I’ll concede that as a distribution, we can use more volunteers. On the flip side, try to name one open source project that couldn’t benefit from more contributors. So in that case, we are no different.

One simple thing that I’ve realized lately is that the whole “foo is dying” argument rests on one arbitrary assumption: that a project has some standard of manpower that it needs to meet, and if it isn’t, it’s falling short. With that principle in mind, I don’t think Gentoo has ever been “dying”. It’s always been either growing or shrinking in strength, but dying implies that it’s not meeting up to its designated standard. The thing is, there is no standard.

Once upon a time Gentoo would have been just a brainchild idea by one person (Hi, Daniel), and grown from there. Was Gentoo equally dying when it lost maybe one developer among the five that were working on it? My question is basically this — where is the peak that we should constantly be comparing ourselves to? Is every record for growth our new standard? If you manage to get a 42 inch waist and gradually lose 10 inches, does that mean you’re dying? Sure, you can’t meet your same capacity as in the past, but that doesn’t mean you’re going to up and disappear.

The nature of any project — software, community, corporate, whatever — is that people come and go. People get burned out, want to move on, do something else. I would never be happy working on the first job I ever got, and by the same token, I don’t see myself working on Gentoo forever for the rest of my life.

Experience on my part has shown that while a group of users may unitedly cry the mantra whine that Gentoo is dying, individually, the reason is never universal. It all comes down to the the perception that it’s falling apart because one or a few small parts of what they want supported no longer is. Just because one popular desktop manager isn’t in the tree, does that mean that the collective work of every other developer is worthless? That’s an awfully short stick to measure by.

I’ve always been positive and optimistic about the future of Gentoo. One thing, more than any, I’m certain of, is that even should the distribution collapse in on itself and completely go away, the idea will never die. Gentoo has too many original ideas swirling all around it that will live on even if the primary project doesn’t.

September 19, 2008

Steve Dibb
beandog
wonkablog
» pimp my mythvideo: another navigation patch

I’ve been working on a bug all night I noticed the other day that really annoys me in Myth, and I stayed up poking at the code trying to find a way around it. Actually, it’s a little weird how I “discovered” it, since I always perceived in the back of my mind that there was something annoying, but never pinpointed it specifically what it was doing until this week.

The bug is this: when you are using gallery view in MythVideo and you enter a folder, when you exit back to the main root menu, it repositions that folder at the top, regardless of where it was when you entered the folder.

Some pictures will probably make more sense.

Here is a screenshot of what my folder display looks like when I enter MythVideo’s gallery for the first time, and browsing for a folder to select:

 

Now, when I select that directory, I’ll see the files in there. But when I hit Escape or select the previous folder icon, it will return me back to the root menu. However, the folder layout has changed, and the row that the folder is on, originally the bottom, is now at the top.

 

 

Moving around the position of the folder layout throws my brain for a loop every time it happens, because I’m expecting to see the same display as when I was just in there, and since it’s different I have to rescan the layout visually and reprocess where I am and where I want to navigate.

This patch fixes that, and keeps the layout the same when you return to the root window.

I went ahead and added a new ebuild in my personal overlay which will install it for you if you don’t want to patch it manually. The ebuild is mythvideo-0.20.2_p15087-r2.ebuild and it also includes my original navigation patch.

Now then, there’s one small bug in it that I’d like to fix, but I don’t know any Qt or C++, and it’s a miracle in itself that I managed to even get this far on my own. In fact, I’m quite proud of myself actually that I even figured this one out all by myself, go me. :)

I originally patched it so that it would just reposition the parent view around the last folder row you were in … that is, I was doing the same thing, but not specifically for the root menu, just any folder you went into. That worked fine, provided your tree didn’t have more than one level. The second you went into a third directory Home -> Foo -> Bar, the 2nd variable would overwrite the first one so when you returned to the parent it would be whacked. If that makes any sense. Anyway, for someone with Qt knowledge, it shouldn’t be hard to fix so that it always does that no matter which folder you are in, and at what depth level. I have no idea how, though.

It’s actually kinda interesting how I figured this one out. There were two things I noticed from poking around in the code. One, to get videogallery to dump out variables to stdout, I would add this to the code:

VERBOSE(VB_GENERAL, QString(”Some text.”));

VERBOSE(VB_GENERAL, QString(”Some variable: %1″).arg(someVar));

Yah, brilliant hacking on my part, I know, but I managed to kludge my way through it and figure it out.

The second thing I realized was that if I wanted to find out if I was on the parent tree or not, I would have to create a new instance of GenericTree and check to see if getParent() returned the main root or not.

GenericTree *lparent = where_we_are->getParent();

Then, if lparent != video_tree_root you would know you’re not at the top yet.

Anyway, yah, my awesome debugging skillz at work there, but hey — it took a lot of patience and more than a few rebuilds, but it worked, and I’m happy. Woots.

One last thing — the patch will also apply cleanly against current SVN (r18336 as of this writing) since it hasn’t changed in a good while, so you don’t have to use my ebuild if you don’t want, or you could just rename it to the latest snapshot in portage and it’ll still apply.

September 3, 2008

Steve Dibb
beandog
wonkablog
» bend, drip, mythvideo

Here’s something I haven’t written about in a long time — bend, my custom written CLI PHP5 scripts to rip and encode TV shows.

I actually rewrote the entire thing over Labor Day weekend.  What’s amazing is it took so long to write the original one, but so short a time to completely revamp it.  It’s something I’ve been wanting to do for a long time, and I’m glad I finally got to it.  The code on the old one was so horrible, and was such a frustrating experience to patch, debug or add features.  The new one is already 20 times better.

The first one was just plagued by scope creep, though — I started off just mostly coding it around the way that I thought DVDs *should* work and how they ought to be authored, only to be constantly slapped in the face by so many exceptions that I’d have to go back and hack it to work around the new found realities.

One example is that either lsdvd or libdvdread is buggy in how it outputs chapter information.  Actually, my whole experience with chapters have been that if there are any oddities, then the players will just freak out.  You wouldn’t believe the cases I ran into.  Anyway, here’s a small example.  On one DVD, lsdvd will report in original output that one track has 30 chapters on it.  But when you go to display the chapters, it will only say that there are two.  Most of the time, what happens, is that it will choke anytime there is a chapter between others that is zero length.  In this case, lsdvd just chokes and stops counting them.  MPlayer (at least, the ancient version I’m using) will do a couple of things depending on its mood — sometimes freeze, sometimes skip over it, sometimes act like its not even there.  It’s very odd.  I’ve found a lot of interesting little bugs in the dvd libraries and tools.  I’d love to poke and the source and fix them up … when I have time.

The code is online in my svn repo, and the new one is called ‘drip’ for dvd ripper.  Original, I know, but eventually it will replace bend completely once I add in all the features the old one had plus all the new stuff I want.  I would throw in a link to trac which has prettier display output for viewing SVN files, but my installation is broken (again) and I have no idea why, and it’s always a royal pain trying to figure out what went wrong, so I’ll just fix it later.  I love trac, but its not easy debugging the setup.

Oh yah, also I’ve been working on my mythvideo setup, tweaking it even more.  One really thing that dawned on me, which I’ll write in more detail once I actually have a script ready, is that you can use it to execute shell scripts using the File Types admin menu.  Just tell it to execute .sh files in your folders with /bin/bash and away you can go.

Another thing I learned is that MythVideo will only pass two variables to any external scripts, the default player (%d) and the video file (%s), or more accurately, the file you’ve selected to run.  So if you wanted to see what you’re executing, you would add this to the file type for .sh files: /bin/bash %s %s

Then, say you had test.sh, this would be the contents:

#!/bin/bash

echo $a

I’m getting ahead of myself, though .. I’ll write more about that when I’ve got something to show.  I’m actually working on a shell script similar to mplayer-resume to resume playback of a playlist you’re in.  It’s a bit trickier than I thought it would (or rather, not nearly as simple as I had hoped), so I’m still scoping it out in my head.

Speaking of mplayer-resume, I fixed a bug I kept running into with it for a while now.  The script will now catch the exit code of mplayer, and if it’s not successful (zero), then it won’t overwrite or delete the old position.  I used to hit it all the time because I used to run mplayer -hardframedrop when playing my videos, which would crash the playback about 10% of the time and of course kill the file that had the playback position.  I need to repackage it and push it live, but there’s a few more small fixes I want to make to it first … I might finish the playlist resume script first and add it to there.  Plus I want to get trac working, because that’s where it’s homepage is.

But, I moved my mini-itx to the living room and hooked it up to my HDTV.  It was sitting in my bedroom just collecting dust, and I figured I might as well move it to see if it gets any more usage.  Actually, I remember now, I moved it was because the LED lights were really bright in my bedroom at night, and I have to sleep in total darkness to get a good night’s rest.   Anyway, it’s worked out well so far.  My TV has a VGA port so it’s super simple to plug it in, not to mention I like the fact that it doesn’t use up an HDMI port.  I love my TV. :)  Once I have this series playlist resume script finished, I think I’ll be pretty much “done” with having the setup that I’ve wanted so long.  Well, aside from the fact that I need about 12 more terabytes of harddrive space.

Good times, I tell you what.  I’m gonna go watch some Star Trek TNG.

August 16, 2008

Steve Dibb
beandog
wonkablog
» mplayer + dvdnav + dvdread svn ebuilds

I updated the mplayer and dvdnav ebuilds in my small overlay, and added one for dvdread now, which has been split into a separate package.  I haven’t had time in the past while to keep an eye on what’s been going on, but I do know that the heavy flurry of development has stopped, and that the installer works better.  Plus, the software works fine for me. :)

My overlay isn’t in layman right now, so if you want to check it out, here’s the skinny:

svn co http://overlays.gentoo.org/svn/dev/beandog/

Have fun and lemme know if there’s any problems.

August 7, 2008

Steve Dibb
beandog
wonkablog
» quick and dirty opendns howto for gentoo (using openrc)

If, like me, you don’t trust your ISP’s nameservers to be patched and working correctly (or for them to sell you out to advertisers by redirecting broken links or whatever), then here’s a quick solution to setting up your box to use OpenDNS servers instead.

Using this assumes three things though:

  • You don’t have anything in /etc/conf.d/net
  • You are a DHCP client
  • You are using sys-apps/openrc

Anything besides that, you’ll just have to figure it out yourself, though the commands should be close.  BTW, someone correct me if I’m wrong.

Add this to /etc/conf.d/net:

dhcp_eth0=”nodns”
dns_servers_eth0=”208.67.222.222 208.67.220.220″

If eth0 is not your primary NIC, then you’d have to change that.

Then just restart net.eth0 (/etc/init.d/net.eth0 restart) and  you should see this in /etc/resolv.conf:

nameserver 208.67.222.222
nameserver 208.67.220.220

July 25, 2008

Steve Dibb
beandog
wonkablog
» finally rebuilding

I’ve put this off for a long time, but I’m finally rebuilding my desktop from scratch. Actually, my one at work, too. Today is a state holiday here in Utah, and it’s great taking a day off in the middle of the week. I honestly have no idea what time it even is right now.

Anyway, at home my box is a dual-core AMD Athlon64 something or other. I’ve stopped building boxes a while ago after realizing that while it may be only around $300 to get started, it ends up costing another $400 for all the stuff I really wanna get on there, like a decent video card and quiet power supply, so this has been my box for a while. In fact, I’m running the exact same motherboard in my media server as well. It’s actually really nice knowing that I can swap hardware between the two boxes in a pinch (which has already happened) without worrying about the specs.

This box has been doing great, and I really don’t use it for much more than just surfing the web, writing email and of course Gentoo development. I’ve had problems on and off with XFCE and X. Exiting out would kill all input, and I could never figure out the cause. It wouldn’t matter which video driver or video card I used, so I just worked around it — I’d switch to the shell if I wanted to kill X, instead of just logging out, etc. But, one thing I sorely miss is using tuxonice, so today I finally decided to take the plunge and scratch it all.

It has been a long time coming, too. I can’t even remember the last time I installed the system on here. Generally speaking, I usually reinstall anyway just to clear out cruft and what not about every 18 months or so. It’s also a good way to keep me on my toes with new installs — my biggest problem is *still* forgetting to change my root password from a fresh stage3 install.

I’ve gotten pretty far, as I’m writing this in Seamonkey right now, and I started this morning. I’ve already been going through the list of stuff I had installed and it’s amazing how many applications I try out and then completely forget about. I’m actually excited to try out the new jobs and resume options in portage, see how that changes things around.

Actually, the thing that kicked off the reinstall at home was that I finally broke down and decided to do my one at work, first. The box is also a dual-core 64-bit machine, but it’s an Intel Pentium D. Now, for some reason, I have *never* had much luck with any of the Intel boxes. I always have some stupid problem where they just end up unresponsive for some reason that I’ve never had on the AMD boxes. I’ve never been able to pin it down, and so I’ve been methodically getting rid of any Intel-based boxes I have around.

This one at work is particularly painful though, though it’s mostly my fault. It’s only got 512 megs of RAM in there which is the obvious bottleneck in today’s modern desktop scenario — especially for a Linux workstation like mine where running a dozen applications all at once is the norm. At first I tried to resist doing anything about it so I changed my CFLAGS to -Os to save on memory (which I probably should have done in the first place), and while that helped, everything of course slowed down by a huge magnitude. Still, at least I wasn’t having jerkiness — it just took everything twice as long to load and save.

I finally broke down this week and shelled out $50 to buy 2 gigs of RAM for the machine. I haven’t been watching computer prices at all recently, so I was quite surprised by how cheap it was. In fact, I’m tempted to put more in my box at home. I’m sure that’ll fix things up alright. In the meantime, it’s reinstalling right now, chugging along, and seeming to do fine. I think I needed my head cleared of all the crap more than that box did, really. Sometimes, even though we technically don’t need to reinstall, it’s just a good mental relief knowing that you’ve done everything you can to make things run better. That’s a hard belief to argue against.

One thing I also did on my box at home is I finally switched over to ~amd64. I’m running unstable, which may not seem that big of a deal, but my policy over the last six years or so of using Gentoo, on my desktop at least, was to use the stable tree. Slowly, though, one by one, on all my other boxes, I’d switch them over to unstable and just run that tree, and I found that more often than not, it runs just fine without a hitch. I first switched over with my myth box, when I realized that my package.keywords file was longer than my arm — if there was one thing I always wanted the very latest bleeding edge code of, it was all the bugfixes and improvements for the multimedia software. The myth box is an obvious choice, and even then, you get it to a working point and then just leave it alone for an eternity. Those last two sentences just contradicted each other, I realize, but anyway, the point was — well, I forget.

Ooh, this –jobs option is pretty cool. Good work, Zack. :) Gentoo rocks, what more can I say.  After all this time, I’m still a fan.

July 17, 2008

Steve Dibb
beandog
wonkablog
» mplayer and transcode fixes

Since things are finally starting to settle down (hey, I’ve had Internet for a week now, cool), I’ve started getting back to poking at stuff, slowly. Today I cleaned up some mplayer and transcode stuff in the portage tree, and I just thought I’d mention what’s new.

First of all, mplayer. The latest revision is 1.0_rc2_p27120. The snapshot itself is about a month old, and I don’t know of anything particularly major that’s in there (I haven’t had time to follow development for the past month anyway). It’s been masked for testing, not because upstream has done anything funky, but because there are some new use flags, which have helped me to go back and clean up some stuff that I should have done a long time ago. I haven’t heard a peep from anyone on bugzilla so either no one’s tried it, or it works great.

The big changes that I can think of off the top of my head are this: first of all, there’s an ewarn added if you enable the cpudetection flag. It finally dawned on me that this one might not make sense. Here’s what it *doesn’t* do — magically make the build detect and build for your CPU architecture. The build system already automatically detects and installs with the correct instruction set by default, using stuff like MMX, SSE, and friends. The only reason (that I can think of) that you would use that, is if you were deploying the binary package on another computer, since it is a runtime feature, not a buildtime one. So, you’ll get a little warning if you enable it, because, in general, desktop users don’t need it. I also fixed the use.local.desc to be a bit more specific as well.

Secondly, there’s a new use flag: custom-cpuopts which should finally solve the long-standing dance of trying to outwit users who always break their system but still allow real tweakers to do exactly what they want. Here’s how it works. MPlayer’s build system, again, by default, will automatically detect the CPU optimizations that are supportd for your platform (MMX, SSE, again, etc.). That means that, again, if you leave everything by default — it should work fine.

Originally the problem we would have is that people would have their CPU optimization use flags turned off (like mmx), which would normally break the build. The ebuild is written to only disable them if they are turned off, so my solution for a long time was to tell people to just turn them all on and let MPlayer *not* disable them, therefore, revert back to autodetection. This would then cause problems, though, for those few who were building MPlayer for some other box, and they wanted specific CPU opts on or off. This use flag will fix just that.

What custom-cpuopts will do, when enabled, is forcibly enable or disable the actual CPU optimization use flags you set. This will help out those on certain profiles and setups who need to tweak their build for whatever reason. For normal desktop users, you don’t need to enable it — if it’s turned off, the ebuild will completely ignore the other use flags (for CPU optimizations) and just use the default checks … which work great. It also means that your build will be optimized the best it can, yay!

I know I really went into depth on that one, but it’s been an issue with the build and users for a long time and I’m glad I finally got a cleaner solution working. Now everyone has the options to do whatever they want, but by default, everything should build and be optimized wonderfully.

Oh yes, one last thing — if someone wants to fix bug 228799, and submit a patch upstream, I’d be extremely grateful. That would clean up the LINGUAS hack in our ebuild, which I’ve heard breaks on paludis anyway.

As far as transcode — I’ve been out of the loop, and the media-video team has been taking things over and cleaning up (I don’t even know who, sorry guys, haven’t taken the time to look into that either — I know loki_val fixed up some imagemagick / ffmpeg dep crap that I didn’t want to touch, thanks man!). 1.0.5 is back in the tree, and should be the next stable candidate. I also added another rc for 1.0.6, and I have to add the 1.10 beta sometime.

That’s about it for now. Have fun. Go break your box. :)

June 27, 2008
» Why doesn't pushd popd work in my Ubuntu shell script?

I'm in the process of moving over to my new laptop. I run into an issue where a shell script (that worked under gentoo) now no longer works. Here's the error foo.sh: 18: pushd: not found Since I'm running this as sh foo.sh, I turn on debugging wit

» New lappy, Lenovo T61p (linux edition)

My trusty r52 switches between a state of 100-200 free megs of memory and no memory on the 40 gig hard drive. Rather than investing in an expensive IBM harddrive (I've heard the BIOS on my machine won't take normal OEM drives), I got a new computer.

June 12, 2008

Steve Dibb
beandog
wonkablog
» charlie the unicorn ringtone

Okay, this is great. This morning at work we were talking about YouTube videos, and then cell phone ringtones, and we got the awesome idea — let’s make some ringtones from YouTube videos! Sweet!

So I downloaded the incomparable video Charlie the Unicorn, used audacity to cut out the Candy Mountain song, and then uploaded it to my cell phone with Bluetooth using my co-worker’s Mac. Freaking right on.

It’s a mecca of love, the candy cave!

Okay, so if you wanna know the technical details, here’s specifically what I did:

Download the youtube video using youtube-dl:

$ youtube-dl -b -t “http://youtube.com/watch?v=Q5im0Ssyyus”

Extract the audio to WAV format using MPlayer:

$ mplayer charlie_the_unicorn-Q5im0Ssyyus.mp4 -ao pcm:file=candy_mountain.wav

Edit the WAV file with Audacity, select the song portion, and export it to MP3 with a64 kbps bitrate. The start point was 2:26 and it’s 42 seconds in length

$ audacity candy_mountain.wav

And that was it! Instant ringtone goodness. :) Here’s the MP3.

June 11, 2008

Steve Dibb
beandog
wonkablog
» larrythecow.org reflux

Something else I’ve been meaning to do for a while, is get the main site up for the larrythecow.org domain since I started hosting stuff there other than planet. Today I got the idea that it might be fun to just have a page of resources of community pages that people are working on. So, that’s what I did.

If I missed anything, just let me know.

Edit: If you are getting redirected to Planet, then clear out your browser’s cache.  I originally had a permanent redirect going there, which should have been temporary to start with.  Whoops.  The old RSS feed links still work though, for everyone who never updated their entries.

June 4, 2008

Steve Dibb
beandog
wonkablog
» importing ebuild dependencies into gpnl

I’m still working on getting ebuild dependencies into the database so I can query them with GPNL.  Getting the actual deps was easy, and that part I just barely wrapped up tonight.  The hard part is getting a fine-grained look at which dependencies are which.

Right now, I’m not too sure what the SQLite database generated by portage is doing, as far as setting DEPEND and RDEPEND.  It *looks* like it’s dumping all of RDEPEND into DEPEND, which makes sense as far as pulling in which packages to install, but that makes it hard on me to determine what the actual run time deps are — assuming that’s what it’s doing.  The fact is, there’s a number of possibilities (no DEPEND, no RDEPEND, empty DEPEND, empty RDEPEND, packages in both, etc.) that really the best way to determine which is which is to do something I should have done a long time ago, which was to write something that will parse the ebuild files directly for the variables.  Then I could easily see which ones are set, and which ones are included.

The fact is, though, that I wouldn’t have been able to do that until recently anyway, and the first time I tried it was when I first started on the package.  At that time, it was a such a disastrous mess trying to parse them as text files because you have random comments and straying lines and unquoted variables that it was just too much of a hassle to deal with.  Now that I’ve got regular expressions setup to figure out the difficult stuff like breaking down atoms into every version component and finding the package name from any atom, it should be much simpler to handle.

Until then, though, at least I’ve got dependencies, so I can add support to GPNL real soon now so we can dynamically query which packages at least depend on others.

In setting up the system, I’ve run into some interesting scenarios as well, as is usually the case.  I’m always thrown a few curve balls that I never would have expected and they either turn out to be QA issues or gentoo culture that I never could have accounted for.  One of them I hit this time was that I kept having ebuilds with dependencies for packages that were no longer in the tree.  At first I was confused, as it seemed like an obvious QA bug, but then looking at it closer, (almost) all of them are blockers — that is, don’t include this package in RDEPEND or DEPEND.  It leads to an interesting question like, how long should that be in there once the package is removed from the tree?  Who knows.  It’s fine to leave them in, I guess, but still, it’s interesting to run into stuff like that.

There’s still a lot more work to do, besides breaking down the actual RDEPEND and DEPEND variables more closely.  One thing I didn’t realize until tonight is that included in the variable is all the dependencies of the eclasses.  So if you have an ebuild using the kde eclass, then the ebuild will also have a dep for system packages like make and libtool.  I need to find a way to clean those out as well, obviously.

Fun stuff.  I hope to have an additional section soon for GPNL on the ebuild page that will display the dependencies, and in turn a possibility to display them in reverse.

May 24, 2008

Steve Dibb
beandog
wonkablog
» what i’m working on

Just another update on what I’ve been poking at lately.

I’ve mostly been cleaning up really small stuff, small bugfixes that have been annoying me for a while.

GPNL / Packages

For the packages website, I finally fixed it so that you can search by just package name again. It’s still messed up where it searches way too much stuff by default, but that’ll be fixed soon. It was originally searching by atom and description, so stuff like package$ would break.

I did, however, put the basic search I want to add to the packages website into GPNL: search by atom, package, category, description or all. I need to add changelog to that list. It’s not much, I know, but it’s a start on the long road to getting an advanced search going. I also cleaned up the front page a bit, and added a link to the nightly database dumps.

I also cleaned up the bash script to import the data. It actually has the beginnings of some error checking now, so you shouldn’t be seeing blank pages anymore. And the database is vacuumed correctly, and on a regularly basis, so things should be slightly snappier. I’m also importing the entire portage tree 3x daily now instead of twice. The import script is actually a nice cleanup for me, because if something breaks, I can run parts of it partially, instead of having to manually fix it. It’s much nicer.

My next big thing is getting RDEPEND searchable.  In the database, it’s combined with the DEPEND variable, so I have to separate the two out.  Once that’s done, we can finally dynamically query the tree to see where ebuilds need to be fixed for binary packages.

MPlayer / Transcode

Looking better, closed like eight bugs the other day for mplayer. Finally fixed some asinine bugs of mine for transcode, have one more to go.

Took out the masked libdvdnav because it will conflict and break libdvdread. I already wrote about how I put it in my overlay so if someone wants to use it, they can.

Sword ebuilds

I finally got pretty much all the main ones in the tree that I wanted to get in. There’s still two LDS ones that I have to make myself. Shouldn’t be too hard. I hope. In all, there are 150 sword ebuilds in the tree. Freak. That reminds me of something else I fixed on the packages website: it lists the number of results. That’s something else that’s been annoying me for a while.

I still need to remove the old sword-modules ebuild and add a new virtual-type one that will pull in all of the ones based on which language they are written in. Not hard to do, just slightly tedious. Should be done soon.

lds-scriptures 3.0

Believe it or not, I’m actually planning on getting this finished this week. The actual data has been finished for a very, very long time… it’s writing the documentation that I am extremely particular about because I plan on this being the final release.

That’s about it for now, that I can remember.

May 13, 2008

Steve Dibb
beandog
wonkablog
» blu-ray dvd drives

An interesting post came up the other day on the Gentoo forums about how to rip Blu-Ray discs on Linux. Short summary: I have no idea if it’s possible, and the original poster is still investigating. It has gotten me thinking though. The Blu-Ray player that I want to get it is $600, and it looks like it’s being phased out of production anyway, so why not get a disc drive instead and rip the movies? It’d save me some money, and I’d eventually buy one anyway.

Well, the questions that come to mind are, will the software actually work, will the drive firmware let me do that, and am I going to have to use Windows?

I haven’t done any research at all, mostly because I can’t afford to buy a DVD drive right now, but the whole thing does have me curious. I always assumed there was no way to rip the stuff under Linux, but I haven’t gone looking for possible solutions either. The only thing I am sure about though, is that once ripped, you can play the content just fine. At least, I think so. I’m not positive about the HD audio codecs, pretty sure about the video ones though.

I tend to buy hardware first and figure out how to get it working second, but because the DRM is so finicky in this case, I really don’t want to take that approach and be out a couple hundred bucks.  In the meantime, I really wish I could at least demo the stuff at home.  That would be cool.  The only 1080p content I’ve seen so far is the movie trailers I’ve downloaded from Apple’s website.  I gotta say that stuff looks pretty good.

» planet, packages: small bugfixes

I took a few minutes today and cleaned up a few small bugs on Planet Larry and friends.

One thing I get asked for every now and then is if I have archives of past posts. Well, I do now. I just copy the HTML file of the last post to $date one each run. A simple and unelegant solution. I’ll be doing the same thing for Planet Gentoo soon.

Also, fixed the FeedBurner link on the main page — I didn’t even realize it was broken. While I was at it, I created one for Universe as well.

On the packages website, I finally fixed it so you can search against just packages again. That’s been annoying me for a while. By default the search is way too wide, I think. It will search the full atom, the package description and the package name. I have to do the package name twice because of regular expressions (starting with, ending with, exact matches, etc.). And there’s still no simple way to search for packages containing multiple words, which is also an annoying little bug. Advanced searches for GPNL and Packages has been something I’ve wanted to do for a long time, but have been putting off since I started the projects. Sheesh. Every time I sit down and start to poke at it, though, I realize just how big a beast it is, based on what I’d like to accomplish. I really need something for the interim, though.

Anyway, I better quit before this post gets any more boring. One last thing — we can use more users who are Gentoo users and have a blog on Planet Larry. Just drop me an e-mail and I’ll get you setup.

May 1, 2008

Steve Dibb
beandog
wonkablog
» mplayer + dvdnav svn ebuilds

There has been some recent activity again on the libdvdnav front, and so I’ve been playing around with it again.  I finally created an SVN ebuild for MPlayer which I can use myself instead of just manually updating and reconfiguring the repo myself.

Generally speaking, I don’t like the idea of ebuilds that hit upstream’s SVN servers directly, so please be kind and don’t do anything asinine like upgrade every single day or something.

So now I have live subversion ebuilds for both libdvdnav and mplayer.  This is the important thing to know about the libdvdnav ebuild: it has some changes to libdvdread so you will have to unmerge the one that is already uninstalled.  On top of that, since it is a new API version, everything you previously compiled against libdvdread (k3b, etc.) will have to be re-emerged … and even then, there are zero guarantees that it will work at all.

In short, these ebuilds are only designed for a select few: those people who are using mplayer exclusively and want to have dvdnav support at the risk of breaking anything else that needs DVD access.  Obviously, that scenario fits for someone with a media frontend, but doesn’t make sense for general desktop usage.

Also worth noting is that these are the only two ebuilds that will work together.  Previously, the mplayer in the tree would have detected and worked with the libdvdnav ebuild, but that’s not the case anymore.  It’s these two in the overlay, or the mplayer in the tree.  Pick one set and choose.

If you have problems with the ebuilds, let me know.  I’m still not an expert at layman so I can’t go about giving you instructions on how to install this stuff directly.  Have fun, though.

Oh, and last but not least — I tested them, and it works for me. :)  Just emerge libdvdread first, then mplayer.

April 28, 2008

Steve Dibb
beandog
wonkablog
» pimp my mythvideo: navigation patch

Even though I can’t code in C++, or anything more hardcore than bash (and even that’s pretty sketchy), with a push in the right direction from a noble soul in #mythtv, I managed to mangle a patch together for MythVideo that fixes some annoyances that I’ve had for a very long time. They are:

  • Filenames won’t display underscores, but folders would
  • Getting rid of the “cover image” screen in the gallery
  • No page up, page down support with your remote

The patch is here, which should apply cleanly to media-plugins/mythvideo-0.20.2_p15087. Or you could just try and use my overlay directly. If you look at what I’ve changed, it should be really simple to make the same changes to the most recent version for SVN, since I don’t think the file has changed much between releases. Creating patches is also not my favorite thing to do, and in fact actually took me longer to create the actual diff and apply it correctly then it did to hack the code.

Here’s a complete list of what I changed, if you don’t want to go digging around the code and determining what’s happened for yourself:

First, the issue of page up / page down. Sure it’s nice that you can do that with a keyboard, but if you are using a remote, it’s painful scrolling when you have a lot of folders to look through. I remapped 1 and 7 to emulate Home and End, and 3 and 9 to emulate Page Up and Page Down.

Second, for the display of folder names, if it has an underscore in the title, that is replaced with a space. This is consistent with the naming scheme for the actual files.

Third, and always most annoying to me, is that I got rid of the information screen that displays all the metadata about a movie after you select it in gallery mode. I always thought that was pretty useless, because I already know what I want to watch, and didn’t like having to hit enter twice to start playback. There was a shortcut already, you could just hit the Play button and it would skip the screen, but I think this is more effective and natural.

Finally, I disabled the Menu, Filter and Info options by commenting them out, for the only reason that I never used them and sometimes they would pop up when I was debugging stuff with mplayer and my remote.

Needless to say, I’m much happier now with my user experience, since MythVideo is all I’m using right now. I have a really low tolerance for small tweaks that bug me, and I’m glad I finally got these taken care of. Besides, it’s forced me to start learning some C++ (again) so I don’t have to keep relying on people to help me get started.

Now I can go back to watching Roger Ramjet and Knight Rider in navigation harmony. It’s great. :)

April 25, 2008

Dennis Muhlestein
nonic
All My Brain
» Using Multiple Python Environments With Gentoo

It's been some time since Python 2.5 became stable and released. Version 2.5 has plenty of new features that have helped me in deciding that it was time to go ahead and start using it for primary development of all my new projects. One of the reasons I was still using version [...]

April 14, 2008

Steve Dibb
beandog
wonkablog
» alsa-driver-1.0.16

I’ve finally gotten around to bumping alsa-driver in the tree.  This is the first time I’ve done it all by myself, and really, about the only thing I’ve ever done for ALSA on Gentoo since joining the herd probably a year ago.

While the bump isn’t so much an interesting story, what probably could use some clarification is the status of the package itself.  First of all, it’s unsupported.  Mostly.  That is, I’m the only one who is maintaining this package, and it’s mostly out of a sense of obligation and the fact that I use it now and then.  But if you have problems with it, there’s not gonna be much I can do.  It’s completely unsupported by the alsa herd, as the official recommendation is to use the in kernel drivers.

Anyway, I’ll fix whatever I can, but if you have a bug, assign it to me (beandog@gentoo.org) and not alsa-bugs.

As far as changes go, you can see what’s new in this release from the alsa project homepage.

March 24, 2008
» Undeleting photos on (gentoo) linux/windows/mac

This post is preceded by a public service announcement to back up all important data, often. (So far it seems the best way to back up photos is to get them printed/developed). Had a scare with a half gig compact flash card acting up on me, that cont


Steve Dibb
beandog
wonkablog
» packages.larrythecow.org

Well, it’s finally done, or at least a state where I can release it to the world.  I’ve written a clone of the original packages.gentoo.org website, with the same postgres + portage backend that GPNL uses, and it’s now available online here: packages.larrythecow.org

I’ve been working on this thing non-stop for the past two weeks at least, and I’m really excited to have it done and up and running.  I loved the original design and site, and used it quite a lot.  It’s a great resource to just randomly find packages that are in the tree if you ever browse it, and find new stuff to try out.  Plus, it’s a great way to search the portage tree as well!

The search is one thing I’m pretty excited about.  Just like eix, it will accept regular expressions as input.  So if you want to search for an exact package name, try ^portage$  If you want to search on more than one word, seperate them with pipes: foo|bar  There’s lost of stuff you can do, so have fun. :)  I’ll have an advanced search sooner or later.

Speaking of feature requests, I have also setup a Trac project page for the backend, where you can see which bugs I’m going to be working on.  You’ll notice that getting some Atom and RSS feeds is on that list.  I’m sure people are going to want that.

Also, one small drawback, is that it only updates once a day right now.  The only reason for that is because my server is just a small little Athlon, and while it could handle the load of updating more regularly, I don’t want to put too much of a strain on an already overworked little system.  I’m going to look into ways of optimizing things so that I can get updates out the door more frequently, but for now, it’s going to have to wait.

As always, feedback, comments and suggestions are more than welcome.  Please let me know if you find any bugs, too.   Enjoy. :D

» planet.larrythecow.org

I’ve just updated my apache config, and larrythecow.org and planetlarry.org now have a permanent redirect to http://planet.larrythecow.org/

There’s no need to update your RSS readers if it handles redirects okay, but eventually the content for the main domain name will change — not anytime soon, though, that’s for sure, I have zero plans right now. Even when I do change www.larrythecow.org to something else, I’ll still have the RSS feeds redirect so as not to break anyone’s feed.

Anyway, you’ll see why I’m moving to a subdomain here in a day or so.

Edit: More spring cleaning, now Universe has its own subdomain as well: http://universe.larrythecow.org/

March 20, 2008

Steve Dibb
beandog
wonkablog
» openchrome in portage

Just another Gentoo PSA, portage now has the latest driver for the openChrome X11 drivers for VIA chipsets (x11-drivers/xf86-video-openchrome). These drivers are really nice because they support more chipsets than the standard VIA ones do.

I shouldn’t get any credit for this one. I’ve actually had an ebuild for this for like 4 months, and procastinated putting it into the tree. In fact, Donnie (dberkholz) beat me to to it — thanks, man. All I really did was clean up the ebuild and do some testing. Also, of course, thanks to upstream for actually working on the project and getting something successful out the door. Much love.

So there ya go. With that little driver you should be able to do some cool stuff with those Mini-ITX’s that you’ve been waiting to convert into a PVR. Rock on.

March 17, 2008

Steve Dibb
beandog
wonkablog
» new gpnl backend

Nothing new on the frontend, but the backend for GPNL has been almost completely replaced now with my updated changes.  The difference in speed alone is pretty nice.  Where it took about 30 to 45 minutes to import the entire tree, now it only takes around 5.  Plus, I’m importing more stuff this time.  That means a lot more flexibility on my end to play around with the code and do some debugging if I have to.

There’s still some minor sorting issues to worry about, but I’ll have that worked out by today.  I’m also working on a really cool proof-of-concept using the postgres database as a backend, that will hopefully be ready soon within a few days.

The next stop is to get GPNL to do some more reporting on QA checks.  I need some ideas of what to look for, but already there’s a few things I can do just by running system-wide queries against the entire tree.  One issue that has come up recently is the splitting of DEPEND and RDEPEND correctly for building binary packages.  Given a list of packages to look out for, I can easily report that.  Another one that phreak came up with was to look at redundant data in the metadata.xml files.  I can also duplicate that with a simple query, so that’ll be easy to track it’s progress in getting cleaned up.

Anyway, I could use some more ideas.  It’s one thing to have all this data gathered, archived and indexed, but it’s another to come up with creative ideas on how to use it.  Looking through the QA bugs usually helps to give me an idea.

March 13, 2008

Steve Dibb
beandog
wonkablog
» what i’m working on

I just thought I’d send out a random update status on the stuff I’m working on in Gentoo right now.

 alsa-driver: Putting it on life support, going to have a bump here for 1.0.16 pretty soon.

webmin / usermin: I thought someone was taking care of it, they weren’t, so I took it over after finding some annoying bugs.

GPNL: The new code is 99% done.  All that’s left is I need to rewrite checking for masked packages and then find where the code is lagging, and push it live.  Then I can start working on some advanced searches, and starting to run some checks for QA issues.  One I want to put in there soon is checking for RDEPEND/DEPEND bugs.

Sword modules: Kinda dropped the ball on this one, I still have a lot more to add to the tree.

Openchrome: I still need to add that to the tree.

Planet: I’m thinking it’s about time to upgrade our b2evolution.

And that’s about it.

March 5, 2008

Dennis Muhlestein
nonic
All My Brain
» Gentoo with an Intel DQ35MP Motherboard

I'm slightly sad to see my old radeon 9600 card with Compiz being obsoleted. My motherboard in that machine shorted out somewhere and I was left with a bricked machine. Since the product was essentially about 5 years old, I decided to go ahead and buy new equipment. I'm now the proud owner [...]

February 28, 2008

Steve Dibb
beandog
wonkablog
» mplayer + dvdnav support … kinda

If you’re looking for mplayer + dvdnav support, there’s two ways to get it right now. Depending on how much support you want is going to change which ebuilds you’ll have to use right now, though.

If you just want simple playback support (no menu navigation), then use portage’s tree. Just unmask and emerge media-libs/libdvdnav, then re-emerge media-video/mplayer. That will build against the older, original dvdread library, but it should be enough to get you around the Sony ARccOS DRM. Hint: mplayer dvdnav://[track_number]

If you want the full playback + navigation support, you’re going to have to use an overlay (specifically, mine). I, personally, am against the idea of using overlays since I think it splits the tree, only asks for problems, and reminds me of using Mandrake back in the day when I had to have all these third-party mirrors just to get software I want. So, I’m really against the idea and wouldn’t be doing this unless there were an easier, simpler way.

Ranting aside, my overlay is at http://overlays.gentoo.org/dev/beandog Browse the ebuilds here. I would give some slick instructions on how to add it using layman, but since I never use overlays, I can’t tell you how, and I assume that the people who really know what they’re doing don’t need instructions anyway.

There are very few differences in my ebuilds. libdvdnav will use the newer version of libdvdread, so the one from the portage tree will show up as a blocker (and possibly break all your other packages that use it). After it’s installed, you’ll have to use my mplayer ebuild as well, since it’s configured to use the external dvdread library as well. After that, you can use dvdnav:// as you normally would. Hint: mplayer dvdnav://

I know it’s a bit of work, but until the forked libdvdnav can also work as a replacement or secondary slot to libdvdread in the tree, either option which would require testing, that’s how its gotta be. The plus side though is, it works. :)

» sword modules in portage

I have finally gotten around to something I’ve been wanting to do for a while: cleanup the modules for Sword, the text-reading software applications. I thought that the easiest way to handle the modules from here on out would be to create individual packages for each one. They used to be bundled all in one package called sword-modules, which is still in the tree for now, but it was a bit cumbersome to manage.

The new packages are going in the app-dicts category, and you’ll see them trickle in as I get around to adding them one at a time. There are a lot of sword modules altogether, and I’ll probably add all the ones that are freely distributable.

The irony of all this is that I don’t even use any of the Sword apps myself. I don’t like reading books on the computer. But, I know they are popular with some people, so I’m glad to take care of them if I can.

Eventually, I’ll make a new virtual ebuild for sword-modules that will pull in all the ones available based on your LINGUAS variable. It’ll probably be a while before that happens though.

Also, if you’re looking to roll your own ebuilds, there’s a new eclass in the tree, called sword-module. It cuts down on maintenance for me. I’m open to adding other dictionaries in the tree if someone has any — there’s no reason to use just the “official” ones.

February 26, 2008

Steve Dibb
beandog
wonkablog
» gpnl updates

I haven’t written anything about the Gentoo Packages That Need Lovin’ (GPNL) project in a long time, but I thought I’d bump an update. There’s no major releases on the horizon, but I’ve been working on revamping the entire backend in my spare time.

The thing that spawned the change is that I realized you can have portage store its metadata in sqlite. I took a peek at the database and it’s got a lot of good stuff in there. So much, in fact, that I’m pretty sure I can use this instead and do most of my data collection in a mesh of scripting, SQL and regular expressions, three of my great loves.

More specifically, I’m basically taking an sqlite dump, porting it into my postgres database, comparing the data, deleting the old, adding the new, normalizing everything and then cleaning it up for display. It’s actually a fun, challenging project. With the data that comes with the sqlite dump, I’ll be able to do more stuff as well, like finally display eclasses and proper dependencies (thank goodness). I’ve been wanting that for a long time.

The best part though is that almost all of the heavy lifting now is all through SQL. That makes things incredibly faster for me. Importing the data into the database before would take literally between 45 minutes and 2 hours. Now, though, I’ve gone back and cleaned up all the crap and it takes maybe 2 to 5 minutes to do a completely clean import from arches to ebuilds.

One thing I’m glad for is that this project has taught me to clean up my SQL skills a little bit. The main reason the import process was so slow before was because I would delete all the data from all the tables and then repopulate them. It would take incredibly long because of all the cascading deletes. Now, though, I just do incremental updates and deletes, so only what’s recent gets updated. It’s much faster, since you’re touching just a small percentage of the data.

Another cool thing is I got to upgrade to Postgres 8.2 which has some nicer string functions, like regex_replace. One challenge I ran into was stripping the portage versioning suffix off of an atom, but I eventually figured it out.

Anyway, I’m getting really close to having the import process cleaned up completely, so then I can get back to fixing up the frontend and making it actually worthwhile. Good times.

February 14, 2008

Steve Dibb
beandog
wonkablog
» mplayer snapshot bump

I normally don’t post info about version bumps, but since the last MPlayer one was a while ago, and since I’ve been way too busy lately to work on anything Gentoo related, I thought I’d make mention of this one.

Not much to say, though, really … there’s a new snapshot in town (media-video/mplayer-1.0_rc2_p25993).  It fixes some security issues in older versions, which was the reason for the bump.  I’ve tried to change my approach of bumping the package every month or so and instead just focus on getting one release working really well and as many bugs fleshed out as possible in that release.  So far the approach has worked well.

Normally I’d have a good idea of what’s changed between releases, but since I haven’t had time to keep an eye on mplayer-dev either, I couldn’t really say.  I think there’s a few DVD fixes, but I’m not sure.  Sorry. :)

Anyway, as usual, let us know if you have any issues.  Should hit the tree shortly.  Enjoy.

January 17, 2008

Steve Dibb
beandog
wonkablog
» lack, amount and willingness of transparency

There’s one other issue that seems to be a problem that users are talking about on the forums, and that’s a lack of transparency. I guess the belief is that everything is secret and since there’s little to no communication of what’s going on with the outside world, that developers therefore don’t really care about the users interest’s at all … or something like that. On the contrary, I believe that there is a great willingness to be transparent, but there is actual little amount of it simply because no one is tapping it.

For the most part, I think if you asked any developer or team what it is they are working on, what their plans are for the future, and what they’d like to see, that they will tell you. I know I’m more than willing to do a braindump on anyone who comes by asking questions on projects I’m poking at. Just because the information isn’t being voluntarily organized and presented doesn’t mean that they are withholding information — it just means that nobody is doing the organization and asking. So here you have two groups — people working on stuff and people wanting to know what’s being worked on — but no middle man to communicate from one to the other. The reasons for that, I think, are simple. One, it’s hard work, and two, it’s boring.

The newsletter is a good example to examine, though to be honest I don’t know much about the process that goes into providing one. I do know that having one on a regular basis has really raised the standard of living for users, and I also know that it’s a lot of hard work putting it together. I have on ocassion written articles for it, which is fun at first, but gets tiresome really fast. Maintaining the status quo is never simple. Even keeping a tree full of stable ebuilds for an architecture is an incredible amount of work, and it doesn’t always fall into the “this is fun” category. The reality is, someone is giving of their time voluntarily to do a lot of work to keep people’s boxes up to date or to keep the documentation nice and clean or whatever the task may be.

One thing that I think is a misconception as well is that there is always this mysterious group of people behind the scenes who are all working together to magically make this happen. As sad as it is, the reality is quite different — more often than not, it is just *one* person working on an entire project to see it through from start to finish. Generally speaking, you’ll have people contribute small amounts here and there, but for the most part, it’s always going to be one person doing a lot of the brunt work.

That’s why we need volunteers. The spirit is always willing, but the flesh is also always weak. I’m hoping to bridge that gap a little bit by writing up some ideas that will hopefully lower the entry barrier of how to help, and who to talk to about what, but that’s not going to change the fact that people need to get involved if they want to see things done right. Lack of manpower probably always has been and probably always will be the most critical element to deciding how sustainable and reliable a community project will be. There’s just a lot of stuff that requires maintenance that isn’t glamorous, but still needs to be done.

Anyway, I’m rambling again, I just was hoping to clear up some misconceptions. My main point though, is to get involved somehow. I know it’s a little difficult to find out how, and can be confusing at first, but I would suggest persistence. If you don’t get any answers the first time around, then try asking somewhere else or someone different. I’ll offer myself again as a personal guide to anyone who wants to get started helping out on Gentoo, but doesn’t know where to start.

I also don’t want to make things sound glum, and I realize this post was a partial rant, but I think it helps to realize the situations at hand. A lot of stuff simply doesn’t get done unless someone who is interested in seeing it done steps up themselves and sees to it, or helps it along. If you have a great idea of how Gentoo could improve, then run with it. Setup an overlay. Write some documentation. Become a developer. Get a blog. Submit a patch. Help out on the forums. Hang out on IRC. As cliched as it is, it really doesn’t matter what you do, as long as you do something.

I still think Gentoo is a great little distro, and I’m really positive in the direction things are heading. I don’t know how useful, entertaining or interesting my take is on the whole thing, but I’ll try to do a little bit of a better job to be more transparent myself and post more regularly what it is I’m working on within Gentoo. For the record, right now I’m fixing some bugs in GPNL so I can add some stuff onto it. I don’t want to go into details right now since it’s still a work in progress (and I’m not sure how feasible it is), but I think it will help by gathering some user statistics.

Sorry for the dramatic, sad tone to this whole post — this is why I don’t like writing these things. I really do think the future looks good, though. There’s some cool stuff on the horizon, and I think Gentoo is just going through some growing pains. I’m confident that it’ll all work out in the end. :)

January 16, 2008

Steve Dibb
beandog
wonkablog
» communication issues

I really don’t like commenting on things going on in that relate to Gentoo internally, and I won’t, but I think I will touch upon one subject that I see coming up lately, and that is communication with users.

I was just reading a forums post where someone was mentioning how the devs “never listen to the users.” Just for once, I’d like to give my side of the story.

I’ve been working on Gentoo development for about a year and a half now. I really enjoy it, and for the most part it’s a lot of fun. I try to read the forums to keep an idea of what’s bugging people (and that I can help out with), but I can only take it so far, as long as it’s something I can fix or something I’m interested in. Admittedly, some stuff I maintain even now, I don’t use anymore, or have ever used regularly. But I know that people appreciate it so I keep working on it.

I think that communication lines can be opened, but I don’t really have any great ideas on how to do it. As an (admittedly passive) member of user relations, I want to help, but at the same time I don’t have a lot of time to drum up something dramatic. I know there needs to be an effectual communication between what users are experiencing — to a degree. For instance, I think that we should fix what we’ve already obligated ourselves to maintain, but if someone has a different vision of how things should be going, then I invite them to participate and get involved. I think the whole “get involved” thing needs a brush up howto somewhere, since I think that can be a little vague, and people may want to help, but don’t really know how. I remember that’s how it was for me as a user for a long time. In fact, I should write up a document about some good, practical ways to contribute.

One point that I wanted to address though is that communication goes two ways. I wouldn’t say that developers aren’t listening as much as no one is really talking. I’ve stated that anyone is free to contact me anytime, repeatedly, on here and on the forums … and in all this time I don’t think I’ve ever gotten one e-mail from anyone asking for help about something on Gentoo. I certainly never get pinged on Jabber even though my contact info for that is up there, although I do get poked on IRC maybe once every three months or so.

So, from my point of view, I think that some users might have unreasonable expectations of how developers are supposed to “hear” what the community wants, especially if no one is talking. Ranting on the forums doesn’t help. I think that the majority of the devs probably don’t search through the forums on their day off hoping to find problems they can fix. I, personally, look through the Multimedia ones quite a lot (whenever I’m bored), and more often than not when I see users hitting a bug that I didn’t know about, that I can fix, I’ll go and fix it. That’s gonna be the exception though, and not the rule.

I’m just rambling, and I’m tired, so take this all with a grain of salt, but in my case, feel free to ping me about anything that I’m assigned to or working on, and I’ll be glad to update you with the status. The fact is, I have no idea how “serious” a problem is unless someone tells me or I start to see side effects. We don’t have any kinds of statistics tools telling us what is most popular or important, so my priorities as far as bug fixing and general improvements are either totally random or arbitrary depending on what I want to work on. If you want something fixed, feel free to speak up, and ask nicely, either on the IRC channels (there are a lot of them devoted to sub-projects in Gentoo), the mailing lists, etc. In my case, you have my e-mail, my IRC nick, and my jabber info.

So, if there are communication issues from developers to users, I apologize. I’m going to start looking at some ideas on how to improve communication and get feedback, but I could really use suggestions. Let me know what you think. :)

Edit: I should probably add a few disclaimers.  One is that, I’m not advocating contacting developers directly, since some may not like that and I don’t want them to get mad at me.  I’m certainly okay with it, though.  Secondly, I could be completely wrong about devs watching the MLs and forums and stuff.  Maybe they do cover them frequently.  I have no idea. :)  I was thinking of forums when I wrote it, and I don’t see many developers posting there, or at least the entries I read.  Just one man’s perspective, is all.

January 13, 2008

Steve Dibb
beandog
wonkablog
» mplayer-resume-1.5

A bug in MythVideo inspired me to work on fixing mplayer-resume tonight, so that it can properly handle movies with filenames.  I don’t know why I didn’t think about this before, but it’s simple if the file is properly escaped or quoted.  And so, mplayer-resume v1.5 is released, with support for spaces in filenames, finally, and also one other cool little thing: it works with playlists now, to a degree.

The playlists thing is kind of hard to explain, and it’d be easier to point you to the documentation that I’ve already written.  Instead, I’ll just describe what it is I’m going to use it for.

One thing I’ve been wanting to add to my MythVideo setup is some playlists so that I can randomly play something.  I have a lot of cartoons and videos and movies, and sometimes I don’t feel like picking something myself — one of the nice things about TV in general is you are genuinely surprised when you’re channel surfing and something cool just happens to crop up.  That’s kinda what I like, and what I wanted to do.  But, I wanted to take it a step further.  If I started playing $random_episode, then if I quit, I want to be able to resume playback of that same show.  Up until now, mplayer-resume wouldn’t work that way, since if you’re randomly picking something from a playlist file, there’s no real way to seek back to the same one.

That’s fixed now.  The script will read the filename of the movie you are playing when you exit (once you setup .lircrc correctly), and checks to see if that’s the same file you started playing.  So if I play random.pls and it plays Tarzan.mkv, and I exit, then when I go back to watch Tarzan, it will resume in the same place.  Basically, it saves the file position for Tarzan instead of the playlist file.  Pretty cool. :)

So, there you go.  I’ll put it in portage shortly as well.  Enjoy. :D

January 4, 2008

Dennis Muhlestein
nonic
All My Brain
» Keeping a process running

Have you ever had a process that dies on occasion? For me, I hate that situation and prefer to fix the software as opposed to have a monitor that restarts the process when it dies. I’ve run into a case lately however, that has defied me for a solution to my dying process. [...]

December 12, 2007

Steve Dibb
beandog
wonkablog
» dvd ripping scripts

I was lucky enough to catch Martin’s post on Planet Larry today about undvd, a script he’s working on — very cool, Martin, I love it.  I’m actually working on one of my own, or have been for a while, and I’ve been toying with the idea of cleaning it up and releasing it for public consumption.

I actually started writing my own because, as Martin says, all the other ones out there are too complex, and I prefer a simple command-line app that does exactly what I need it to do.  I call mine dvd2mkv, since I extract everything I want (video, audio, subtitles, chapters) and dump it straight into a Matroska file.

In fact, the script is already done, and it works great.  It automates the entire process — selects the longest video track, the widescreen one if there if full frame is on there as well, grabs the English (or preferred language track) with the highest number of channels (Dolby or DTS), plus the English subtitles if they exist, and finally the chapters.  All I have to do is put in the title of the movie, and even then if the disc ID is the title, then you can skip past that as well.

In fact, here’s the output of a movie I just ripped a few minutes ago, Return to Me.  Great movie, btw.

steve@charlie ~/dvd $ dvd2mkv
[DVD] Disc title: RETURN_TO_ME
Enter a movie title: [Return To Me]
[Video] Track number: 5
[Video] Aspect ratio: 16/9
[Video] Length: 115.79
[Audio] Track: 128
[Audio] Format: Dolby Digital
[Audio] Channels: 6
[DVD] Subtitles: None
[DVD] Ripping MPEG-2
[DVD] Ripping chapters
[MKV] Creating Matroska file

And that’s it!  Pretty simple. :)  Mine doesn’t have support (right now) for re-encoding the movies, since I’ve already gone into quite a bit of length on why I don’t like doing that, but it would be simple to add.  In fact, my shortcut method would just be to have the user setup mencoder profiles in the config file and call those directly.

Anyway, I like the idea of cleaning it up and throwing it out there, so I’ll probably be doing that fairly soon here.  If it works good enough for me (picky as I am), it’s sure to help out someone.  :)

November 27, 2007

Dennis Muhlestein
nonic
All My Brain
» Gentoo and the Next ATI Drivers (Catalyist 7.11)

As of a couple days ago, ATI released their next drivers for Linux. The drivers were previously announced to be versioned 8.43.x but ATI has converted to a new numbering system that follows the popular YEAR.MONTH notation. The 7.11 drivers therefore accurately represent their release date in November, 2007 and are what would [...]

November 7, 2007

Steve Dibb
beandog
wonkablog
» matroska + vobsub + subtitles … finally!

Oh, man, this is something I’ve been struggling to wrap my brain around for a good while, and I finally got it figured out.  I’ve always wanted to be able to add subtitles to my matroska videos … no real reason other than it’d be nice.  I don’t normally turn them on, but I do occasionally.  The problem I kept running into was the same with a lot of software documentation out there — it was just sparse or assumed you knew some certain terms or skipped over explanations.  Adding to the complexity is the fact that there are a few subtitle formats that different containers can handle.

In my setup, I’m once again skipping a few steps to just plain keep this simple, mostly at the cost of space, though even that is hardly anything.  As an example, on a 1.5 GB MPEG2, the resulting VobSub file is 1 MB.  I can live with that.

Anyway, here’s what I have so far … and I promise to update the Gentoo wiki as soon as I get time to cover this more in detail.  The first step is to rip the subtitles from the DVD.  To do that you have to calculate the subtitle index, which I won’t go into right now.  On the DVD I used, “It’s the Great Pumpkin, Charlie Brown” it was the first (and only) subtitle track for the movie, so it was pretty easy for me.

In fact, here’s the command I used to rip both the movie and the subtitles at once:

$ mencoder dvd://1 -ovc copy -oac copy -vobsubout subtitles -vobsuboutindex 0 -sid 0 -o pumpkin.avi

This created three files: pumpkin.avi (the unencoded MPEG2), subtitles.idx and subtitles.sub.

After that, and this is where I never realized how easy it is, to dump it all into Matroska, you just add the .idx file along with the others you are going to mux.

$ mkvmerge -o pumpkin.mkv pumpkin.avi subtitles.idx

When watching the movie with MPlayer, you can toggle through the possible subtitles with the ‘j’ key.

I can’t believe it was as simple as that.

November 2, 2007

Dennis Muhlestein
nonic
All My Brain
» Installing PgAdmin3 1.8.0 with Gentoo Linux

Today, my quest for the latest and greatest software has led me to a new release of PgAdmin3. The Gentoo ebuilds for the project are terribly out of date. Before setting out to install the new version of this software, I decid