I'm trying to set up a script that can, ideally, start and stop movies as needed. BizHawk right now only has a movie.stop() function documented, so I'm left to try to come up with some workarounds, and I'm hoping some of you can help.
The primary issue is that I need to be able to sample a movie periodically to fit the use case. As far as I can tell, BizHawk stores its temporary movie data in memory as opposed to in a temporary file somewhere (please correct me if I'm wrong). This means that the only way I can make a copy of the current movie and send elsewhere is to stop the movie. But if I stop it within lua I have no way to restart it, and thus automation is lost.
With that in mind, what's the best way to get around this? I could potentially grab all of the inputs from each frame and store them away in my own file format, but that feels like a few too many unnecessary steps for what it gets me. Same thing with trying to hack a movie.start into the source code. Is there some way to force BizHawk to dump the temporary movie to a file without ending the movie, or alternatively is there some way to start movies within lua?
General idea:
start movie @ save state -> record actions -> send movie file -> return to save state & repeat