To trim a video clip, mencoder and ffmpeg expect a start time in hh:mm:ss, but instead of end time, want duration:
$ mencoder -ss 00:02:55 -endpos 00:07:15 -oac copy -ovc copy in.avi -o out.avi $ ffmpeg -ss 00:02:55 -t 00:07:15 -vcodec copy -acodec copy -i in.avi out.avi
Video players make it easy to identify start/stop times, but difficult to figure out duration, so I wrote a little shell script that will calculate duration from start/stop times.
Usage example:
$ calc-duration 00:02:55 00:10:10 Start: 00 hrs 02 min 55 sec Stop: 00 hrs 10 min 10 sec +----------------------+ | duration is 00:07:15 | +----------------------+
This had been working without any problems for months, but this afternoon got an error while trying to connect to the Internet using my Nokia E62 as a Bluetooth modem on a Dell Inspiron E1505 running Ubuntu 8.10. Attempting to establish a dial up connection returned a rude error.
For a server, I prefer to run the latest stable release of Debian, but once in a while I need a newer package than what’s available from the stable repository.
The solution is in the Apt How-To available from Debian. See section 3.8, title “How to keep a mixed system“.
Some time ago I was looking for tools to monitor network bandwidth usage by clients. Needed something to run on my super awesome Linux router/firewall (Vyatta) to see what everyone on the network is doing and on the Xen VM hosts to keep an eye on the virtual machines.
As always with Linux, there are lots of quality projects worth serious consideration, so the hardest part was to narrow the plethora of choices down to a manageable number to test.
I’m used to System V style commands used in Red Hat / Fedora and derivatives as well as SUSE, so I found Debian service management methods unintuitive at first.
Below are a couple of personal notes I made on the subject to help myself out, as I was getting used to the Debian way of things…
VIM is an awesome text editor and syntax highlighting is one of its many awesome features. To enable VIM syntax highlighting globally for all users, simply uncomment “Syntax on” in the VIM config file (which is typically /etc/vimrc). So long as your VIM version supports syntax highlighting, VIM will automagically highlight syntax for most common files. That’s great, but sometimes you might run into a situation where you’re working with a file VIM won’t automagically highlight syntax for. Let’s say you really, really would like it to. Here’s how….
So you installed a shiny new version of Ubuntu and are having a time of your life. That is until your machine shrieks with a horribly offensive beep you hadn’t heard since 1998. It would blast me out of my chair (and send the dog scurrying for the closet) every time I would hit the backspace key at the console and reach the beginning of the line. It took about four of those beeps before ridding myself of it became a priority.
As with most things in Linux, there are a million different ways of accomplishing the task. Here’s the ultra super easy method I like.