However, the output file contains lagging and the recording process takes a huge amount of memory and CPU (see bug #757172). So one solution was to use V8 instead of V9. But As you can see in my code, it doesn't work. (If you remove the pipeline option it will work normally using V9, but I didn't know how to pass the v8 encoder option to it).