agsh / rtsp-ffmpeg

Node.js FFMpeg wrapper for streaming RTSP into MotionJPEG
MIT License
249 stars 84 forks source link

Dynamic links and network ploblems #10

Closed janserlemesf closed 7 years ago

janserlemesf commented 7 years ago

What is the best way for dynamic links? I tried to get the link as a parameter, but it did not work very well.

agsh commented 7 years ago

Do you assume dynamical change source of the stream when you change the input property?

janserlemesf commented 7 years ago

I made a change to display only one camera per requisition. I have many cameras and wanted to display them without registering them on server.js. Sorry for English, I'm Brazilian.

Seikon commented 7 years ago

So you can create a text file or json file with the cameras links, read and deserialize into cameras object to display the number of cameras you want.

janserlemesf commented 7 years ago

Thank you! It worked the dynamism. Now I have the following problem: After a while, the image blinks.

Seikon commented 7 years ago

Perfect! Where does the image blinks? In the client side? Are you using a HTML javascript UI enviroment to display the images? If yes, try to avoid img HTML tag. It causes problems in real time image update. I recomend you to use canvas for this. You can check this problem watching the javascript console . This weekend i wiil upload an example with canvas.

Seikon commented 7 years ago

Hi @janserlemesf I have uploaded a complete example of canvas ui interface that solves the problem of blink images. This method has only the inconvenient in images with alpha channel, but it doesn't mind because in ip cameras you don't need images with alpha channel. I have tested it with a comercial IP camera and the images are showing perfectly.

janserlemesf commented 7 years ago

Hi @Seikon! Thank you very much! I'll do some testing with your example.

janserlemesf commented 7 years ago

Hi @Seikon! When I have many cameras, some cameras stop responding or hang up. Do you know what can be happening? Thank you!

Seikon commented 7 years ago

If you have many cameras viewing at the same time, maybe you have problems with the capacity of your network. It depends of your network, but you could follow this tips for improve performance:

janserlemesf commented 7 years ago

Images should be colored. The camera resolution is already as low as 640x480, but the problem continues. Ex: Http://lemon360-multsoft.ddns.net:6147/?id=17

Seikon commented 7 years ago

I can't access to the url. Maybe you could upload a video by youtube or any other platform with the result

janserlemesf commented 7 years ago

Hi @Seikon ! I put in another served. It really was the network, now it worked perfectly. Thank you so much!

Seikon commented 7 years ago

Perfect! I'm gonna close this issue, please if you have another problem or contribution open new one.