Added support for encoding video multiple times
Moved reflection to compile time