set slop 1
if {$argc > 0} {set slop $argv}
foreach file [glob IMG*JPG] {
  set base [file root $file]
  set ext [string trimleft [file extension $file] "."]
  puts "BASE: $base EXT: $ext"
  exec convert -size 320x240 $base.$ext $base.gif
  exec  wish bluescreen.tcl $base.gif $slop
  exec  convert $base-BL.gif $base-BL.jpg
  catch {
  exec jpeg2yuv -n 8 -I p -f 25 -j$base-BL.jpg |\
    mpeg2enc -f 8 -o$base-BL.mpg
  }
  lappend blueMpgs $base-BL.mpg
}
eval exec cat $blueMpgs >stream.mpg
catch {exec mplex -f 0 -o stream%d.mpg stream.mpg}