135 views
in Embedded Wizard Studio by
Hello EW-Team,

I am trying to explore the feature of Multi-Bitmap frame

1) to display a video file loaded in the MJPEG format. : Request you to kindly share an example MJPEG file which can be loaded . Since the sample MJPEG files i found online , the size was too large mostly.

2) to display a sequence of JPEG images with Framedelay : I did read the documentation and configured as mentioned with a framedelay of 100msec. But the images doesnot change after framedelay .

It would be helpful if there is an example project for the above two features

 

Thank you

Hemanth

1 Answer

0 votes
by

Hello Hemanth,

1) to display a video file loaded in the MJPEG format. : Request you to kindly share an example MJPEG file which can be loaded . Since the sample MJPEG files i found online , the size was too large mostly.

first at all it is important to understand that Embedded Wizard Bitmap resources don't support MJPEG decoding at the runtime. Just in the moment when you generate code for the target system or you start the Prototyper, the MJPEG contents (similarly to all other image contents like PNG, BMP, etc.) are read and converted in the format appropriate for the target system. In other words, all frames stored within the MJPEG file are transcoded in a Embedded Wizard bitmap already during code generation.

Depending on the original MJEPG content, its JPEG compression, the resulting amount of data for the Bitmap resource can become significantly larger than the size of the original MJEPG file. The transcoding (the conversion) may also take a long time - the more frames the longer the conversion. Summarised, MJEPG should be used with prudence. It is not intended to add real videos to your application. It is intended for short animation sequence used for example in a splash screen, etc. On the other hand, it does not require any MJEPG decoder running in the target system.

Unfortunately, I have no MJPEG example to share with you. I searched in GOOGLE for "free mjpeg example". This lead me to a page where I was able to download a small MJPEG example for the resulting 640x360 pixel. How to use this MJEPG?

Step 1: Once you download the file, add it to the project. You can simply drag&drop the MJEPG file from Windows File Explorer to Composer window with an opened Unit (resources similarly to all other global entities may exist within Units only). See also: Add new bitmap resource.

Step 2: Within a GUI component where you want to display the MJEPG content, I added a new Image view:

Step 3: Move and resize the Imnage view as necessary.

Step 4: In Inspector window select in the Image view's property Bitmap the previously added bitmap resource (from step 1):

Just in the moment when the bitmap resource is used, Embedded Wizard starts the conversion. You see messages in the Log window. Note, this may take some time:

Step 5: Also modify the property Animated of the Image view top the value true. This is essential to allow the Image view to playback the converted MJPEG contents:

Step 6: Now start the Prototyper by pressing the key F5.

This will again cause the MJPEG to be converted. As soon as the operation is done, the Prototyper displays the animated contents.

Please note: per default the new aded Bitmap resource stores the image contents in the format Native. Depending on your target system and the color format used there, this may occupy a lot of memory. In case of contents imported from MJEPG we recommend to change the attribute Format of the corresponding Bitmap resource to the value Index8:

2) to display a sequence of JPEG images with Framedelay : I did read the documentation and configured as mentioned with a framedelay of 100msec. But the images doesnot change after framedelay . 

Difficult to say what is wrong. Have you set the property Animated of the Image view to the value true? See also: Control the playback of an animated bitmap resource.

A further hint: all above explained functionality is intended to display short animation sequences. If you expect a 'real' video player, you have to add a MJPEG decoder to your software in the target system and decode MJPEG contents at the runtime. Then you could even play videos from an SD card, etc.

Does it help you further?

Best regards

Paul Banach

by
Hello Hemanth,
for our customers we prepared an example application, that decodes MJPEG video files during runtime and plays it via the Embedded Wizard OSD layer.
I do not really know your needs. If you are interested on such a solution, please contact us via support@embedded-wizard.de.

Kind Regards,
Martin

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...