I was searching for a solution to directly capture footage within Panda3D. And while the
base.movie function is nice (which saves an individual screenshot of every single frame), but I’d really prefer something that records in a video format wise.
A week or so ago, I’ve found this link containing a script that encodes into an AVI video:
It works exactly what I wanted, but I have to fix some stuff, (like changing RGBA input into BGRA and changing codecs from AVI to H.264), but now I have a perfect solution I can use for recording stuff like cutscenes and machinimas within Panda itself without external software other than FFmpeg.
If any of this sounds useful to you, you can check out this gist I created here which records the Hello World demo from the manual into HelloWorld.mp4:
You can see the resulting output of the above script in YouTube here: