Personal Commandline howto: Make images into films and glue them together

# make 3 minute movies from a folder full of jpg’s – not perfect but workable
$for img in $(find . -iname ‘*.jpg’); do echo -n “Converting $img”; ffmpeg -loop 1 -i $img -c:v libx264 -t 180 -pix_fmt yuv420p -vf scale=320:240 $img.mp4 && echo ‘ [Done]’; done

#Glue them together – melt makes it really easy to glue all kinds of formats together
$melt file 0.mp4 file1.mp4 file2.mp4 mix.ogg -consumer avformat:mix.ogg
$melt 0_out_0.mp4 IMG_20180103_1.mp4 IMG_20180103_2.mp4 IMG_20180103_3.mp4 IMG_20180103_4.mp4 IMG_20180103_5.mp4 IMG_20180103_6.mp4 -consumer avformat:mix.ogg

#with more specs on the codec part:
$melt {input-sequence} -consumer avformat:{output-name} acodec=libmp3lame vcodec=libx264


Leave a Reply

Your email address will not be published. Required fields are marked *