Categories
bash Command Line

Find and Delete Empty Files Using a Shell Script on the Command Line

If you – like me – copy image files regularly to an external HD, you might also have come across the problem that sometimes the file references are created but the eventual copying of the file contents failed. Thus, I regularly end up with a lot of dead files that block the way for the real files when I want to copy the actual files later.

Categories
Command Line

Creating Animated GIFs from the Command Line in Mac OS X Using Convert

You can easily create animated GIFs from the command line in Mac OS X (or Linux) using ImageMagick. To figure out if ImageMagick is installed open the application Terminal from the Utilities folder in Applications, type ‘convert’ and hit ‘Enter’. If something like »Version: ImageMagick 6.6.9-3 2011-04-04 Q16« and lots of options appear, ImageMagick is installed and you can proceed. If not, you can install it using MacPorts (look for ‘Mac OS X Binary Release’). install it using homebrew or MacPorts.

Categories
bash Command Line Flash

Create Thumbnail Images from Flash Video FLVs Folder with Bash Script

I’ve had the problem that I wanted to show a list of Flash videos in a Flex application and I want to show a sample picture of each video. As I have got only the videos stored in a folder and have no jpegs of them, I want to generate those sample jpegs, one for each video in the folder. Thus, I found quite a lot of blog entries that show you how you can create an image from a Flash video with the Open Source tool ffmpeg.

As I want to do this not for a single file but for a whole folder, I have written a bash script, that renders out a frame of each FLV video into a jpeg and saves them into a folder called thumbnails of the folder in which it is lying.