Efficient video recording method

I found an answer here

It is not actually faster. I guess the bottleneck was somewhere else.