Category Archives: Arch Linux

Animated gif previews of video files

A few months ago I won some bonus points with the boss, in a way that deserves keeping a note here.

Our office keeps a large collection of training videos on a networked drive, as part of the orientation program. New employees walk through them in sequence as part of their introduction, and I expect other companies may do something similar.

The files are named with a complex numbering system though, and it doesn’t lend itself to the actual topic of the video. We’ve mentioned that to the training staff and IT specialist, but it’s rather far down the list.

I took the initiative one afternoon and following a lead by Prashanth Ellina, found a way to thumbnail a video frame, and use that as a preview.

Prashnath’s command works like a charm for run-of-the-mill AVI files.

ffmpeg  -itsoffset -4  -i test.avi -vcodec mjpeg -vframes 1 -an -f rawvideo -s 320x240 test.jpg

My only addition would be the -y flag, which overwrites old images; that really only comes into play while you’re testing the output though. ;)

A picture is worth a thousand words, so a six-frame animated gif is probably worth about 6,000 — and that’s my contribution to Prashanth’s trick. You’ll need imagemagick for this part:

for i in {10..70..10} ; do ffmpeg  -itsoffset -${i}  -i test.avi -vcodec mjpeg -vframes 1 -an -f rawvideo -s 320x240 test-${i}.jpg ; done ; convert -delay 75 -loop 0 test-* test.gif

And the end result is a simple, six-frame looping gif that shows the content of the first minute or so of the video.

Since our videos all incorporate the same 10-second intro before showing a title screen and opening the lecture, this gives us a snapshot opening frame, followed by a few moments of content. It’s easy to see what the topic is, and remember where you are in the sequence.

You could adjust that loop to start at the 60 second mark and snap a frame every minute, or however you like. It’s convenient and flexible, and the end result can be seen in a browser or an image viewer, so it doesn’t rely on specific software.

The only downsides that I can see involve how ffmpeg tracks to those points in the video: it runs out to the 10-second mark, then snaps. Then restarts, spins out to the 20-second mark, and snaps. Then 30, 40 and so forth, taking a longer time to track out each time.

I don’t know if there’s a way to adjust Prashanth’s original command and just loop through once, and snap at every 10-second interval. I leave that to higher minds than mine.

But it might be inconvenient if you have a lot of videos to gif-ize. In our case it was about 50-60 videos, which was easy to loop through but took about half an hour to process. The end results were worth it though.

This worked for me in Arch, but I don’t see how it wouldn’t work with almost any other Linux flavor that includes ffmpeg. And since Prashanth’s command dates back to 2008, I think earlier releases would be fine as well. For what it’s worth, I’ve used this with Flash videos too.

And that … is everything. For now. :mrgreen:

It’s like 2002 all over again

This long and rather rambling observation has its roots in a small, but innocent mistake I made about five years ago. And believe it or not, I documented that mistake here.

I have a lot of favorite machines that stick out in my memory years after they’ve passed on to new owners or the digital afterlife. There is an obligaory parade of forgotten machines, but some are definitely easy to remember.

This was one. And this one, while it was a whipping boy, was not easily forgotten. This one met with an unfortunate end that no one was to blame for. And for my money, there are still not many computers better than this one.

The mistake though, and the domino effect that brings me to this page, was sending this machine on to a new owner.

Like them or hate them, the 8000-series of Dell laptops from the turn of the century were some of the last ones to really tickle my technophile funny bone.

An 8000-labeled machine could handle a mid-market Nvidia GeForce4 440 card at 1600×1200, which in 2006 was more than enough to run Compiz in Ubuntu, or Neverwinter Nights at native resolution in Linux. (Don’t try that with Ubuntu now. :evil: )

The 8000 could hold a Pentium III chip up to 1.4Ghz, if I recall correctly. And the top-of-the-line 8200 machine, with a BIOS upgrade, could wrangle with the manly 2.6Ghz Pentium 4 — and, rumor has it, a 64Mb Nvidia Quadro4 Go GL.

On top of that, removable side and front media bays, support for dual hard drives, and the alternative to connect an external drive by parallel cable. Plus the option for not-just-one-but two batteries, a mini-PCI expansion slot (think: Intel wireless card) … and maybe best of all, the unspoken ability to handle 2Gb of PC2700 memory, although Dell wouldn’t document it.

Even the palmrests could be swapped out for six or seven different colors. :lol:

Short of building your own laptop out of a whitebox, the 8200 was probably the best you could expect to get from a mainstream computer company. You’d need to move into desktops to get something more flexible.

Getting into and out of an 8000-era machine was a piece of cake too. Four screws and the keyboard came off, putting you within striking range of the processor and video card. Three more screws and the screen was off. A few more, and the entire business unfolded like a string of paper dolls.

Dell followed the 8200 with a complete redesign — a shift into the silver casings and slimmer, lighter forms of the 8500 and others. The 5150 was released in 2003, the 8600 soon after. I’ve owned an 8600, and while it was smaller and lighter, it wasn’t nearly as much fun to tear down and build back up.

Around five years ago I decided it was time to part with my 8000, for reasons that sounded good at the moment. Many times since then I’ve wondered if I did the right thing. About six months ago I started thinking that the uncanny valley of computer pricing might put an 8000 back in range, and I started watching auctions.

And about a month ago, I came across an 8200 that was seemed clean and complete, without undue wear and tear, and the price was right … all of about US$60. :shock:

I did not misplace my investment. The seller claimed the machine was clean, but s/he didn’t say it was museum quality. I couldn’t have asked for a more perfect specimen. Impeccable screen, not a scratch anywhere, 1Gb of memory, carrying case included. I’ve even been inside the machine twice, and I can’t find any dust. The only sign of use is a small worn spot on the touchpad. (Well, of course the battery had failed. :roll: )

2014-04-22-6m47421-portrait

It’s like 2002 all over again. ;)

I’ve since done the final BIOS update and dropped in that beastly 2.6Ghz chip, as well as a 64Mb GeForce4 440. It’s got a proper wireless card now (I won’t patronize Broadcom, even in a 12-year-old laptop) and a second hard drive. I’m waiting for a DVDRW and a pair of sparkly green palmrests. :roll: And ironically, the system drive it is using right now is the same one I bought years ago, for my original 8000. Imagine that.

2014-04-22-6m47421-icewm-firefox-audacious

It’s a good feeling. It’s one part nostalgia and one part having the luxury of rebuilding a machine to its practical summit at a price that isn’t astronomical. I said once a long time ago that technology prices follow a strange curve, bottoming out after about 8 years and then spiking back up when people start to attach the word “vintage” to it. And nowadays, it feels like the 8000s have reached the trough of that curve.

So putting together everything I’ve described — even with a machine that really ought to have been twice as much as what I paid — has barely broken US$150. And yes, that includes the sparkly green palmrests. :roll:

Still with ConnochaetOS

In case you were wondering, or even if you weren’t, I should mention that the 150Mhz Mebius is still the brains behind this operation.

And although I sometimes flip-flop between distros for it, the chief contender at this juncture is still ConnochaetOS.

During my Extremely Busy Time a week or so ago, I briefly returned to the Crux installation I had in place as recently as March.

But that unfortunately relies on Xorg to do most of the dirty work, and on a machine this slow, I have no faith in X and company.

ConnochaetOS inherits a lot of Arch Linux’s demeanor, and using only the framebuffer (which it can automatically configure to 800×600 on this confounded Trident video card, even when I can’t do it myself :evil: ) makes this machine a very impressive performer.

By default ConnochaetOS installs a graphical environment, and that means you’ll have to strip out a lot of the stuff that comes in the 0.8.9 beta 2 ISO.

It’s worth the effort though, because the resulting system, spared of the trappings and dead weight of Xorg, takes up much less space on the hard drive and much less space in memory.

It’s not perfect of course. Sound is sometimes sketchy, but it’s sketchy in my custom systems too. Sometimes the bell rings when someone sends a message in centerim, and sometimes it doesn’t. :roll:

But it admits a little more flexibility, hardware-wise, than the custom systems I have built. And there’s the benefit of being lazy, and letting someone else handle the hard work of updating core software. ;)

That’s nice, even I have to build and maintain the other 90 percent of the software I use, because it’s not in the conventional repos.

Luckily Arch, and by extension ConnochaetOS, has some remarkable tools just for that. Hello, PKGBUILDs.

All things considered, I like using this a lot more than some of the other systems I’ve tried at this speed. Debian won’t boot, Crux is more high-maintenance than I want right now … this one is just right.

If you’re also trapped in the i586 bracket, I wholeheartedly recommend it. Even as I did six months ago. … :)

Revisiting the tabbed desktop

One of the things I had time to try, but didn’t have time to write about, was a revisit to someone else’s idea. I do that quite often, now that I think about it.

This time it was urukrama’s tabbed desktop from a couple of years ago. Things like that tend to roll around in my mind, and then bubble up after a while.

I caught myself thinking the other day that screen’s status bar, while it doesn’t seem to like to be pushed to the top of the display, could do some reverse-text codes, and make it look like tabs.

You might have to use your imagination here, but if the active “window” is set to the same color as the terminal background, then if you squint really hard and hold your breath, it looks like a tab. See? See? :P

Playing with that for a few minutes sent me back to urukrama’s desktop, which did a better job with tint2 and Openbox than I was doing with screen alone.

  

That’s rather rudimentary, and not really much of an improvement over the grace and style of urukrama’s original work.

And most of it was slapped together with tint2’s onboard wizard (the aptly named tintwizard.py), which makes things much, much easier. I’d like to find something along those same lines for Openbox itself.

But I haven’t saved the configuration files here because it wasn’t much of an accomplishment, and because it only took a few minutes to arrange what you see.

And really, if I’m going to rely on a tab-like interface to a long string of terminal programs, then there are better ways to arrange it. Probably. :)

Dark, light and Openbox

I have suffered an inordinate number of real-world issues over the last week or so, which is why I am doing such a poor job of keeping this page updated.

I apologize for that. But in the little free time I have, I have not been idle. Here are two distros that both focus on lightweight desktop arrangements with Openbox.

 

On the left is CTKArch, and on the right is MadBox. I believe I heard about these when someone left notes about them here; I apologize if I failed to keep note of who said what.

CTKArch (as you might have guessed) is Arch-based, and is both stylish and well arranged. Many of the tools you would need to manage its look — like panel controls and configuration — are wired into Openbox’s menu, for convenience. I like that.

Similarly, Madbox has a very smooth feeling about it, incorporating everything from conky to network managers and similar tools.

Madbox is Ubuntu-based though, and I don’t see a version beyond 10.10. So that might be on its way, if you are patient.

It’s nice to see Openbox desktops as full-featured distros, mostly because for a long time lightweight window managers had the reputation of being some-assembly-required.

The popularity of things like Crunchbang and company did a lot to change that. No doubt there will be more of these in the future. ;)

The ebb and flow

Lots of changes are afoot in this tiny corner of the planet, which accounts in part for the silence over the past few days.

First of all, one of the computers I was expecting to inherit has arrived on my doorstep. I can properly introduce the NEC VersaPro VY22X/RX-M, or just vy22x, as I like to call it.

This is the 2.2Ghz Celeron I mentioned oh-so-many times over the past year or two. It’s not at all a bad computer — ATI graphics, 512Mb and more is possible, 1024×768 in a nice big size. …

It’s of very similar dimensions and specifications as the Toshiba, although it is obviously a completely different computer.

The hard drive is another ancient creaking wheel though — 20Gb 4200rpm, the omnipresent Hitachi MK2023GAS I keep finding — and will be the first thing to go.

The chassis needs a cleaning, and the previous owner liked to slather stickers on everything in the house. So I’ll need to scrape away some glue and goo.

Otherwise it’s in pretty good shape, and should be fun to experiment with.

But where there is an ebb, there must be a flow … so the 120Mhz and 133Mhz Fujitsu laptops are out of the house now, having moved on to a new owner.

It felt a little sad to see them go — particularly the slower of the two, given as many adventures as I had with it.

I was tempted to convert one or the other into some sort of photo frame or wall clock, but their value was in their completeness and good condition, not their Frankenstein factor.

I did not, however, include the CF cards. Those I intend to use in future machines.

I should also mention, though it’s a lesser point, that I’ve moved everything back to Arch Linux on the fastest machine.

That noisy romp through the Ubuntu betas was instructive, but not particularly productive. It was nice to see how some of those distros do things, but it reinforced where my preferences lie.

So all of this means there needs to be a few updates around this site. A couple of machines are new, a couple more are gone … life goes on. :)

Arch madness

What is this — Ubuntu? Something is going on here. I must have made a mistake somewhere.

Starting full system upgrade...
resolving dependencies...
looking for inter-conflicts...

Targets (66): libdrm-2.4.25-1  libgl-7.10.2-2  ati-dri-7.10.2-2
              eventlog-0.2.12-2  filesystem-2011.04-1  fixesproto-5.0-1
              intel-dri-7.10.2-2  libtasn1-2.9-1  libtiff-3.9.5-1
              libxfixes-5.0-1  mach64-dri-7.10.2-2  mesa-7.10.2-2
              mga-dri-7.10.2-2  ncurses-5.9-1  r128-dri-7.10.2-2
              savage-dri-7.10.2-2  sis-dri-7.10.2-2  sudo-1.8.1-1
              tdfx-dri-7.10.2-2  xf86-input-acecad-1.4.99_git20110318-1
              xf86-input-aiptek-1.3.99_git20110318-1  xf86-input-evdev-2.6.0-3
              xf86-input-joystick-1.5.99_git20110318-1
              xf86-input-keyboard-1.6.0-2  xf86-input-mouse-1.7.0-2
              xf86-input-synaptics-1.4.0-2  xf86-input-vmmouse-12.7.0-2
              xf86-input-void-1.3.1.99_git20110318-1  xf86-video-apm-1.2.3-3
              xf86-video-ark-0.7.3-3  xf86-video-ast-0.91.10-3
              xf86-video-ati-6.14.1-1  xf86-video-chips-1.2.4-2 
	      xf86-video-cirrus-1.3.2-6  xf86-video-dummy-0.3.4-4
              xf86-video-fbdev-0.4.2-4  xf86-video-geode-2.11.12-3
              xf86-video-glint-1.2.5-2  xf86-video-i128-1.3.4-3
              xf86-video-i740-1.3.2-6  xf86-video-intel-2.14.903-1
              xf86-video-mach64-6.8.2-6  xf86-video-mga-1.4.13-3
              xf86-video-neomagic-1.2.5-4  xf86-video-nv-2.1.18-3
              xf86-video-r128-6.8.1-6  xf86-video-rendition-4.2.4-4
              xf86-video-s3-0.6.3-5  xf86-video-s3virge-1.10.4-5
              xf86-video-savage-2.3.2-2  xf86-video-siliconmotion-1.7.5-2
              xf86-video-sis-0.10.3-4  xf86-video-sisusb-0.9.4-4
              xf86-video-tdfx-1.4.3-6  xf86-video-trident-1.3.4-4
              xf86-video-tseng-1.2.4-4  xf86-video-v4l-0.2.0-8
              xf86-video-vmware-11.0.3-3  xf86-video-voodoo-1.2.4-4
              xf86-video-xgi-1.6.0-3  xf86-video-xgixp-1.8.0-3
              xkeyboard-config-2.2.1-1  xorg-server-common-1.10.0.902-1
              xorg-server-1.10.0.902-1  xvidcore-1.3.1-1  xz-5.0.2-1

Total Download Size:    15.68 MB
Total Installed Size:   80.15 MB

I am going to need to scope out the Arch Forums and figure out why I suddenly have software installed for almost all the video hardware ever created. On a laptop. With Intel graphics. :|

I can’t ever remember, in the five years or so that I’ve used Arch Linux, getting as much unnecessary crud as that in an update. I must be dreaming. …