I rewrote the earlier Rewrap2M4V automator app into a ksh script since I like doing things on the command line. Here it is:
#!/bin/ksh
#
# ffwrap - Simple KSH script which takes Pansaonic TM700 raw
# video files as input, and runs them through
# ffmpeg to rewrap them, and make a usable *.m4v
# file which iMovie can read.
if [[ $# -eq 0 ]];then
print "Usage ffwrap filename(s)"
exit
fi
for arg;do
filename=$arg
basename=${filename%.*}
outname=$basename.m4v
# Rewrap file into an .m4v
/Applications/ClipGrab.app/Contents/MacOS/ffmpeg -i $filename -acodec copy -vcodec copy $outname > \
/dev/null 2>&1
print $filename "rewrapped to" $outname
done
One thing that I'm bummed about is that resulting converted file loses all the original EXIF data, including, most importantly, the Date/Time Original field. So after you import the converted movie into iMovie, and you hover your cursor over the clip, the date/time that shows up is not the original date/time when you shot the video; it's now the date/time when you did the conversion.
And unfortunately, if you try to copy the EXIF data from the original video file to the converted file, you'll get an error because writing to an m4v file isn't supported.
Message was edited by: Jaime Villacorte