chriswiggins / rtsp-streaming-server

Lightweight RTSP/RTP streaming media server written in Javascript
GNU General Public License v3.0
106 stars 21 forks source link

"connection failed: connection refused by peer" when trying to see the stream using vlc #29

Closed cidit closed 3 years ago

cidit commented 3 years ago

Im very new to this whole streaming thing so any help would be apreciated (ಥ _ ಥ)

issue

here is my code, copy pasted from the example

import RtspServer from 'rtsp-streaming-server'

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

async function run (): Promise<void> {
    try {
        await server.start();
        console.log("server started")
    } catch (e) {
        console.error(e);
    }
}

run();

here is the command i use to produce my stream. again, pretty much copy pasted from the example

ffmpeg -i bbb.mp4 -c:v copy -f rtsp rtsp://127.0.0.1:5554/stream1 (bbb is big buck bunny)

here is the error i get in the logs when trying to connect via using vlc

image

steps to reproduce

to see the error i presented above, you must enable the logs in VLC

Thank you for your time!

cidit commented 3 years ago

update! the command to produce the stream made the stream 30x faster for some reason. has been changed to ffmpeg -re -i bbb.mp4 -vcodec libx264 -f rtsp rtsp://127.0.0.1:5554/stream1

cidit commented 3 years ago

another update! tried the same setup without VLC (using ffplay like in the example) and it seems to work. the issue seems to be with vlc. since the problem is out of scope, i am closing the issue