Atomic I/O letters column #143Originally published 2013, in PC & Tech Authority
(in which Atomic magazine is now a section)
Reprinted here July 13, 2013 Last modified 16-Jan-2015.
Why can't you seek around in some online videos?
You seem to be to go to any part of a YouTube video by clicking the timeline thing at the bottom, but half of the time when I try this on different video sites - like LiveLeak, for instance - clicking on the timeline just takes you back to the beginning of the video. It works on some other videos on LiveLeak, though.
This isn't the end of the world, but I'd still like to know why it happens.
An I-frame is just an image, complete unto itself. A video can be composed of nothing but I-frames, in which case it behaves in the way you'd expect it to, like a strip of analogue movie film made of sequential images.
Most videos have a lot more P-frames than I-frames, though. P-frames are not a whole image. To simplify, they're just the changes that need to be made to turn the previous frame of video into this new one. Since most frames of most videos are similar to the frame preceding, P-frames can be much smaller than I-frames. They're essential to all lossy video compression, from YouTube to Blu-Ray. Even animated GIFs can use delta compression!
A simple video player, however, can't just seek to a P-frame and start playing - well, not without weird distortion effects, anyway. When you seek in a video and everything's smeared and grey and weird, that's because you told the player to start from a P-frame, and it applied that frame's modification recipe not to actual video frames before it, but to no image data at all.
A lot of freaky animation glitches, like this...
...are the result of faulty encoding or data corruption which removes most or all of one or more I-frames, leaving the P-frames modifying data from previous P-frames. The really extreme examples, like the one above, may be created deliberately. (Just loading an animation file into a hex editor and randomly typing on some data can create effects like this.)
A video-player can avoid these problems by, when you click somewhere on a video file's seek bar, taking where you clicked and then rewinding the video back to the nearest I-frame, and playing from there instead. That gives a proper starting point and avoids the smeary distortion. But if the only I-frame in the whole video is frame number one, you get the behaviour you've been seeing, where trying to seek anywhere in the video just takes you back to the start.
(You don't see this behaviour on YouTube, because YouTube videos are re-encoded to give them plenty of I-frames, even if the original uploaded file didn't have many.)
When you download the video and can seek around in it using a normal video-playing program, that's because the video-player silently zips back from where you clicked to the last I-frame, just as the online player does, but then takes advantage of its much faster access to the video data on your local computer. It invisibly "plays" the video at maximum possible speed up to the point where you clicked, and then starts playing normally. This can take only a fraction of a second for low-res video on a hard drive; you may still see a noticeable pause, though, if the video's high-definition.
Even a low-res video can't be surreptitiously fast-played in this way if it's at the end of a lengthy Internet tube, though; it'll get there eventually, but not without a lengthy pause resembling a program crash or lost connection. So the player instead just goes back to the last I-frame and plays normally from there, instead of doing the same thing invisibly in the background until it gets to the point in the video you actually asked for.
It's of course actually more complex than this. P-frames can be built from more than one preceding frame, for instance. And there are also "B" frames, which are "bi-predictive" - they're constructed by modifying frames before and after them. But just the basic idea of I and P frames explains a lot of online-video weirdness.
The battery in my old big laptop (Dell Inspiron 9300) is weird. It's the original battery the laptop came with so you'd expect it to be dead by now, and it normally only gives about 5 minutes of run time. But if I remove the battery with the laptop running from the mains adapter, and let the battery sit for a few minutes, then put it back in, I get a whole 15 or 20 minutes of run time.
This is actually enough for me, since I use the laptop as a home computer and only need the battery to ride out brief blackouts or be able to take the laptop when I go to the bathroom or whatever. I realise I'm going to have to lever open the wallet and buy a proper new battery pretty soon, but why does sitting the battery on a table do any good at all?
Chemical batteries of all sorts, from AA alkalines to car batteries, will normally "bounce back" while unloaded. Draw a lot of current out of a battery and its terminal voltage and current delivery capacity will fall; stop drawing current and the battery's specs will start to drift back up toward the nominal values again.
Also, the chemical reactions in batteries work better when the battery is warm. The extreme case is using batteries, especially ones with a water-based electrolyte, in sub-zero temperatures; Alpine photographers keep spare batteries in their inside pockets. Warmth works for other batteries as well, though; if your remote control or torch or nose-hair clipper isn't quite working and you don't have any new batteries, removing the batteries and warming them in your hands will help.
Neither of these cases probably applies to you, though. Your battery shouldn't be supplying the laptop with power when the mains adapter is plugged in, and the laptop's charging circuit probably isn't doing anything weird that the battery appreciates a rest from, either. And removing a battery from a laptop will, if anything, cool the battery down, not warm it up.
So what I'd bet on is that your old laptop and old battery just have a bit of corrosion on the copper contacts on the battery and in the battery bay. Remove and replace the battery and you rub a bit of oxide off the copper, giving less contact resistance and a little more oomph. To clean the contacts properly, try a pen eraser or similar mild abrasive.
(For everyday cylindrical batteries, you can clean the contacts a little by just spinning the batteries in their compartment. This is another remote-control-fixing ritual that often works.)
My uncle and aunt went away for a big two month holiday, and when they came back their PC didn't work any more. All they knew was that it made "a really strange noise", and they gave it to me to fix.
On startup the hard drive DID make a strange noise, then the computer failed to POST with a drive error, so I opened it up.
I don't really DO insects, which makes life difficult here in Queensland. So I, I believe it's called "noped", right out of there and my girlfriend who is much braver than me pulled the computer apart and opened the hard drive with a hex key and reported that the drive itself had ants, or termites or whatever, IN IT.
(I'm very sorry that neither of us took a picture before throwing all the infested stuff in a vat of Alien blood.)
The computer actually came good again with a lot of cleaning and a new hard drive, and now that I've stopped screaming I come to my actual question:
How did ants get INSIDE A HARD DISK?! Aren't those things meant to be hermetically sealed?
Hard drives aren't actually sealed. This is mainly so that changes in atmospheric pressure, and the substantial change in internal air temperature between when the drive's off and when it's running, don't squeeze or expand the casing.
Instead, drives have a small vent somewhere, with a dense filter in it. The "flying height" of a modern hard drive's read/write head over the platter is only about three nanometres, which means even a particle of smoke can be big enough to wedge between platter and head and cause damage. In normal use, the filter keeps the air inside a drive as pure as the air in the clean-room where the drive was assembled.
Those filters aren't particularly durable, though, and I think they're all made of cellulose acetate. So I could see ants or, especially, termites, chewing through the filter just because they think it's edible, and/or because they want to extend their colony into the drive.
(I've heard it said that hard drives are not only sealed, but evacuated inside, to eliminate air friction. This is completely wrong, and impossible. Drive heads need an air cushion to allow them to float over the platters, and will crash and die if the air pressure is too low; problems start to arise above a pressure altitude of about 2500 metres. This is one of the considerations involved in making computers work in space.)
I've got a ThinkPad T60, with both a TrackPoint joystick and a touchpad for controlling the cursor, and one or both of them seems to be defective. Sometimes but not always the cursor quivers around randomly, and left-clicks without me telling it to.
This is very frustrating. I've tried disabling each of the built in pointing devices, or both of them and using a USB mouse, and the jiggling and clicking keeps happening. Even in (Windows 7) safe mode!
Cara and I corresponded over this for a couple of days, until we reached the breakthrough that Cara's odd cursor behaviour only happened in the living room, bathroom and kitchen. All of which were close to a particular cupboard, which contained... a wireless keyboard, with random junk piled on it.
That cheap "multimedia keyboard" that Cara had forgotten about had its own tiny trackball and mouse buttons, and a teeny tiny USB receiver that Cara forgot was even plugged into the ThinkPad. With the receiver removed, the problem was solved.
I naturally instructed Cara to keep that keyboard and its stealth receiver handy, for whenever someone appeared to deserve a computer-poltergeist experience. With a USB-header breakout cable, you could even install the receiver inside a PC...