Don't reconfigure logging when called not from command line
Prevent first event getting linked to the last one
Fail early on circular links
Prevent circular reference on events ending after the audio

Also improve circular reference detection
Add some ffmpeg output parsing tests