Closed EverlyScott closed 8 months ago
This seems like an issue with ffmpeg. Modifying the node-rtsp-stream code to console log the args and then running ffmpeg with those args produces the same issue.
Hey, did you find a solution for this? I can get my app to stream a video
I think I did but I don't remember. I might still have the source code for the app I can check in a bit.
@AlejandroAguilar99 This is my function for creating the stream. It's a little different than the one I provided when I made the issue so it could be something that fixed it, I'm not sure...
function createStream(url, port, fps = 25) {
var options
if (platform.isWin()) {
options = {
name: "Camera Viewer",
streamUrl: url,
wsPort: port,
ffmpegPath: `${__dirname}\\..\\..\\bin\\ffmpeg.exe`,
ffmpegOptions: {
'-r': fps,
'-fflags': 'discardcorrupt'
}
}
} else if (platform.isMac()) {
options = {
name: "Camera Viewer",
streamUrl: url,
wsPort: port,
ffmpegPath: `${__dirname}/../../bin/ffmpeg-osx`,
ffmpegOptions: {
'-r': fps
}
}
} else if (platform.isLinux()) {
options = {
name: "Camera Viewer",
streamUrl: url,
wsPort: port,
ffmpegPath: `${__dirname}/../../bin/ffmpeg-lin`,
ffmpegOptions: {
'-r': fps
}
}
} else if (platform.isOther()) {
console.log('YOUR PLATFORM IS NOT SUPPORTED!')
process.exit()
}
const camera = new Stream(options)
}
@EverlyScott thanks a lot man, i'll check it out
Yeah of course
I'm gonna close this bc it's solved for me at least
ffmpegPath:
${__dirname}/../../bin/ffmpeg-lin,
@EverlyScott Could you send me this library ? I get problem when run on Ubuntu 20.04. It's works on Windows
i don't actually have the library anymore but from what i can remember it was just downloaded from the ffmpeg website
I'm trying to allow my app to view an rtsp stream through my public ip instead of locally. My current code is:
and when running that, I get the following error:
When entering the same URL into VLC Player on the same computer, it plays just fine, also using the local ip address (rtsp://192.168.1.51/cam1/mpeg4) works fine