ansys / pydynamicreporting

Pyansys project for Ansys Dynamic Reporting, a report generator tool.
https://dynamicreporting.docs.pyansys.com/
MIT License
7 stars 1 forks source link

Animation (e.g.,mp4) #94

Open ekostson opened 3 months ago

ekostson commented 3 months ago

📝 Description of the feature

Be able to add an animation (mp4) in pyADR (there is no like item_animation, like there is item_image, etc. - so we can not add an animation in pyADR natively at the moment)

💡 Steps for implementing the feature

NA

🔗 Useful links and references

NA

randallfrank commented 3 months ago

@ekostson The feature you are requesting actually already exists, it is just not documented. For example, the following:

import ansys.dynamicreporting.core as adr adr_service = adr.Service(db_directory="D:/RJF/mytest") id = adr_service.start(create_db=True) animation = adr_service.create_item() animation .item_animation = r"D:\foo.mp4" adr_service.visualize_report()

Works for me. Note that the file should be in "web compliant" mpeg4 (H.264 encoding) to be viewable. ADR will not transcode the animation for you. The open item here is to document the API.

randallfrank commented 3 months ago

@ekostson there is an example of this in the second example:

https://dynamicreporting.docs.pyansys.com/version/dev/examples/00-basic/01-connect.html#sphx-glr-examples-00-basic-01-connect-py