How to play a video in LVGL

I want to play a video when the controller boots.

I attempted to create my own “video” through a series of animations but i have experienced crash when trying to open a page from an animation. This will happen 100% of the time.
There are a few steps, lets say 5 images, that fade in individually one after the other (lets say 5 leaves on a tree), once the 5 have appeared, the color rapidly fades to a bright shade of red, then fades back down to a dim shade of red. I have now manually created a video (less than ideal)
The last step of course, is to transition to main menu page. Attempting to open a new page from animation will crash the Squareline studio.

Im using Windows 10 running an ESP32 with 480x272 display, custom made. It works great, based off the Sunton design. It works great, but i would really love to know how to play a real video. ESP is kinda weak so i doubt i could play a regular video, but something super compressed with limited color palette would be fine. Even maybe black & White. Any way to play a video?

You lack info about display bus used and speed. This is primary condition for FPS.
How you attempting ???
Squareline have ok zoom rotation move animation capabilty… too Animation Image (lv_animimg) — LVGL documentation

Did you start the animation by the SCREEN_LOAD_START trigger, and the screen-change by the SCREEN_LOADED trigger? It should be done that way.

Late reply

I was running it in Initial Actions

Now im doing it the way you said. Still crash.

Any way to just play a video/GIF ?

Is there even documentation at all on Screen_Load_start and Screen_Loaded?

I might have posted too fast. just now i managed to do it.

except i am Only using the Screen_Loaded trigger to play all the actions with a series of delays

Fade1 = 2000 ms
Fade2 = 3000 ms
Fade3 = 4000 ms

ChangeScreen = 6000ms

it used to crash before. even with ScreenLoadStart, it crashed.
It works with Screen_loaded. I have no idea why.

Whats the difference? Im happy that it works, but i want to be sure its reliable. Its going into a commercial product

The corresponding docs: Events — LVGL documentation
When SCREEN_LOADED happens, your widgets are already added to the screen even if you use Temporary screens.
When you change a screen and the original screen was a Temporary Screen, the animation might still want to animate a deleted object of the original screen. So stopping/deleting specific or all animations on SCREEN_UNLOADED event of the original screen (see lv_anim_del or lv_anim_del_all at Animations — LVGL documentation) might be the sure way to avoid crashes, or not using temporary screens so animated objects are not deleted while animations are trying to modify their properties. (Animation created on a screen is not deleted automatically like the GUI widgets/objects.)

1 Like

Thanks, well, it works now.

I hope it never causes crashes, infact, im soon to release a consumer appliance running LVGL and i don’t fully understand it so im quite anxious that such crashes ( code attempting to modify properties of something that no longer exists ) would freeze my machine. Hope not :slight_smile: