cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F746G-DISCO, TouchGFX, play video

TGate.1
Associate II

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

13 REPLIES 13
Martin KJELDSEN
Chief III

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.

TGate.1
Associate II

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 ?

Martin KJELDSEN
Chief III

You can get xxd for the TouchGFX environment that we provide (based on Mingw), or use something like WSL (Windows subsystem for linux)

/Martin

LHege.1
Associate III

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?

You must use an .avi container with MJPEG encoded video data.

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).

LHege.1
Associate III

Thanks for the fast reply. So are these steps right?

  1. Generate AVI video with MJPEG encoded video data
  2. Convert to <mp4> with "pazera"
  3. Generate C file with xxd -i <mp4>
LHege.1
Associate III

Nice to know that this is coming soon in the next version. Whend is this release planned?

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