You can do it in two commands, but not ideal to need gif as stopgap.
agg demo.cast demo.gif ffmpeg -i demo.gif demo.mp4