RootEncoder-iOS icon indicating copy to clipboard operation
RootEncoder-iOS copied to clipboard

RTSP / removed somwhow resulting Connection refused] OPTIONS rtsp://192.168.0.15:8554app/stream RTSP/1.0

Open rsemihkoca opened this issue 1 year ago • 4 comments

In rtsp cases

Starting stream with URL: rtsp://192.168.0.15:8554/app/stream waiting for sps and pps 2025-01-07 00:10:49.139792+0300 faceblurcamera[12764:837496] [connection] nw_socket_handle_socket_event [C1:1] Socket SO_ERROR [61: Connection refused] OPTIONS rtsp://192.168.0.15:8554app/stream RTSP/1.0

CSeq: 0

connection failed: The operation couldn't be completed. (RootEncoder.IOException error 0.) TEARDOWN rtsp://192.168.0.15:8554app/stream RTSP/1.0

CSeq: 1

As you can see, the "/" before app has somehow disappeared. I don't quite understand why it does this

targetting ios 15, iphone 14 pro but i think with 6s you can reproduce

private func initializeCamera(metalView: MetalView) {
    // Initialize camera with the metal view and connect checker
    camera = RtspCamera(view: metalView, connectChecker: self)
    
    // Set video codec before preparing video
    camera?.setVideoCodec(codec: .H264)
    
    // Configure video settings
    let width = 640  // Lower resolution for testing
    let height = 480
    let fps = 30
    let bitrate = 128 * 1000
    
    if camera?.prepareVideo(width: width, height: height, fps: fps, bitrate: bitrate) == true {
        camera?.startPreview()
        videoConfigReady = true
    } else {
        error = "Failed to initialize camera"
    }
    isInitializing = false

rsemihkoca avatar Jan 06 '25 21:01 rsemihkoca

i have git cloned repo and imported local package

2025-01-07 00:29:20.118121+0300 faceblurcamera[12897:845910] Metal API Validation Enabled prepare video success Starting stream with URL: rtsp://192.168.0.15:8554/app/stream waiting for sps and pps 2025-01-07 00:29:23.333890+0300 faceblurcamera[12897:845928] [connection] nw_socket_handle_socket_event [C1:1] Socket SO_ERROR [61: Connection refused] OPTIONS rtsp://192.168.0.15:8554/app/stream RTSP/1.0

CSeq: 0

now it is taking as it needs to be but connection still refused

rsemihkoca avatar Jan 06 '25 21:01 rsemihkoca

Hello,

Thank you for the report. Which server are you using? I want reproduce your case

pedroSG94 avatar Jan 08 '25 10:01 pedroSG94

I thought using only rootEncoder was enough to stream rtsp, so I was entering localhost or the device's own IP address. In addition, it was necessary to start the rtsp stream server. I understand correctly that the IP and port requested from us in the rootencoder belong to the rtsp server, right?

rsemihkoca avatar Jan 08 '25 10:01 rsemihkoca

Yes, you are right. You need a media server and use the IP and port of the server

pedroSG94 avatar Jan 10 '25 08:01 pedroSG94