Month: May 2012

Hardly any software works well with .3GP movie files. So, with this collection of movies accumulating in my phone sync folder I needed something to convert them into formats that are more useful (like video editing software or upload sites). So, here’s a little quick and dirty solution for batch converting these files on a Windows machine – with pretty high quality I might add. Of course there are a lot of other things you can do with ffmpeg, so be sure to explore…

Step 1. Install cygwin command line so that you can use the bash shell to loop through stuff on Windows.

Step 3. You are lazy like me, so copy those binaries right into the /bin directory in cygwin so they are available at the command line without any salutes.

Step 4. Put the script below into the same /bin directory because you are lazy

#!/bin/bash
# jcz 25-may-12
# filename: 3gp2mp4.sh
# converts all 3GP video files in the directory
# where it is run. Logs all file contents
# and errors to a text file in the directory
# in which it is run
#
##################################

# The & characters after the commands log all output (stdout and stderr) to the log file
echo “I see the following files to work on. I will write them down for you now ” >> $logger
ls -lh *.3gp >> $logger
echo ” ” >>$logger
echo ” ” >>$logger
echo ” ” >>$logger

# Rename any existing .Mp4 files so they don’t get over written and stop ffmpeg from asking me if I want to over write them
echo “Moving files: ” ls *.mp4
for nowmp4s in *.mp4
do
mv -v $nowmp4s $dayer-$nowmp4s.mp4 >> $logger
done

I see the following files to convert. I will write them down for you nowVIDEO0001.3gp VIDEO0013.3gp VIDEO0025.3gp VIDEO0037.3gp VIDEO0049.3gpVIDEO0002.3gp VIDEO0014.3gp VIDEO0026.3gp VIDEO0038.3gp VIDEO0050.3gp