2020-06-04 12:18 AM - edited 2023-11-20 09:32 AM
Hi everyone,
I would like to play a video (.mp4 or .avi), on STM32F746G-DISCO.
I find an example on TouchGFX Designer (Online Applications), Washer Demo with a video in the screen Instructions.
I find in the project a file "video.c" which is generated from MP4 but I don't know how this file is generated.
I am using TouchGFX Designer 4.13.0 and STM32CubeIDE 1.3.1
Thanks,
Tom
2020-06-04 01:20 AM
We convert videos to mp4 using something like "pazera" and then
xxd -i <mp4>
to create an c-file with an array with the data to be built into your application.
2020-06-04 06:50 AM
Thank you for your high reactivity but I am not working on Linux but on Windows so I can't use : xxd -i <mp4>
Do you know if it's possible to create a c-file with the data easly on Windows ?
2020-06-08 12:00 AM
You can get xxd for the TouchGFX environment that we provide (based on Mingw), or use something like WSL (Windows subsystem for linux)
/Martin
2021-10-12 12:05 AM
Hi There, I want to do the same thing and converted the video with pazera (Video Codec: H.264) and then xxd to a C file.
But When I load the movie I get the error "RIFF header not found"
Can you please provide some more details how to convert the video correctly?
2021-10-12 01:36 AM
You must use an .avi container with MJPEG encoded video data.
2021-10-12 01:38 AM
We're adding a video designer widget for 4.18.0 (out soon) and generator support for it, both SW (libjpeg, e.g. f746) and HW (JPEG - e.g. f769, H7).
2021-10-12 01:46 AM
Thanks for the fast reply. So are these steps right?
2021-10-12 01:47 AM
Nice to know that this is coming soon in the next version. Whend is this release planned?
2021-10-12 01:51 AM
Note that this new feature is for people who want to store video in memory mapped flash, in which case you can use an automated flow from the designer. For SD/EMMC you need to read an article we'll also write.
I forget the steps involved, but generally you need to call xxd -i on your .avi file (which contains mjpeg frames). We're not doing this for the upcoming release because .c files will take a long time to build. We're simply converting the binary .avi file into an elf object which is placed in external flash for ST boards.
/Martin