Tuesday, April 26, 2011

Audio, Video Editing, Converting, Batch Processing

Recently I had to process lots of audio/video files. These multimedia files will be put on Nanonote, which Enlgish teachers will be using in public schools of Nepal.
First of all, I converted usual audio tapes to mp3. I used a simple stero cable to convert and transfer to my computer. Then, using Audacity softwere, I processed the audio files.

With videos, first I changed the names at once using KRename software. The software is also good to change names if you have hundreds of pictures and you can give your files sensible names in a minute.

Then I converted these mp4 videos to mpg by using software ffmpeg.

ffmpeg -i your_video_file -ac 1 -ar 22050 -s 320x240 output.mpg

To batch process all the videos at once, I used the following script.


#!/bin/sh
for f in *.mp4; do ffmpeg -i "$f" -ac 1 -ar 22050 -s 320x240 "${f%.mp4}.mpg"; done


Save it as a script and give permission on the file:
sudo chmod +x

That's it!

For processing videos, Pitivi Video Editor is a great free software.