Linux stuff

Coding AVI files to some portable devices (put for jobs in background: nice -n 19 before the commands):

GoPro video
avconv -i FILENAME.MP4 -acodec libmp3lame -ac 2 -ar 44800 -b 100000k -ab 100000 FILENAME.avi

# Do it in a loop
index=1
for i in *.MP4;do avconv -i "$i" -acodec libmp3lame -ac 2 -ar 44800 -b 100000k -ab 100000 "out-$((index++)).avi"; done avconv -i "$i" -acodec libmp3lame -ac 2 -ar 44800 -b 100000k -ab 100000 "out-$((index++)).avi"; done

On iRiver Clix2
ffmpeg -y -i myfile.avi -title myfile -vcodec libxvid -async 1000 -s 320x240 -r 29.97 -b 768k -qmin 2 -qmax 8 -me full -acodec libmp3lame -ac 2 -ar 44100 -ab 128kb -f avi myfile.avi

On Sony Ericsson P1i
nice -n 18 ffmpeg -i mifile.avi -vcodec libx264 -r 15 -b 192k -s 320x240 -acodec libfaac -ac 2 -ab 64k -ar 32000 myfile.mp4

Nokia E51
ffmpeg -i myfile.avi -f mp4 -vcodec mpeg4 -b 200k -s 320x240 -r 15 -acodec libfaac -ar 24000 -ab 64k -ac 2 myfile.mp4

Two way encoding (-sid 0 denotes subtitle)
mencoder movie.vob -sid 0 -aid 128 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=1000:vpass=1 -oac copy -o /dev/null mencoder movie.vob -sid 0 -aid 128 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=1000:vpass=2 -oac mp3lame -lameopts cbr=128 -o movie.avi

Two way encoding - alternatives
mencoder -ovc lavc -sid 0 -lavcopts vcodec=mpeg4:vpass=1:vhq:vbitrate=1000 -mf type=sgi:fps=25 -nosound -o /dev/null mf://*.sgi mencoder -ovc lavc -sid 0 -lavcopts vcodec=mpeg4:vpass=2:vhq:vbitrate=1000 -mf type=sgi:fps=25 -nosound -o output.avi mf://*.sgi

mencoder all.vob -sid 1 -aid 128 -ovc x264 -lavcopts vcodec=mpeg4:vhq:vbitrate=2000:vpass=1 -mf type=sgi:fps=25 -oac copy -o /dev/null mf://\*.sgi

mencoder all.vob -sid 1 -aid 128 -ovc x264 -lavcopts vcodec=mpeg4:vhq:vbitrate=2000:vpass=2 -mf type=sgi:fps=25 -oac mp3lame -lameopts cbr=128 -o movie.avi mf://\*.sgi

mencoder all.vob -sid 0 -aid 128 -ovc x264 -lavcopts vcodec=mpeg4:vhq:vbitrate=3000:vpass=2 -oac mp3lame -lameopts cbr=128 -o movie.avi