I have had better experiences using the Blackmagic design codecs (included with their video capture software - free).
However. At 5 mins you will likely hit the Avi containers max filesize... This will truncate your video.
I would use OBS to record a Spout feed from your stage. This would record realtime, so you patch needs to run smoothly in real-time. The nice thing about this approach is it off loads see work from Isadora, so you have more cpu space to use.