Fixes #501, #564, #642. Kelvinator now in python. Can be kicked off by: manage.py kelvinate video_slug. Added configurable parameter and tweaked keyframe selection algorithm to be able to specify the approximate number of keyframes per minute to generate. Default is 2 kfpm
Kelvinator cleans up temp files after it is done
Merge branch 'halawa_kelvinator' of github.com:Stanford-Online/class2go into sef-kelvinator
Move kelvinator command under kelvinator dir
Merge branch 'master' of github.com:Stanford-Online/class2go into sef-kelvinator
Removing sample videos (#765)

If we want sample content, we shouldn't just use prof content without
asking like this.
Merge branch 'master' of github.com:Stanford-Online/class2go into sef-kelvinator
Add comment - consider "INFO" for settings.py (#689)

./manage.py kelvinator is better with info level logging to console, I
wonder if this is OK for other commands?  What else goes to console?
Kelvinator as a celery task (#765)

A bunch of changes
- Bring in Sherif's changes
    - #642: Script to manually kick off a Kelvinator job
    - #564: Kelvinator threshold resuls in way too many slides...
    - #501: Kelvinator rewritten to take out the shell script
- switch from storing output into a "report" interim variable to using
  standard logging.  This way you get console output when running as an
  interactive command (manage.py) and isolated log files when a celery
  task.
- Celery task.  Moved the entirety of the former kelvinator.py into
  tasks.py to follow convention.
- Still only two parameters, s3 path and desired number of frames per
  minute.
- Better handling of config option.  Now if you specify a
  "KELVINATOR_WORKING_PATH" then we do our work there, otherwise we
  create a temp dir in /tmp/kelvinator-$ts, where ts is epoch time.
- Throw exception on error instead of just print warnings.  When we fail
  on a job we want to be vocal about it (send mail, etc) since we don't
  have requeue/retry logic in place.
- Added a fudge factor to ffmpeg to skip the initial three seconds of a
  video.  This was empirically determined from watching a few videos and
  noticing that we are consisitenly skewed vs. YouTube and watchcing the
  video directly.  This is clumsy and a bit dangerous.

Still to do:
- For static videos we should have a slide every X seconds at least, say
  30 seconds, for better navigation
- Handle translations and rotations, this still does very poorly on
  panning or shaky video
- write to DB instead of S3
- retry logic on S3 download / upload.  Right now it is fragile
- Integrate rekelvinator.
Remove KELVINATOR_WORKING_PATH since default is OK (#765)

It will be a rare instance that someone will want to set this.
Remove old differenceFrames.py (#785)

Long since absorbed into main-line tools.
Remove old kelvinator backdoor UI (#765)

This was an old attempt of a way to manually kick off kelvination,
but the new manage.py interface is much better.  Now this form
longer works, and if someone stumbles across it only bad things can
happen.
Remove template files (#765)

Continuation of dec50aa6bf64eaae53ecf4c5ad1cde8bb1b1925b
Revise README, Kelvin's original no longer right (#765)
Celery emailer handles hard SMTP error codes #790

on 4xx codes, retries entire task starting with email that failed
on 5xx codes, pops failed email and goes on
New celeryd settings (#781)

- Changing time limit from 5 min (300 sec) to 2 hours (7200 sec)
- Lowering concurrency from 8 to 2 workers.  I am concerned that too
  many workers could soak up kelvinator jobs that would then crawl,
  especially on small machines (single core, not all that powerful)
Make sure sqlite DB owned by daemon/daemon (#781)

If someone had run celery as a the wrong user, wrong ownership could
screw things up.  Were already setting perms, just set owner too.
Parameterize celery settings: timeout, concurrency (#781)

We don't want to have to do code changes to change this stuff.
Parameterize and put defaults in environment file.  We could even do
per-machine overrides or such if we want to manage these settings more
carefully in the future.

Concurrency back to 8 in all the environment files, FWIW, so we can do
email blasts.  Will set back to 2 to for normal operations
(kelvination).

Tested on util1.dev, after running we got the right things in
/etc/defaults/celeryd:

> # Extra arguments to celeryd
> CELERYD_OPTS="--time-limit=7200 --concurrency=8"
Merge pull request #795 from Stanford-Online/sef-work

Small celery config improvements (#781)

lgtm
Merge pull request #792 from Stanford-Online/jbau-celery-email

Celery emailer handles hard SMTP error codes #790