Then, create a copy starting or ending at a given point in time, defined as hour:minute:second using either the -ss or -endpos options.
For example, to extract a clip from the 17 minute 50 second mark to the 57 minute 47 second mark from a one-hour file, these two commands will do the trick:
Note that the -endpos was recalculated for the second command as 39:57, not 57:47.
That’s because the clip_start.avi file is 17 minutes and 50 seconds shorter than the original, and so we need to recalculate the clip end position in terms of the new length.
The file clip.avi contains the clip from 17:50 to 57:47 extracted from the original file, and we can discard the intermediate clip_start.avi file.
It takes two commands because MEncoder seems to ignore the second -ss or -endpos option it finds, and uses just the first one.
It would be nice if it would just let us do this instead:
Now that TeamWork.io is out in public beta, I wanted to see how difficult it would be to make an intro video, similar to what Google did for its Voice service.
So with no background in video animation (and no cash to pay anyone to do it for me), I set out to see how far I could get on my own, using free software tools.
I wrote a script consisting of a few frames of stop-motion animation, which I thought would be the simplest to do.
The script starts with someone planning a project, surrounded by a few gantt charts and similar project management paraphernalia. Soon, though, the various charts and forms he needs to process multiply until he’s overwhelmed, and the screen fades to black.
From out of the darkness, a bright light emerges, and the TeamWork.io logo emerges.
That’s just part one. The next step would be to explain how it works, but part one was enough on its own to keep me busy for a while.
Fortunately, there are several free tools available for this kind of production.
Free as in Beer
I started with GIMP, the GNU community’s answer to PhotoShop.
GIMP let me create all the images I needed for part one: the charts and forms smothering our hero are easily done incrementally, by just adding more junk on top and saving each edit as a separate file.
Going from dark to light was also fairly simple, since GIMP has a nice selection of effects filters, one of which, Supernova, let me create a small sunburst in the middle of the black field, then expand it slowly, until the field was white.
Looking back at the first draft, I see that I rushed it a bit too much, but that is a problem with stop-motion: updating changes frame-by-frame is tedious, and there’s always the risk of jumping ahead too much in any given snapshot.
Next, I used Pencil to put the individual frames together with sound and create a single movie file.
Pencil is capable of exporting to QuickTime’s .mov format at a default 851×715 screen resolution, so to keep things simple, I made all my GIMP images 851 pixels wide by 715 pixels tall.
It’s not an ideal aspect ratio for YouTube, though, and I noticed black filler bands on both sides after uploading, but it doesn’t get in the way of comprehending the video.
Pencil also let me add a soundtrack and preview the entire composition of moving frames and sound, but somewhat annoyingly, it didn’t export with sound.
This is a long-time bug, apparently, but I was able to get around it using MEncoder (more on that later).
Say, a free tool for capturing the Mac’s Text-to-Speech output as a file, was invaluable for this task.
Say produces .aiff format sound files, which can be imported as-is into Pencil.
As nice as it is to write a script and have it turned into speech immediately, the sound of a computer-generated voice-over is less than ideal.
“Alex”, by far the best-sounding of the synthesized voices, still came out clunky and awkward.
It seems for the final video I need to bite the bullet and use a real human voice.
The Final Draft Cut
Once I was happy with the sequence of still frames in Pencil, and I made sure the sound synched (more or less) with the video, I created a .mov file of the project.
I could play the .mov file in QuickTime, but, as noted earlier, there was no sound.
That’s where MEncoder comes in, since it’s able to add a sound layer to any video file, using a single command line instruction:
This solution was closest to my situation, and although the advice was helpful, I managed to fix mine with fewer steps:
Boot the Mac partition (which, fortunately, was still working)
Run Terminal, and use the diskutil list command to find out where Linux was installed on hard drive (in my setup, it was /dev/sda3)
Reboot, this time with the Debian install disc I used to install Debian originally
Choose Advance Options -> Rescue Mode -> Shell mounted on /dev/sda3 (this saved me the effort of doing all the mounting described in steps 1 through 5 of the ubuntu forum solution)
Inspect /etc/lilo.conf (it looked correct, so I didn’t make and edits)
Update lilo: /sbin/lilo -v
Reboot (my mistake was doing this from the rescue mode shell, when I should have exited and rebooted out of the installer)
This time, when I chose Linux from the rEFIt menu, the kernal loaded normally (/dev/sda3 was scanned because of an improper unmount, or lack thereof, but fsck did its job without incident), and my linux partition was usable again.
Just over a year of using Mac OS X (albeit in dual mode with Debian), and I continue to be surprised by how simple and well thought-out its features are.
In this case, I was happy to see how simple downloading web video is (especially when the site hosting the video doesn’t want you doing so).
If I visit the site in Safari, all I have to do is start playing the video, then open Safari’s Activity Window, either by choosing it in the Window menu bar, or simultaneously pressing the Command-Option-a keys:
The video will be the largest file (usually) in the list, in FLV format.
With that file selected, holding down the Option key (and if you’re using a PC keyboard without keys remapping for OS X, remember that the Alt key means Option) and double-clicking will automatically start downloading the file:
The great thing about this technique is that it will work for most video sites on the web.
It also contains Mencoder, which is a great tool for ripping dvds (among other things).
Mac Ports has two versions available, MPlayer and mplayer-devel but neither of them built properly on my Mac (OS version 10.5.8).
Fortunately, the pre-built binaries at this site worked beautifully.
After downloading and unzipping them, I moved the two binary files, mplayer and mencoder, into /opt/local/bin so they appear in the default command-line path.
Since Apple’s built-in DRM-enforcing DVD player is set to startup when a DVD is inserted, I changed the default action in the System Preferences under Media Preferences to be “Ignore” for the “When you insert a video DVD” option.
Now, I can play any DVD track with mplayer in Terminal, like this:
mplayer dvd://[track number]
MPlayer also supports other playback options like subtitles, etc. (docs related to DVD playback are here).
Ripping a DVD track is more complex, but the docs have good examples to follow.
I wrote this shell script to simplify the process:
My experience was basically the same, with a few key differences (highlighted):
Started MacOS X
Ran BootCamp (my version of OS X already had BootCamp installed), and created a 32 gb sized partition for “Windows” (BootCamp assumes the partition is for XP). As per the original instructions, I quit BootCamp when it prompted for the Windows XP CD.
Downloaded and burned the i386 netinst CD version of “Lenny“.
Put the netinst CD into the drive and rebooted; the next time the Mini started, I saw the rEFIt menu.
At the rEFIt menu, I scrolled to the “partition map tool” and, as suggested, copied the GPT partition map into the MBR. It left me with three partitions:
Boot
Mac OS X
Empty (where Linux is going to go)
Exited the partition map tool and booted Linux from CD; the familiar Debian install screen appeared. Two critical steps followed.
At Debian’s disk partition step, I chose “manual” (using any other option would have given the Debian installer the all-clear to wipe out Mac OS X from the hard drive). Here I re-sized partition #3 to 31 gb, and created a fourth partition of 1 gb for swap. The final table was:
Boot
Mac OS X
ext3 mounted as “/” with the bootable flag on
swap
The installer continued, but when it prompted me to install GRUB, I hit “Go Back” and installed LILO instead (the original guide says install GRUB and then edit it manually; I simply could not get that to work, so I tried LILO instead, and LILO worked), allowing LILO to write to the Master Boot Record (MBR)
After the Debian install finished, I rebooted, and saw the rEFIt menu offered two choices: start Mac OS X or Linux