#!/bin/csh # created by T. Kucsera to generate a movie file from *.png files # note input image files have to me a directory with increasing alpha numeric names with a .png filetype # run this in the directory where the images are # 3 required arguments : # argument 1 = speed on animation a number between 1 to is recommended # argument 2 = the first part of the input files name (leave off the .png) # argument 3 = the output filename (.mp4 will be added) if ( $#argv != 3 ) then echo 'You need to specify 3 arguments:' echo 'speed factor (recommend a number from 1 to 6), the first part of the input files name (leave off the .png), output filename (.mp4 will be added)' echo 'input files must be .png' exit endif set spd = $argv[1] set inf = $argv[2] set out = $argv[3] mencoder mf://$inf\*.png -mf fps=3 -vf harddup -ovc x264 -x264encopts cqm=jvt:crf=10:frameref=5:bframes=0:nob_adapt:direct_pred=auto:subq=6:mixed_refs:nodct_decimate:no_psnr -nosound -ofps 3 -noskip -of rawvideo -o tlktmpmovie.264 && MP4Box -fps 3 -add tlktmpmovie.264 tomkmovie.mp4 rm -f tlktmpmovie.264 ffmpeg -y -r $spd -i tomkmovie.mp4 moviefile.mp4 mv moviefile.mp4 $out.mp4 rm -f tomkmovie.mp4 echo "" echo "" echo "--------------------------------------------" echo "the generated movie file is in "$out".mp4" echo "--------------------------------------------" echo "" exit