Monday 10 December 2007

Truncating an mpeg

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 here. After a bit of hunting around I came up with mpgtx, 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
mpgtx reza.mpg  '[-03:00]'  -b rez3
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.
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.
What did you do today?
Oh, I cut a video in half.
How long did that take you?
Err...

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.
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.

No comments: