Skip to main content
TGate.1
Associate III
June 4, 2020
Question

STM32F746G-DISCO, TouchGFX, play video

  • June 4, 2020
  • 6 replies
  • 2745 views

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

This topic has been closed for replies.

6 replies

Martin KJELDSEN
Principal III
June 4, 2020

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
TGate.1Author
Associate III
June 4, 2020

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
Principal III
June 8, 2020

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
October 12, 2021

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?

Martin KJELDSEN
Principal III
October 12, 2021

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

LHege.1
Associate III
October 12, 2021

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>
Martin KJELDSEN
Principal III
October 12, 2021

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

LHege.1
Associate III
October 12, 2021

Yes, I want to do the same thing. Placing the video togheter with all the other HMI assets in the external memory mapped flash.

So far I just dont get the video running. I try with these steps and keep you updated. Thanks

LHege.1
Associate III
October 12, 2021

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

Romain DIELEMAN
ST Employee
October 14, 2021

End of next week or in two weeks I believe

/Romain