anchor.diff:  
   rem Stitching
   echo "Stitching frames..."
  -for %%f in (%FRAMESTEMP%\*.jpg) do (
  -rem For whatever reason (this has to be at the beginning of the line!)
  -  echo "Processing frame %%f"
  -rem TODO: There should be some error checking
  -  "%SCRIPTPATH%\gear360pano.cmd" /m /o "%STITCHEDTEMP%" "%%f" "%PTOTMPL%"
  -)
  +call "%SCRIPTPATH%\gear360pano.cmd" /m /o "%STITCHEDTEMP%" "%FRAMESTEMP%\*.jpg" "%PTOTMPL%"
   
   echo "Reencoding video..."
  -"%FFMPEGPATH%/ffmpeg.exe" -y -f image2 -i %STITCHEDTEMP%/%IMAGETMPLENC% -r %VIDFPS% -s %VIDSIZE% %FFMPEGQUALITYENC% %STITCHEDTEMP%/%TMPVIDEO%
  +"%FFMPEGPATH%\ffmpeg.exe" -y -f image2 -i %STITCHEDTEMP%\%IMAGETMPLENC% -r %VIDFPS% -s %VIDSIZE% %FFMPEGQUALITYENC% %STITCHEDTEMP%\%TMPVIDEO%
   if %ERRORLEVEL% EQU 1 GOTO FFMPEGERROR
   
   rem Check if there's audio
  
positive.code: set STITCHEDTEMPDIR=frames_stitched
  set OUTDIR="%SCRIPTPATH%\html\data"
  set FFMPEGPATH=c:\Program Files\ffmpeg\bin
  set FFMPEGQUALITYDEC="-q:v 2"
  set FFMPEGQUALITYENC="-c:v libx265 -crf 18"
  rem %% is an escape character (note: this will fail on wine's cmd.exe)
  set IMAGETMPLDEC=image%%05d.jpg
  set IMAGETMPLENC=image%%05d_pano.jpg
  
negative.code:                            -of csv ^
                             -select_streams v:0 ^
                             -show_entries stream=r_frame_rate ^
                             %VIDINNAME% > %TMPFPS%
  
  for /f "tokens=1-18* delims=," %%A in (%TMPFPS%) do (
    set VIDFPS=%%~B
  