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

Missed Packets #43

Closed chakya closed 4 years ago

chakya commented 5 years ago

Sometimes I received a lot of missing packets. My client browser will just turn grey. This happens a lot. I have set the -max_delay to 100000 but it is still happening. Any reason why this happened?

0|app      | [rtsp @ 0x56372214a9a0] RTP: missed 1 packets
0|app      | [hevc @ 0x563722180900] Could not find ref with POC 20
0|app      | [rtsp @ 0x56372214a9a0] max delay reached. need to consume packet
0|app      | [rtsp @ 0x56372214a9a0] RTP: missed 1 packets
0|app      | [hevc @ 0x563722180900] Could not find ref with POC 25
TKasperczyk commented 5 years ago

Add

"-rtsp_transport",
"tcp",
"-thread_queue_size",
"512"

to the beginning of this.spawnOptions options in node_modules/node-rtsp-stream/mpeg1muxer.js:23.

kyriesent commented 4 years ago

@TKasperczyk thank you!!

This should also be addressable using ffmpegOptions option on the library, in case modifying source isn't your thing.

shahgellani commented 1 year ago

Sometimes I received a lot of missing packets. My client browser will just turn grey. This happens a lot. I have set the -max_delay to 100000 but it is still happening. Any reason why this happened?

0|app      | [rtsp @ 0x56372214a9a0] RTP: missed 1 packets
0|app      | [hevc @ 0x563722180900] Could not find ref with POC 20
0|app      | [rtsp @ 0x56372214a9a0] max delay reached. need to consume packet
0|app      | [rtsp @ 0x56372214a9a0] RTP: missed 1 packets
0|app      | [hevc @ 0x563722180900] Could not find ref with POC 25

Thanks alot. It works