Some tutorial will be here soon, but for now, this script that glitches your video file.
Requires bash, ffmpeg & sox.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
#!/bin/bash # SOCKS0FF glitcher # ffmpeg->imagemagick->sox->ffmpeg # by nova@deviator.si | http://deviator.si # ----------------------------------------------------------------------- # some settings. change these to get different results. # which image type you want to use for glitching? # very good one is a simple PPM. can also be tiff. IMGEXT="ppm" # raw file interpretation by sox RAWFILEOPTS="-e unsigned -r 44100 -b 8 -c 2" # sox effect #SOXEFFECT="echo 1 0.9 700 0.9" SOXEFFECT="pitch 4.5" #SOXEFFECT="phaser 1 0.15 0.1 0.9 0.6" #SOXEFFECT="chorus 0.5 0.9 50 0.4 0.25 2 -t 60 0.32 0.4 2.3 -t 40 0.3 0.3 1.3 -s" #SOXEFFECT="chorus 0.9 1 50 0.4 0.25 0.1 -t 60 0.32 0.4 0.2 -t 40 0.3 0.3 0.5 -s" #SOXEFFECT="earwax" #SOXEFFECT="flanger 30 10 -9 100 0.1 sin 50 lin gain 3" #SOXEFFECT="overdrive 20 10" #SOXEFFECT="stretch 2" #SOXEFFECT="stretch 1.004" #SOXEFFECT="stretch 1.02" #SOXEFFECT="tempo -l 0.7 120 30" #SOXEFFECT="" # image header size in bytes - it will be preserved in new file HEADERSIZE=400 echo "---[ STARTING SOXOFF! ]----------------------------------" # check existence of input argument # the $# variable will tell you the # number of input arguments the script was passed. if [ $# -eq 0 ] then echo "Error. No arguments supplied." exit 1 fi # get this session's "ID" SID=`date +%Y%m%d_%H%M%S` # create folder for this session DIR=soxoffd_$SID echo "+++ creating folder $DIR ..." mkdir $DIR # create tmp folder echo "+++ creating folder $DIR/tmp/ ..." mkdir $DIR/tmp/ echo "+++ extracting all frames as images..." echo echo "----------------------------------------------------------" echo ffmpeg -i $1 $DIR/tmp/frame%5d.$IMGEXT echo echo "----------------------------------------------------------" echo "+++ processing each image..." for i in $DIR/tmp/*.$IMGEXT do echo "---[ $i " # fetch original file size FILESIZE=`stat -c%s $i` echo "+++ soxing with $SOXEFFECT ... " sox -t raw $RAWFILEOPTS $i -t raw $RAWFILEOPTS $i.soxed $SOXEFFECT echo "+++ fixing headers..." head -c $HEADERSIZE $i > $i.header head -c $FILESIZE $i.soxed > $i.trimmed tail -c `expr $FILESIZE - $HEADERSIZE` $i.trimmed >> $i.header mv $i.header $i rm $i.soxed $i.trimmed echo done echo echo "----------------------------------------------------------" echo "+++ putting frames back into a movie ... " ffmpeg -i $DIR/tmp/frame%5d.$IMGEXT $DIR/$SID_$1 echo echo "+++ removing temporary folder ..." rm -rf $DIR/tmp/ echo echo "---[ end of the program. ]---" |