Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Create mp4
-
I would like to output my animation in Pythonista to an mp4 file.
One solution could be to capture the screen. How?
Another option is to create individual PIL images and create a movie out of that. How? -
On a Mac this can be done easily with ffmpeg. Using syntax like this.
See: http://matplotlib.org/api/animation_api.html?highlight=movie#matplotlib.animation.MovieWriter for syntax:
with moviewriter.saving('myfile.mp4'): # Iterate over frames moviewriter.grab_frame()
If you need to do this in Pythonista without matplotlib, you might try http://visvis.googlecode.com/hg/vvmovie/images2gif.py for creating an animated GIF instead of an MP4. You will lose image quality but depending on you source images, this might not matter.
See: http://stackoverflow.com/questions/753190/programmatically-generate-video-or-animated-gif-in-python and search stackoverflow for Python MP4.
-
Plug your iOS 8 iDevice into your Yosemite Mac and fire up QuickTime. On your iDevice, launch your animation in Pythonista. Go to File --> New Movie Recording. Click the little down arrow next to the record button and under Camera select your iDevice from the list. Click the record button, and you are off! The resulting file will probably be Untitled.mov, so you'll have to use SmartConverter or an online video converter or something to convert the video to an MP4.
-
Like Gerzer's suggestion, this isn't a Pythonista-specific method.
If you don't have a Mac (or do but aren't running Yosemite) and are willing to spend a modest amount on a 3rd party solution, you could use one of the few apps out there that turns your Mac/PC into an Airplay receiver. At least one of the apps has a recording feature built in. Or just combine it with your own screen-recording app such as Camtasia, et al.
Just google 'airplay mirror app' for more hint.
-
The solution with an AirPlay mirror works very well. I have bought X-mirage(PC) which has built-in functionality to capture to a MP4 file, including sound!
Thanks.