I am trying the code from https://github.com/AlexeyAB for object detection on videos,I want to save my results in .txt or .json form rather than .avi form. I tried this solution