Thursday 13 December 2007

Bloggered

It's very tempting to leave the post below entitled 'Truncating an mpeg' with its current mashed line spacing as a testament to what irritated me immensely for what seemed like a long time this evening. Just in case i don't, this is what it once looked like.
It all began yesterday when Mantex pointed out to me that the image in the post previous to this one didn't line up with the text. I discovered that Blogger allows the line breaks of standard 'typing' to be preserved by inserting automatically. After removing the whitespace from that region, which corrected the mysterious alignment problem, I immediately turned off this 'helpful'feature.
Today I noticed that something had messed up the 'Truncating..' post so I started to look into it. After a while I thought, OK, I'll simply delete it all and repost it. This is what i posted into a blank field in the blog editor:
======================================= Had to edit some video today in the most rudimentary fashion - namely to truncate a six minute mpeg to its first three minutes, the result of which is <a href="http://byrnegaunt.co.uk/tech/rez3.mpg">here</a>. After a bit of hunting around I came up with <a href="http://mpgtx.sourceforge.net">mpgtx</a>, which looked like the tool for the job, and one with which my tottering system could cope. Figuring out the correct command from the man page took me rather longer than I'd have liked, but I finally came up with <div><pre>mpgtx reza.mpg '[-03:00]' -b rez3</pre></div>which gave me a file with the first three minutes (or very nearly) in it called rez3.mpg. I got a message on the command line telling me something to the effect that the file had been cut in a place that was less than completely desirable and that were I to try to concatenate it with another bit, there could be a problem. I ignored this, since I'd never need to do this, but the whole business got me thinking along two lines. <br> Firstly, I find my thoughts being often drawn to the disparity between the abstract beauty of the engineering and its principles that allow us to do these things and the banality of what we actually use it for. <div style="font-style: italic;">What did you do today?</div> <div style="color: rgb(0, 0, 255);">Oh, I cut a video in half. </div> <div style="font-style: italic;">How long did that take you?</div> <div style="color: rgb(0, 0, 255);">Err...</div> <br> Now anything in excess of five minutes in response to that last question seems frankly embarrassing. OK I'm not a video editor, but even so. Of course, the author of mpgtx probably took many hours writing the stuff that allowed me to do that. <br> Secondly, why aren't there more sites, centralising sites where one can find good examples of the use of command line utilities. Some man pages are good in this respect, providing some relevant examples but normally one simply finds sites that regurgitate those very same examples. If this were organised it should be possible to find relevant examples much more easily. ======================================= The top part of what actually got posted is this: ======================================= <div class='post-body entry-content'> <p>Had to edit some video today in the most rudimentary fashion - namely to truncate a six minute mpeg to its first three minutes, the result of which is <a href="http://byrnegaunt.co.uk/tech/rez3.mpg">here</a>. After a bit of hunting around I came up with <a href="http://mpgtx.sourceforge.net">mpgtx</a>, which looked like the tool for the job, and one with which my tottering system could cope. Figuring out the correct command from the man page took me rather longer than I'd have liked, but I finally came up with </p><div><pre>mpgtx reza.mpg '[-03:00]' -b rez3</pre></div>which gave me a file with the first three minutes (or very nearly) in it called rez3.mpg. I got a message on the command line telling me something to the effect that the file had been cut in a place that was less than completely desirable and that were I to try to concatenate it with another bit, there could be a problem. I ignored this, since I'd never need to do this, but the whole business got me thinking along two lines. <br> ======================================= Wait a minute - I didn't put that <p> in there! Look how it starts at the beginning and closes, seemingly arbitrarily, just before the code quote. Blogger puts these in of course, but the tag should close at the end of the posting. We're getting somewhere. Now why would the enclosed paragraph have a different line spacing from the rest of the post. If you look below, you'll see it does. Because of the aforementioned formatting 'aids', I started looking around at whitespace issues, and after drawing a blank there, came up with the notion that the <p> tag must be redefined by CSS in terms of line spacing. Sure enough, if we look at the code for the default template, we see
.post p {
  margin:0 0 .75em;
  line-height:1.6em;
}
To be continued...

No comments: