Category Archives: 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:

Welcoming the new encumbrance

The bulk of my daily “work” is done on a 12-year-old Pentium 4 machine. I’ll save the gory details for later; suffice to say that it is a bit of a classic, and one I enjoy using immensely.

I have noticed though, that in spite of running svelte and light, as you would expect me to do, that there are some significant slowdowns.

Originally the machine came equipped with Windows XP, a meager 1.6Ghz processor and a lowly 1Gb of memory. Nothing to write home about.

I upped that to 2.6Ghz and 2Gb with Arch Linux, not so much because it needed it, but because it’s cheap now, and the machine itself is easy to upgrade.

And it handles most everything I need it for — surfing, online transactions, browser-based word processing or data analysis, and perhaps running VICE for a distraction or two. ;)

In fact, short of intrinsic hardware improvements — like more processor cores or finer screen resolutions or solid state drives — there’s not a whole lot that has really changed between this and most “modern” laptops. Sure, mine is a little slower by necessity, but all the same core parts are there: motherboard, drive, video adapter, display, and so forth. Twelve years have been rather patient with this machine.

But there are specific times when it’s definitely moving slower than, for example, the weatherbeaten Dell D830 I keep on the desk nearby. Not on the start, and not in file management or music playback or even 3D animation. Heck, I get something like 2000fps in glxgears. And that’s with a mid-market video card that was obsolete in 2004.

But there’s a lurch or a drag now that, to be honest, I don’t remember seeing even five or six years ago on a lowly 1Ghz Pentium III.

And the culprit is … the Internet. :shock:

Navigating the web is hands-down the biggest, densest chore, and at its worst, it’s almost spine-chilling. Long page redraws, fans at full tilt while rendering an image. Not just on this machine, but on others too.

And that’s where the cold sense of impending doom creeps in, because there’s not much remedy for it. It’s outside our control.

Six years ago I insisted those slap-happy lightbox effects were a drudge. More than once, in fact.

But six years ago I would have chalked up a slurred effect to the operating system — blame Windows, that was obviously the problem. If you couldn’t get tip-top performance out of a machine as powerful as a Pentium 4, then your bloated operating system was at fault.

And the core of that issue was easy to read: Microsoft makes no money unless you re-buy their product. It’s defective by design. It’s programmed obsolescence. Create a product that self-destructs over the course of two or three years, and you have a chance to glean a little more revenue, periodically. Just like light bulbs, or televisions. This is nothing new.

Only now I’m not sure that’s the source of the problem. Yes, Microsoft and Apple are still sticking it to the uneducated consumer. And yes, John Q. Public still thinks computers are like brake pads that have to be bought over and over again, over time.

But this new limiting factor — bogging down the web with clutter and flair — that’s the wave of the future.

It doesn’t matter any more what operating system you run, if it has two cores or four, if it has this much memory or more. If the new Web-based culture is the least bit impeded by Firefox’s degrading ability to show pictures of cats. … Well, then: Time for a new computer.

To me, this makes a lot of sense. The PC market is dying, a generation of smartphone users are reaching the age of majority, and the contract-and-renewal system embraced by the cell phone industry is far more appealing than the traditional slap-and-dash shiny-new-desktop re-buying gimmick.

So long as the content is dragged to a crawl by lightbox effects and worthless glitter, then declining performance in online applications and cloud-based computing become the new delimiter. Can’t get to your Facebook status quite so fast any more? Maybe it’s time for a new gizmo.

Personally, I welcome this new encumbrance with the same aplomb as I have in the past, when 800Mhz machines were called old, or hyper-threading P4s were castoffs. Your loss is my gain. I have bought Vista-era dual cores in perfect condition for less than $50, and received outstanding performance at the cost of no more effort than clicking a few buttons in Linux Mint. Albeit there was that same dragging effect, when rendering pictures of cats. :???:

It’s a little disconcerting that this new trend places the burden beyond the reach of the computer user, in a place where there’s not much they can do about it. But it’s a big world and we have a lot of time stretching out in front of us. I’m sure someone will come up with a solution. In the mean time, you can send your leftover core duo machines to me. :twisted:

Any colour you like

I’m going to break radio silence a little bit, and drop a post here for the first time in years.

I’ll say up front that if these screenshots offend you, I won’t apologize.

2014-04-06-l3-b7175-luna-simple 2014-04-06-l3-b7175-luna-complex

Nor will I apologize if you find these somehow irritating.

2014-03-26-lv-r1fz6-r 2014-03-18-lv-r1fz6-pure-ftpd

In fact, if you don’t like them, I really don’t care at all. Simply because what I use on my computer is not your business.

Horrified at the thought that someone might still use an interface that was designed before you were born? Deal with it. Can’t believe someone wouldn’t find the Luna-esque Windows XP themes oily and kitsch? Tough. Think I’m a troll if I claim Windows 2000 was the last good Microsoft operating system? Suffer.

The thing is, I still use desktops like that from time to time, maybe just to irritate readers like you, but maybe because it’s what I like.

I got a lot of traffic over the weekend to an old page I drew up a few years ago, about massaging IceWM to follow the look of the old Windows XP Classic theme. The referring site linked to my page, and to another that wasn’t mine, that offered some themes intended to XP-Luna-ify Lubuntu. That’s what you see in the top photos.

I knew it would happen. Unless I’m mistaken, Tuesday was the death knell for Windows XP. Some well-meaning Linux enthusiasts are pushing the OS of their choice, with an XP makeover, as an alternative to buying the newest slop out of Redmond.

And surprisingly (to me, anyway), the majority of the feedback on that referring site was negative. Don’t lull a Windows user into using Linux. You’re doing them a disservice. Tell them to adapt or perish, now as ever, as is nature’s inexorable imperative.

Take a step back for a second. Try to think like you’re not the geek that we both are. ;)

There are a lot of people — a lot — for whom a computer is not a hobby, not a passion, and not the locus of their waking hours. For them, computers are just tools, probably in the same way cars are for other people. Or microwave ovens for others, or bookkeeping for others … or you name it for whoever.

A computer to them is just an object. It’s a thing. It doesn’t hold any great curiosity, it’s not interesting to pull apart, and it doesn’t enthuse them beyond what they need to get a job done. A car gets you from point A to point B, and a computer gets you from point C to point D.

I can sympathize. I have a lot of dis-interests like that. You could talk to me all day about laptops and free software, and you’d lose me the second you changed the subject to real estate or the stock market. It just doesn’t grab me.

So for those folks who need something that behaves how they expect, and does what they need, and looks the way they know … I fail to see the harm in setting up a desktop that is arranged the way they want it.

And if that doesn’t squelch your quasi-insurgent anti-establishment justifications for Ludovico techniques, consider the possibility that Lubuntu rearranged to look like the original Windows XP startup screen might just be what they like.

About five years ago I put fingers to keys and pounded out a list of four hideous reasons to adopt Linux, the last of which was “duress.” Actually, looking over it now is a good reminder of how things were, and what they’ve become.

I won’t retract that last item though. I still think being “forced” to use Linux, either through deceit or the expiration of a 13-year-old operating system, is a bad idea.

But I can’t see the harm in giving someone a newer, or even a different operating system at their request, and then rearranging it to resemble what they know and expect. Or just plain like.

And now, one more, to see if I can trigger a gag reflex in that last tiny segment of the audience who actually read this far:

2014-04-06-g60-125nr-mate-xp-classic

Linux Mint Petra, MATE edition, done over to look like XP. Why? Because I like it that way. :twisted:

My Green Fedora

It’s a tiny bit ironic that a day after I harass high-end distros for possibly lowering the bar too much, I show a screenshot of Fedora 15.

I can’t explain why, but I was actually a little bit excited by the prospect of looking at this.

I’m not a Fedora user at all. I grew up (so to speak) in the Ubuntu camp, and while I’ve never really embraced the Red Hat sphere, it certainly never lost points for me.

What can I tell you that you can’t see in the picture, or by booting up the live ISO? It’s blue. It’s clean. The fonts are SO SHARP THEY CUT MY EYES! :shock:

I haven’t run into many problems yet, aside from some glitches with keyboard layout settings that were easily overcome after a moment at the command line.

Not bad though. I might install it for a while on the guinea pig, and give it an equal shake to what Ubuntu got.

The big question is, is this desktop much different than Unity? Not in my estimation. Lots of shiny buttons and flipping composite windows. Glossy and glittery, as is the trend.

I don’t dislike it, at least not any more than Ubuntu’s desktop. But if I have more to say, I’ll be sure to post it in the vein of this. ;)

A self-explanatory conversation

I suppose I should be embarrassed that I actually took up this position in a conversation.

27.05.11 06:50 I’m starting to think that young kids on the Internet are all idiots.
27.05.11 06:58 I have suspected for a long time that everyone on the Internet is an idiot.
27.05.11 06:58 The Internet is like cars and TVs.
27.05.11 06:59 Only idiots on it?
27.05.11 06:59 They have to be reduced to the most inane terms to make them usable by everyone — especially the absolute moron — so that companies can make money.
27.05.11 06:59 So cars are just boxes with wheels, that we turn and go places.
27.05.11 06:59 TVs are just boxes with buttons that show pictures.
27.05.11 06:59 Internet is similar.
27.05.11 07:00 The less complicated, the more people use it, the better a chance to make money.
27.05.11 07:00 And at the same time, the collective census of people using it has an average intelligence level that is slowly floating downward.
27.05.11 07:01 Software is doing the same thing.
27.05.11 07:01 You really should write a book.
27.05.11 07:03 Or start a blog.

There’s really no way to defend that without coming across like an elitist prig. Social grace demands that I withhold some ugly concepts in order to be polite.

I could tell you that all of humanity rolls across a bell curve for computer aptitude, and people near the left-hand tail should probably stick with pens and paper.

But that would imply that some people simply don’t have a practical ability level, and that would sound mean-spirited, and therefore taboo.

I could insist that pushing Linux to embrace more of the central arc of that bell curve means that another resulting curve — the average ability level of Linux users — likewise shifts downward.

But that would imply that pulling in day-to-day users results in less impressive statistics, or that the regular user is getting stupider.

That would likewise be ugly and therefore can’t be repeated.

So I will mention none of those things, and refrain from suggesting that crafting Linux to appeal to less adept computer users is resulting in a mass stupidification of the user base.

I admit I had suggested some similar points, but it was an extract from a conversation on many different topics at once. And I feel slightly guilty now, just as a sign of penitence.

After that, if you inferred anything else, you’re on your own. :evil:

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. … :)