H Hamied Abou Hulaikah Well-Known Member Licensed User Longtime User Jan 27, 2020 #1 Hi Based on this example: https://www.b4x.com/android/forum/threads/mjpeg-cctv-server.73792/ How can I add a image logo to any corner of the streaming video?
Hi Based on this example: https://www.b4x.com/android/forum/threads/mjpeg-cctv-server.73792/ How can I add a image logo to any corner of the streaming video?
mcqueccu Expert Licensed User Longtime User Jan 27, 2020 #2 Well I have not used that library before but if you are not looking to embed the logo in the video then you can just add imageview on top of the video control at the corner where you want it with the logo on it Upvote 0
Well I have not used that library before but if you are not looking to embed the logo in the video then you can just add imageview on top of the video control at the corner where you want it with the logo on it
H Hamied Abou Hulaikah Well-Known Member Licensed User Longtime User Jan 27, 2020 #3 mcqueccu said: just add imageview on top of the video control at the corner where you want it with the logo on it Click to expand... Not like this, I want it to be embedded in the stream itself, like watermark or as TV channels. Upvote 0
mcqueccu said: just add imageview on top of the video control at the corner where you want it with the logo on it Click to expand... Not like this, I want it to be embedded in the stream itself, like watermark or as TV channels.
Erel B4X founder Staff member Licensed User Longtime User Jan 27, 2020 #4 This is the code that gets the image from the camera preview and sends it: Code: Sub Camera1_Preview (PreviewPic() As Byte) If DateTime.Now > lastPreviewSaved + IntervalMs Then Dim jpeg() As Byte = camEx.PreviewImageToJpeg(PreviewPic, 70) lastPreviewSaved = DateTime.Now Starter.manager.NewBitmap(jpeg) End If End Sub You will need to load the bitmap with a canvas and then draw the logo. Take the canvas bitmap and send it. Make sure to reuse the same canvas each frame. Upvote 0
This is the code that gets the image from the camera preview and sends it: Code: Sub Camera1_Preview (PreviewPic() As Byte) If DateTime.Now > lastPreviewSaved + IntervalMs Then Dim jpeg() As Byte = camEx.PreviewImageToJpeg(PreviewPic, 70) lastPreviewSaved = DateTime.Now Starter.manager.NewBitmap(jpeg) End If End Sub You will need to load the bitmap with a canvas and then draw the logo. Take the canvas bitmap and send it. Make sure to reuse the same canvas each frame.