Handling unsupported animation files (such as MP4, AVI, WMV) through scripting

Naveen Kumar Begari
Member Posts: 77
**
in Structures
Hi Team,
I'm exporting animation files using mechanical scripting as below:
animation_export_format = (Ansys.Mechanical.DataModel.Enums.GraphicsAnimationExportFormat.MP4) settings_720p = Ansys.Mechanical.Graphics.AnimationExportSettings() settings_720p.Width = 1280 settings_720p.Height = 720 deformation.ExportAnimation(os.path.join(cwd_1,"deformation.mp4"), animation_export_format, settings_720p)
But when I try to display on web browser, animations files are not supporting expect .gif files, when I use web optimized and encode the video, then it was loading in web browser.
Any suggestions here.?
0
Comments
-
What version of Ansys Mechanical are you using? It was not until 25.1 release that .mp4 animations are exported in a web-supported format.
0 -
@Mike.Thompson Currently I'm using 2024R2 only
0 -
Hi Naveen. This issue has been resolved starting at 2025R1. In prior versions, the workaround is to convert the .mp4 to use the H.264 codec. This can be done, e.g., using Ansys EnSight:
import ens_utils as eu eu.convert_movie("D:/wrongly_coded.mp4","D:/correctly_coded.mp4")
0 -
@Landon Mitchell Kanner Thanks for your response
0