Render animation to mp4?

13 views
Skip to first unread message

Gareth Murfin

unread,
Jul 10, 2019, 11:10:43 AM7/10/19
to CodenameOne Discussions
Hi, 

Ive made a canvas app that includes some animation of a photograph, its all done using code and done in paint(). I would like to save the animation out for the purpose of sharing on facebook. Whats the easiest way to do this? Im assuming I should write each frame to an image, then construct an mp4 from the image, but is there any way to create videos like this in codenameone ?

Shai Almog

unread,
Jul 10, 2019, 11:40:56 PM7/10/19
to CodenameOne Discussions
Hi,
there is no builtin video encoding API in OS's. Camera internal code is self contained and not accessible by external logic.
Apps that generate videos use one of the following:

- Server side encoding
- Embed a library like ffmpeg
- Encode using a very simple format, there are some very simple codec formats you can use.
Reply all
Reply to author
Forward
0 new messages