cancel
Showing results for 
Search instead for 
Did you mean: 

MPJEG video demo for STM32F746G-DISCO?

patrik.frey
Associate II

This post (https://touchgfx.zendesk.com/hc/en-us/community/posts/115000138705/comments/115000702685 ) mentions a demo for an MJPEG video player in TouchGFX.

The link is given as:

http://ftp.draupnergraphics.com/TouchGFX/demos/simple_video769eval.zip

Now when I open this in TouchGFX Designer 4.10 it first asks me to convert the project from 4.8 to 4.10. That seems to work ok, but the log says "Generate Assets Error" with the following output_GenerateAssets.log:

make[1]: *** No rule to make target 'generated/images/include/BitmapDatabase.hpp', needed by '_assets_'.  Stop.
simulator/gcc/Makefile:68: recipe for target 'assets' failed
make: *** [assets] Error 2

There is a .png file in assets/images/.

What might be the problem here? Or is there a more up to date example for a MJPEG video player available?

10 REPLIES 10
Martin KJELDSEN
Chief III

Hi @patrik.frey​,

There is no more recent example than that. I can't remember what the state of it is, but i will check it out since there are a few other people interested - And hopefully i can write a short article about how to use MJPEG on STM32 - Either hardware decoded (STM32F769) or using libJPEG for software decoding into Dynamic Bitmaps.

patrik.frey
Associate II

Thank you for looking into this! A comprehensive article explaining the use of MJPEG on STM32 would be incredibly helpful. (e.g. how to convert to the correct format (which container etc.), how to decode the JPEG (either using the hardware accelerator or via software decoding) and how to then display it via TouchGFX or STemWin).

Martin KJELDSEN
Chief III

Yes, that will be the plan. As you said, video format and container are also of some importance 🙂 I will not be covering this for STemWin, however. I hope that's okay.

patrik.frey
Associate II

Fair enough. I guess most of the concepts should apply to both Touch GFX and STemWin right? Steps like how to load the MJPEG file from an SD card and how to decode the JPEGs should be the same I assume.

Martin KJELDSEN
Chief III

The main difference will be where to decode the frames into. For TouchGFX it's DynamicBitmap, but for STemWin i'm not sure how to do this (I've never tried emWin). The decoding part (how to use libJPEG, etc), is the same yes.

I think maybe i will do a screencast instead of an article. It may be less work and be even more clear.

patrik.frey
Associate II

Hi @Martin KJELDSEN​ 

Is this already in the works? I would be really glad to have a good overview on this topic. Article or screencast with some explanations would both be fine.

Martin KJELDSEN
Chief III

Hi @patrik.frey​,

Yes, it's in the works, on the side 🙂 Gathering material and creating examples and will eventually turn it into a screencast. Topics:

  • Dynamic JPEGs -> touchgfx::DynamicBitmap
  • Dynamic PNGs -> touchgfx::DynamicBitmap
  • Motion JPEG movies (Perhaps just software decoding to start, then HW decoding using F769)

Martin KJELDSEN
Chief III

If you want to get started quickly, check out the Washer Demo in the "Online Applications" part of creating a new application. There's a screen dedicated to video and you'll find a folder video/ that has the videos used in the process (.avi container, mjpeg codec converted from mp4) along with the c-array representation of this video created using xxd. This is simply linked into the program and used directly.

Epoul.1
Associate II

Will this example also run on H750 (STM32H750B-DK) board?