Thought I'd put this up here in case it's useful to someone else. You will (probably) need to change the paths depending where you put things. It all outputs to a single Script window (so quick and easy checking of the log).The window title displays what is currently happening for a quick reference.
Output is 640x480 (maximum of each dimension) .m4v file (same as an .mp4 but video only), size for a movie is normally somewhere around 1gb, but this is quality based and not size based. These play perfectly well via my iPhone / AppleTV etc.
Both Handbrake and AACGain are easy to find online - but the base script itself can be altered for anything, just change the commands between the ":encode" and "goto:eof" lines - the "call:encode {file$} {destpath$}{file$|ext=m4v}" is duplicated by DOpus once for each file (why it's not using a loop or anything). The initial "for..." loop counts the total number of files being passed.
<?xml version="1.0"?>
<button backcol="none" display="both" label_pos="right" textcol="none">
<label>Encode M4V</label>
<tip>Encode any video file to .m4v by quality</tip>
<icon1>#video</icon1>
<function type="batch">
<instruction>@disablenosel</instruction>
<instruction>@filesonly</instruction>
<instruction>@runmode:min</instruction>
<instruction>@externalonly</instruction>
<instruction />
<instruction>set _count=0</instruction>
<instruction>set _total=0</instruction>
<instruction>for %%i in ({allfileshort$}) do set /A _total+=1</instruction>
<instruction />
<instruction>call:encode {file$} {destpath$}{file$|ext=m4v}</instruction>
<instruction />
<instruction>goto:eof</instruction>
<instruction />
<instruction>:encode</instruction>
<instruction>set /A _count+=1</instruction>
<instruction>IF EXIST "%~2" (</instruction>
<instruction> echo Skipping %~n1</instruction>
<instruction>) ELSE (</instruction>
<instruction> title Encoding %~n1 [%_count%/%_total%]</instruction>
<instruction> echo Encoding %~n1</instruction>
<instruction> "C:\Program Files\HandBrake\HandBrakeCLI.exe" -i "%~1" -t 1 -c 1 -o "%~2" -O -f m4v -X 640 -Y 480 --loose-anamorphic --decomb -e x264 -q 20 -a 1 -E faac -B 160 -R 48 -6 dpl2 -x me=umh -v</instruction>
<instruction> title Normalizing %~n1 [%_count%/%_total%]</instruction>
<instruction> echo Normalizing %~n1</instruction>
<instruction> "C:\Program Files (x86)\aacgain\aacgain.exe" /c /e /r /p "%~2"</instruction>
<instruction>)</instruction>
<instruction>goto:eof</instruction>
</function>
</button>