Android Question MJPEG Stream clarification

max123

Well-Known Member
Licensed User
Longtime User
Hi all,

I've read this:
https://www.b4x.com/android/forum/threads/b4x-class-mjpeg-decoder.73702/
but now I'm pretty confused.

I'm confused because in my 3D printing app I managed it in a completely differrent way.

I explain better here, in my app I had necessity to stream a realtime video of 3D printer while it print, for this I used ESP32CAM:

using a modified version of CameraWebServer sketch:
https://github.com/espressif/arduin...es/Camera/CameraWebServer/CameraWebServer.ino

On B4A side I just put a WebView on the Activity and a ListView where I put some urls, to point a camera I just select ESP32 IP address and I see the exposed webserver with all camera controls and a START STREAM button. If I press it I can see the stream.
I can even bypass the main page with camera controls and point directly to the stream url this way: ESP32_IP_ADDRESS:80/stream

The framerate is not bad, around 5 fps at 1600x1200, it increases by decreasing resolution, at 1024x768 it is around 20 fps and with lowers resolutions it increase up 45 fps at 176x144.

In past I've tried other solutions like stream a PC webcam, CCTV etc... but the max framerate I archived is around 4 - 5 fps at 640x480 and it involve to have a dedicated pc, not good solution.

My question is, because MJPEG need a decoder ? Maybe just because it do not stream directly on a WebView ?

I need to know it because next days I will attemp to do the same work with Raspberry camera, probably I will use Python, I need to capture and stream MJPEG video stream. I'm not sure if exists a B4J Raspberry camera wrapper. I will search it. Even if you have suggestions on this they are welcome.

Many Thanks for clarifications
 
Last edited:

max123

Well-Known Member
Licensed User
Longtime User
Please help to know
 
Upvote 0

max123

Well-Known Member
Licensed User
Longtime User
Many thanks @Erel for clarification.

Please, can you show me what browser does not support it directly ?

- B4A WebView. Do it but for some strange reasons on Android 6.0.1 I had to manage and uninstall/reinstall the Android System WebView on Google Play Store

- B4J WebView. Not yet tested. It support ?

- B4i WebView. I do not use it but should be a clarification for other users.

Many thanks
 
Upvote 0
Top