B4J Question View Streaming Video

PHollyer

New Member
I am VERY new to B4J, but not new to software development. I've spent my day reading manuals, watching videos, and I'm stumped. I've built a Raspberry Pi with camera and have it set up (in the garage) Streaming Video on http://10.0.0.183:8082 What I want to build is a Viewer, to Connect to the Raspberry's Video output.
When I use the WebView control I get byte code being streamed, but NOT Video. I get Video using Chrome. How do I continuously convert this into video and view it?

Eventually, I want to put up numerous cameras around the house and put this code behind a touchscreen, as a control center.

Pete
 

PHollyer

New Member
Thanks for the Quic Reply!
Yes, I confirmed the Raspberry (MotionEye software) is streaming mjpeg.
I can get this code to successfully connect to http:10.0.0.183:8082
but when the "GET" command is issued it gets Terminated.

I have played with the GET Code extensively with no luck
Original Code:

Dim sTmp As String = $"GET ${mPath} HTTP/1.1
Host: ${mHost}
Connection: keep-alive
"$
Where sTmp = "/axis-cgi/mjpg/video.cgi" and mHost = ""ticklecam.engr.utk.edu"

In my case I have Neither of these. I've tried ever possible combination of these values:

Dim sTmp As String = $"GET * HTTP/1.1
Host: http://10.0.0.183:8082
Connection: keep-alive
"$
-and-
Dim sTmp As String = $"GET Http://10.0.0.183:8082 HTTP/1.1
Connection: keep-alive
"$
-and-
Dim sTmp As String = $"GET 10.0.0.183 HTTP/1.1
Host: http://10.0.0.183:8082
Connection: keep-alive
"$
-and-
a hundred or more combinations...

Any ideas would be appreciated
 
Upvote 0

PHollyer

New Member
Here is a sample of my receive Stream

--BoundaryString Content-type: image/jpeg Content-Length: 38892 ÿØÿàJFIFÿá€ExifMM*2P‡i2ˆ*ÿû0220d2020:04:30 16:23:582020:04:30 16:23:58ÿÛC !"$"$ÿÛCÿÀà€"ÿÄ ÿĵ}!1AQa"q2‘¡#B±ÁRÑð$3br‚ %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖ×ØÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ

Using this above I've concluded the code mentioned will not work. The Stepping through the buffer doesn't match the above, MOST Notably the "boundary" between image frames mine is "--BoundaryString", Also I have the Image length or "Content-Length:"
So I'll have to write a whole new parser. The process seems "relatively" simple, (Famous last words!)

--So with that said I've set out--

I've written the base, but cannoy get the code to get into the
Sub Astream_NewData (Buffer() As Byte)
Log("NEW DATA")
End Sub

In the LOG Window I GET:
Waiting for debugger to connect...
Program started
Connection Successful


and that's all
 

Attachments

  • AsyncStream.zip
    36.5 KB · Views: 166
Upvote 0

PHollyer

New Member
Not to shift gears, I have downloaded B4A, ang OMG...my video feed popped right up with a
WebView1.LoadUrl("http://10.0.0.183:8082")

Holy cow! I have an OrangePi 3 (16GB + 1.5 Quad-processor) I bought to build into a Retro Machine (only to find out it can ONLY run Android)...I now have a GREAT use for it!
 
Upvote 0
Top