Create video stream

derez

Expert
Licensed User
Longtime User
Is it possible to create video stream ?
I want to send the video output of the device to another device using the local wifi and to display it in real time.
Will asincstream be fast enough ?
Thanks.
 

derez

Expert
Licensed User
Longtime User
Works very nice.
Will it be much to ask for a server program in b4a so it can be run on a device ?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
It shouldn't be difficult to create such a server. Try it. I will help you if you encounter any issue.

You should create a service and listen for incoming connections with ServerSocket. Once there is a connection use AsyncStreams (change the client code to use prefix mode and do NOT send the file size). In AStreams_NewData you should convert the data to a bitmap and call CallSubDelayed to show the image in the activity.
 
Upvote 0

derez

Expert
Licensed User
Longtime User
Here are the modified client application and the b4a server application. :)
 

Attachments

  • ACCTVServer.zip
    7.8 KB · Views: 301
  • CCTVCam.zip
    10.5 KB · Views: 298
Last edited:
Upvote 0
Top