bluenviron / mediamtx

Ready-to-use SRT / WebRTC / RTSP / RTMP / LL-HLS media server and media proxy that allows to read, publish, proxy, record and playback video and audio streams.
MIT License
12.19k stars 1.53k forks source link

Is impossible use this with OvenMediaEngine #813

Closed asterissco closed 2 years ago

asterissco commented 2 years ago

Which version are you using?

v0.12.11

Which operating system are you using?

Describe the issue

Not working with pull mode to rtsp-simple-server

Describe how to replicate the issue

  1. Download rtsp-simple-server in the same server and to publish rtsp channel
    
    paths:
    channel-1:
    source: rtsp://operador:password@camera:5540/streaming/channels/101
2. Download and configure OvenMediaEngine with the rtsp-simple-server
                    <Origins>
                            <Origin>
                                    <Location>/app/cam/</Location>
                                    <Pass>
                                            <Scheme>rtsp</Scheme>
                                            <Urls><Url>192.168.22.119:554/channel-1</Url></Urls>
                                            <!--                                            <Urls><Url>rtsp://operador:a012345.@router-smartcoast-radisson.qaisc.com:5540</Url></Urls> -->
                                    </Pass>
                            </Origin>                               
                    </Origins>
3. Create a client web
<script>
    // Initialize OvenPlayer
    const player = OvenPlayer.create('player_id', {
        sources: [
            {
                label: 'label_for_webrtc',
                // Set the type to 'webrtc'
                type: 'webrtc',
                // Set the file to WebRTC Signaling URL with OvenMediaEngine 
                file: 'ws://192.168.22.119:3333/app/cam'
            }
        ]
    });
</script>

## Did you attach the server logs?

OvenMediaEngine not connect to rtsp-simple-server

[2022-02-02 11:03:43.729] I [OvenMediaEngine:28565] Provider | application.cpp:46 | RTSPCProvider has created [#default#app] application [2022-02-02 11:03:57.789] I [SPRtcSig-T3333:28570] HttpServer | http_server.cpp:111 | Client(<ClientSocket: 0x7fdb480010f0, #21, Connected, TCP, Nonblocking, 192.168.22.105:46514>) is connected on :3333 [2022-02-02 11:03:57.789] I [SPRtcSig-T3333:28570] HttpServer | http_connection.cpp:198 | Client(<ClientSocket: 0x7fdb480010f0, #21, Connected, TCP, Nonblocking, 192.168.22.105:46514>) is requested uri: [ws://1 92.168.22.119:3333/app/cam] [2022-02-02 11:03:57.790] I [SPRtcSig-T3333:28570] Signalling | rtc_signalling_server.cpp:201 | New client is connected: <ClientSocket: 0x7fdb480010f0, #21, Connected, TCP, Nonblocking, 192.168.22.105:46514> [2022-02-02 11:03:57.794] E [SPRtcSig-T3333:28570] Orchestrator | orchestrator.cpp:478 | Could not find Origin for the stream: [#default#app/cam] [2022-02-02 11:03:57.794] E [SPRtcSig-T3333:28570] WebRTC Publisher | webrtc_publisher.cpp:440 | Cannot find stream (#default#app/cam) [2022-02-02 11:03:57.794] E [SPRtcSig-T3333:28570] Signalling | rtc_signalling_server.cpp:292 | Cannot find stream [#default#app/cam] [2022-02-02 11:03:57.794] I [SPRtcSig-T3333:28570] HttpServer | http_server.cpp:191 | Client(<ClientSocket: 0x7fdb480010f0, #21, Closed, TCP, Nonblocking, 192.168.22.105:46514>) has been disconnected from :333 3 (101) [2022-02-02 11:03:57.794] I [SPRtcSig-T3333:28570] Signalling | rtc_signalling_server.cpp:339 | Client is di

rtsp-simple-server

2022/02/02 11:03:45 DEB [path channel-1] [rtsp source] c->s GET_PARAMETER rtsp://router-smartcoast-radisson.qaisc.com:5540/streaming/channels/101/ RTSP/1.0 Authorization: Digest username="operador", realm="IP Camera(E9781)", nonce="7dbfe6febeead15b1f363c32afa2b178", uri="rtsp://router-smartcoast-radisson.qaisc.com:5540/streaming/channels/101/", response="b1eac7d86027eb34425d81a585e282c4" CSeq: 6 Session: 1430956056 User-Agent: gortsplib

2022/02/02 11:03:45 DEB [path channel-1] [rtsp source] s->c RTSP/1.0 0



Thanks!!
aler9 commented 2 years ago

Hello, the server works perfectly with OpenMediaEngine (which uses ffmpeg as backend), you have to remove the final slash, as clearly stated in the logs:

<Location>/app/cam</Location>
github-actions[bot] commented 1 year ago

This issue is being locked automatically because it has been closed for more than 6 months. Please open a new issue in case you encounter a similar problem.