kyriesent / node-rtsp-stream

Stream any RTSP stream and output to websocket for consumption by jsmpeg (https://github.com/phoboslab/jsmpeg). HTML5 streaming video! Requires ffmpeg.
MIT License
451 stars 166 forks source link

-rtsp_transport tcp need to put before '-i' #53

Closed dmwhw closed 4 years ago

dmwhw commented 4 years ago

-rtsp_transport tcp need to put before '-i'.but options all put behind ‘-i’

labmorales commented 4 years ago

Submitted a fix with those parameters #54

kyriesent commented 4 years ago

I've merged #54. As far as you know, is there any downside to forcing TCP? Seems like there are very few streams that use UDP now for RTSP but I'm not sure. Any feedback is appreciated, thanks!

dmwhw commented 3 years ago

I've merged #54. As far as you know, is there any downside to forcing TCP? Seems like there are very few streams that use UDP now for RTSP but I'm not sure. Any feedback is appreciated, thanks!

i think it is a good idea to provides a option for user fill before "-i". as far as you know , there are other options ,such as "hwaccel " , which might be filled before "-i"; just like this...

` this.spawnOptions = [ ...this.preAdditionalFlagsBefore, "-i",

    "\""+this.url +"\"", //url
    '-f', 'mpegts', '-codec:v', 'mpeg1video',
    // additional ffmpeg options go here
    ...this.additionalFlags, '-'
]`