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

Unhandled promise rejection (rejection id: 1): Error: Mount does not exist #13

Open
anuranBarman opened this issue Oct 25, 2019 · 8 comments

Comments

@anuranBarman
Copy link

I am trying to use this in NodeJS application. But getting the following error when trying to play the stream from VLC. the ffmpeg command also mentioned in the README
( ffmpeg -i demo.mp4 -c:v copy -f rtsp rtsp://127.0.0.1:5554/stream1 ) is executing but stopping after showing the metadata options. The error I am getting is below:

(node:87706) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Mount does not exist
(node:87706) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js proc
ess with a non-zero exit code.
@chriswiggins
Copy link
Owner

Hmmmm. Strange @anuranBarman!

Can you show your JS source so I can have a look?

@anuranBarman
Copy link
Author

I am justing using the demo source you have provided:

const RtspServer = require('rtsp-streaming-server').default;

const server = new RtspServer({
    serverPort: 5554,
    clientPort: 6554,
    rtpPortStart: 10000,
    rtpPortCount: 10000
});

server.start().then(() => {
    console.log('server is running');
}).catch((err) => {
    console.log(err);
})

@Gronis
Copy link

Gronis commented Nov 27, 2019

I have the same issue. Also using javascript. I push the video stream with gstreamer using this command:

gst-launch-1.0 videotestsrc ! queue ! x264enc ! rtspclientsink location=rtsp://127.0.0.1/stream1

I also use the example in README. Get the same error:

Unknown ClientServer request { method: 'ANNOUNCE', url: undefined }
(node:1) UnhandledPromiseRejectionWarning: Error: Mount does not exist
     at new ClientWrapper (/usr/src/app/node_modules/rtsp-streaming-server/build/lib/ClientWrapper.js:26:13)
     at ClientServer.setupRequest (/usr/src/app/node_modules/rtsp-streaming-server/build/lib/ClientServer.js:161:23)
     at processTicksAndRejections (internal/process/next_tick.js:81:5)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@Gronis
Copy link

Gronis commented Nov 27, 2019

It seems like the whole rtsp protocol is not implemented. The missing commands are ANNOUNCE, RECORD, GET_PARAMETER, SET_PARAMETER and REDIRECT.

From ClientServer.ts

    this.server = createServer((req: RtspRequest, res: RtspResponse) => {
      debug('%s:%s request: %s', req.socket.remoteAddress, req.socket.remotePort, req.method);
      switch (req.method) {
        case 'DESCRIBE':
          return this.describeRequest(req, res);
        case 'OPTIONS':
          return this.optionsRequest(req, res);
        case 'SETUP':
          return this.setupRequest(req, res);
        case 'PLAY':
          return this.playRequest(req, res);
        case 'TEARDOWN':
          return this.teardownRequest(req, res);
        default:
          console.error('Unknown ClientServer request', { method: req.method, url: req.url });
          res.statusCode = 501; // Not implemented
          return res.end();
      }
    });

See rtsp protocol

@chriswiggins
Copy link
Owner

@Gronis you’re looking at the wrong file. The ClientServer and PublishServer have different protocol support.

Based on your output, you’re sending your stream to the wrong port. Clients need to connect on the client port, and streams need to be published to the server port.

Your command needs to be:
gst-launch-1.0 videotestsrc ! queue ! x264enc ! rtspclientsink location=rtsp://127.0.0.1:5554/stream1

Take note of the port.

I’ll double check the example with Gstreamer myself this morning and get back to you

@chriswiggins
Copy link
Owner

@Gronis this is working for me - Can you please try with the correct port and let me know if you're still having issues?

@Gronis
Copy link

Gronis commented Nov 28, 2019

Yea, I finally got it working yesterday. I had the ports mixed up. But I also have other problems related to my environment. I think it's safe to say that this problem was me using incorrect ports.

@pglin66
Copy link

pglin66 commented Jan 6, 2024

ffmpeg -f avfoundation -i "1:0" -vcodec libx264 -r 25 -s 1280x720 -f rtsp rtsp://127.0.0.1:5554/test
Error: Mount does not exist

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

4 participants