simple way to export

Pixilang programming language
Post Reply
ainegil
Posts: 168
Joined: Thu Sep 22, 2022 11:37 pm

simple way to export

Post by ainegil »

What is the simplest way to export a particle animation to video?

And, how does the demo export work, is there a documentation?
I dont understand the example ?
User avatar
NightRadio
Site Admin
Posts: 3941
Joined: Fri Jan 23, 2004 12:28 am
Location: Ekaterinburg. Russia
Contact:

Re: simple way to export

Post by NightRadio »

What is the simplest way to export a particle animation to video?
Probably the simplest way is described in examples/graphics/save_avi_mjpeg.pixi

If you need more options - check lib/demo.pixi and examples in examples/graphics/demoscene
Then just add demo_video_export = "video.avi" in the beginning of your demo
ainegil
Posts: 168
Joined: Thu Sep 22, 2022 11:37 pm

Re: simple way to export

Post by ainegil »

Thanks! The mjpeg export drmo is exactly what I was looking for.
ainegil
Posts: 168
Joined: Thu Sep 22, 2022 11:37 pm

Re: simple way to export

Post by ainegil »

When I test the save mjpeg example, I can not open the created test video

and get an error message:

Unexpected Array Index out of bounds index = 288 length 288

I assume this has to do with the audio buffer but I am not sure
and I am not sure how to omitt the audio part properly
ainegil
Posts: 168
Joined: Thu Sep 22, 2022 11:37 pm

Re: simple way to export

Post by ainegil »

I now think its the screen dimension

which make the video 480 × 288

I assume this is not supported.
User avatar
NightRadio
Site Admin
Posts: 3941
Joined: Fri Jan 23, 2004 12:28 am
Location: Ekaterinburg. Russia
Contact:

Re: simple way to export

Post by NightRadio »

ainegil wrote: Tue Sep 27, 2022 2:48 pm When I test the save mjpeg example, I can not open the created test video
What player are you using?
ainegil
Posts: 168
Joined: Thu Sep 22, 2022 11:37 pm

Re: simple way to export

Post by ainegil »

I tried Just Player and VLC on Android.
I only have Android so I cant test on other platforms.

I think both should play mjpeg, but I didnt test with other files. What I tried is to change the screen size in the demo file, but the error message stays the same, same message with index 288, although the file size changes accordingly.

Maybe a problem with the codec on android and not the file.
ainegil
Posts: 168
Joined: Thu Sep 22, 2022 11:37 pm

Re: simple way to export

Post by ainegil »

Never mind: it DOES work with VLC player, it was just user error.
It does not work with Just Player but thats not important.
Post Reply