Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rsemihkoca opened this issue Jan 6, 2025 · 4 comments

Comments

@rsemihkoca
Copy link

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
Copy link
Author

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

@pedroSG94
Copy link
Owner

Hello,

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

@rsemihkoca
Copy link
Author

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?

@pedroSG94
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants