The prototype is for Desktop. There is an audio / video send (h264) and a reception that can be obtained with any class to produce streaming video. (eg. VLC)looks really good. how about security? is the transfer secured? is it for desktop only?
Some internal "manual" decoding ? Without extra libs ?RTSP h.264
Manual coding is difficult, it takes a very large abacus. ? i jokeSome internal "manual" decoding ? Without extra libs ?
Now I can give some details. I used a @moster67 library, I asked for a small extension to get the stream.Some internal "manual" decoding ? Without extra libs ?
and I also checked it.
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private xui As XUI
Private LocalSocket As ServerSocket 'ignore
Private LocalIP As String
' Streaming Class (Send and Play)
Private VideoStream As SD_VideoStream
Private VideoRemotePlay As SD_VideoStream
Private VideoLocalPlay As SD_VideoStream
' Pane Base to Play - Add on Design
Private BaseRemoteVideo As Pane
Private BaseLocalVideo As Pane
' Node Base (into pane) - don't add by design
Private NodeRemotePlay As Node
Private NodeLocalPlay As Node
' Other
Private TextRemote As B4XView
Private CheckBoxRotate As CheckBox
Private LabelInfo As B4XView
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
If StreamSetup.vlcInstalled = False Then
Log("VLC must be installed on the computer to run this program.")
ExitApplication
End If
VideoStream.Initialize(Me,"VideoStream")
VideoLocalPlay.Initialize(Me,"VideoLocalPlay")
VideoRemotePlay.Initialize(Me,"VideoRemotePlay")
' load Layout with pane for VideoPlay
MainForm.RootPane.LoadLayout("Layout1")
' create layout for node by code
NodeLocalPlay=StreamSetup.LoadLayoput(BaseLocalVideo,"NodeLocalPlay")
NodeRemotePlay=StreamSetup.LoadLayoput(BaseRemoteVideo,"NodeRemotePlay")
' Hook VideoPlay to node
StreamSetup.HookPlayer(NodeLocalPlay,VideoLocalPlay.Player)
StreamSetup.HookPlayer(NodeRemotePlay,VideoRemotePlay.Player)
MainForm.Show
' load config - Host and degree rotate
If File.Exists(File.DirData("videostream"),"config.ini") Then
Dim M As Map = File.ReadMap(File.DirData("videostream"),"config.ini")
TextRemote.Text=M.Get("Host")
CheckBoxRotate.Checked=M.Get("r180")
End If
LocalIP=LocalSocket.GetMyIP
MainForm.Title="Host: " & LocalIP
End Sub
private Sub MainForm_CloseRequest (EventData As Event)
Log("We are closing the mainform")
VideoStream.stop
VideoStream.release
VideoRemotePlay.Stop
VideoRemotePlay.release
VideoLocalPlay.Stop
VideoLocalPlay.release
End Sub
private Sub ButtonSender_Click
Log("Start sender")
LabelInfo.Text="STARTING"
VideoStream.StreamCam(LocalIP,"prova.mp4",8554,180) ' for Internal Cam
'VideoStream.StreamDesktop(LocalIP,"prova.mp4",8554) ' For Desktop
End Sub
Private Sub ButtonRiceve_Click
Log("Start connect")
LabelInfo.Text="Connect"
If VideoRemotePlay.IsPlaying Then VideoRemotePlay.Stop
VideoRemotePlay.Play($"rtsp://${TextRemote.Text.Trim}:8554/prova.mp4"$)
VideoRemotePlay.SetVolume(100)
End Sub
Private Sub VideoStream_ReadyToSend
Log("Start to send")
If VideoLocalPlay.IsPlaying Then VideoLocalPlay.Stop
VideoLocalPlay.Play($"rtsp://${LocalIP}:8554/prova.mp4"$)
VideoLocalPlay.SetVolume(0)
End Sub
Private Sub VideoStream_Finished
Log("finished send")
End Sub
' --- Send straming
private Sub VideoStream_ReadyToPlay
Log("Video is ready to send")
End Sub
Private Sub VideoStream_Error
Log("error to send")
End Sub
Private Sub VideoRemotePlay_Finished
Log("finished play")
End Sub
' --- remote
Private Sub VideoRemotePlay_ReadyToPlay
Log("Video is ready to play")
NodeRemotePlay.PrefWidth=BaseRemoteVideo.PrefWidth
NodeRemotePlay.PrefHeight=BaseRemoteVideo.PrefHeight
End Sub
Private Sub VideoRemotePlay_Error
Log("Error to play")
End Sub
' --- Local
Private Sub VideoLocalPlay_Finished
Log("finished local play")
End Sub
Private Sub VideoLocalPlay_ReadyToPlay
Log("Video is ready to local play")
NodeLocalPlay.PrefWidth=BaseLocalVideo.PrefWidth
NodeLocalPlay.PrefHeight=BaseLocalVideo.PrefHeight
Log(VideoLocalPlay.Volume)
End Sub
Private Sub VideoLocalPlay_Error
Log("Error to local play")
End Sub
'VideoStream.StreamCam(LocalIP,"test.mp4",8554,180) ' share cam in streaming
'VideoStream.StreamDesktop(LocalIP,"test.mp4",8554) ' share desktop in streaming
VideoStream.SaveDesktop("C:\video.flv")
It is not highlighted enough that you are calling Jude, as you only write her name in that label.
What are the advantages of creating an MQTT server instead of one based on websockets?I have created an MQTT server to manage connections and user authentication
View attachment 133644
This is only a draft, as LucaMS rightly noted, other graphical improvements need to be made. But I will not post further progress
The next step but for my delight will be to do screen sharing, a SupremoAlternative ... (this idea is perhaps not original ? )
I agree, I hope that as soon as the project completes it makes the source availableWhat are the advantages of creating an MQTT server instead of one based on websockets?
It's a bit annoying to see your progress... without being able to have the source code (right @Xfood? ? )
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?