Jump to content

How to export video from main player?


photo

Recommended Posts

Posted

Hello!

yes, you can save all images in separate temprorary folder and them use FFmpeg/OpenCV libraries for create video from them. https://docs.opencv.org/3.4/d7/d9e/tutorial_video_write.html
 

the easiest way to do this - just call cmd line:

std::string command = "ffmpeg -r 30 -i frame%04d.png -c:v libx264 -pix_fmt yuv420p output.mp4";
std::system(command.c_str());

Thanks!

Posted

So UNIGINE API doesn't support directly generation video? Fine. Anyway, thanks.

Can I have one more small question? I have learned from this article https://developer.unigine.com/en/docs/2.19.1/principles/component_system/component_system_cpp/?rlang=cpp that "Logic of components is implemented via a set of methods, that are called by the corresponding functions of the world script". So for example, update() functions of all components are called SEQUENTIALLY, right? So I wonder if order is not specified, they will be called in which order? Between components of same node and components of difference nodes.

Posted

Yes, correct. They will be called sequentially in the same order as the nodes are loaded—according to the hierarchy, with node references handled separately.
Due to asynchronous loading, it’s impossible to definitively determine the order of the update calls.

In some cases, the order may even vary from one run to another, so relying on this order is not advisable.
If you have important components that need to be initialized earlier/later, explicitly specify their initialization order.

×
×
  • Create New...