With resque workers we don't need to use status files to trigger each
step of the recording process. So instead of using status files as triggers
they are not used only for information, so that the workers can know if
a e.g. processing script failed or succeeded.
For now the differences are that the archive worker will run inside
resque (it is a resque worker now) and there is a "rap-trigger" file that
is executed by systemd to detect recordings that need to be archived and
add a job on resque to archive them.
The process os scheduling jobs still needs to be reviewed, but for now will
be done by rap-trigger.
If processing didn't succeed, the directory where it is trying to write
the file might not exist, causing an exception in the worker which leads
to it getting stuck in a retry loop.
The purpose of this is to ensure that the recording processing with make
visible forwards progress, by ensuring that different steps in the
recording pipeline don't block each-other.
This fixes:
- recordings being processed prevent archiving new recordings from running
- recordings can't be published until all pending recording processing
completes
It does allow recording archive, sanity, process, publish steps to run in
parallel with each other, but at most one recording will be in each step at
a time. (I.e. while one recording is being processed, a different recording
can be published). This may potentially increase CPU usage for some users.
If you expect this to be a problem, you can set resource controls (see
`man systemd.resource-control`) on the bbb_record_core.slice systemd unit.
Instead of assuming that wav files have 44 byte headers (they usually
don't - freeswitch adds some metadata tags), add a super-simple wave
file parser that just finds the offset where the audio data actually
starts.
It's no longer used anywhere in the recording processing, and the one
remaining use in the sanity script can be replaced with a (less buggy!)
function from the video EDL code.
Main change is to rewrite the start/stop event handling to do fewer
passes and use simpler logic (it no longer has to track durations).
The temporary work audio codec is switched to flac; slightly lower hard
drive use and it avoids the 4-hour length limit of wav.
Some improvements to the video seeking when processing deskshare and
webcam videos, to avoid video dropouts.
Tweaks to the audio encoding quality settings.
Remove an unused function.