Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTSP error: 404 Not Found after playing about 25seconeds #170

Open
ufoozhenghao opened this issue Jan 20, 2021 · 4 comments
Open

RTSP error: 404 Not Found after playing about 25seconeds #170

ufoozhenghao opened this issue Jan 20, 2021 · 4 comments

Comments

@ufoozhenghao
Copy link

using HIKVISON NVR

1
2
3

in the 3ed picture, when console.log shows Media description for payload type: 112 not provided in 3 times and follow with [client:rtsp] OPTIONS * RTSP/1.0 CSeq: 6 User-Agent: SFRtsp 0.3 Authorization: Basic YWRtaW46YWRtaW4xMjM0NTY=
and finally the alert shows up "RTSP error: 404 Not Found"

@kromalee
Copy link

可能是因为
keepAlive机制, 目前源码配置的是 keepaliveTime = 30000
部分海康DVR RTSPserver 会认为客户端发送的保活报文是垃圾数据,并停止RTSP拉流
可以通过把 源码这个参数修改成1分钟,2分钟,看直播是否会1分钟,2分钟卡住来验证是否这个原因

it may be because
keepAlive mechanism, the current source configuration is keepaliveTime = 30000
Some Hikvision DVR RTSP servers will consider the keep-alive messages sent by the client as junk data and stop RTSP streaming
You can verify whether this is the reason by modifying the parameter of the source code to 1 minute, 2 minutes, and see if the live broadcast will be stuck for 1 minute and 2 minutes.

@ufoozhenghao
Copy link
Author

ufoozhenghao commented Feb 20, 2022 via email

@asferrer
Copy link

asferrer commented Mar 8, 2024

I'm currently facing a challenge with integrating an RTSP stream from a Hikvision DVR into my WebApp using Streamedian, and I've noticed that you, @kromalee, have previously solved a similar issue. While I can successfully view the stream using VLC, indicating that the stream setup is correct, I'm encountering difficulties when trying to display it in my WebApp through Streamedian.

Here's the RTSP link format I'm using to access the camera stream:

   rtsp://{dvr_user}:{dvr_password}@{dvr_ip}:{dvr_port}/Streaming/Channels/{camera_id}{camera_channel} 

Captura de pantalla 2024-03-08 150151

The credentials and link work flawlessly on VLC, but the integration with Streamedian in my WebApp doesn't seem to function as expected. I'm beginning to suspect the problem might be with how Streamedian processes the RTSP stream or potentially a specific configuration required by the Hikvision DVR to be compatible with web streaming solutions.

Given your experience with Hikvision DVRs and possibly Streamedian, @kromalee, I was hoping you might share some insights or guidance on how to tackle this issue. Any advice or recommendations would be immensely appreciated.

Thank you very much for considering my request for assistance!

@ufoozhenghao
Copy link
Author

I'm currently facing a challenge with integrating an RTSP stream from a Hikvision DVR into my WebApp using Streamedian, and I've noticed that you, @kromalee, have previously solved a similar issue. While I can successfully view the stream using VLC, indicating that the stream setup is correct, I'm encountering difficulties when trying to display it in my WebApp through Streamedian.

Here's the RTSP link format I'm using to access the camera stream:

   rtsp://{dvr_user}:{dvr_password}@{dvr_ip}:{dvr_port}/Streaming/Channels/{camera_id}{camera_channel} 

Captura de pantalla 2024-03-08 150151

The credentials and link work flawlessly on VLC, but the integration with Streamedian in my WebApp doesn't seem to function as expected. I'm beginning to suspect the problem might be with how Streamedian processes the RTSP stream or potentially a specific configuration required by the Hikvision DVR to be compatible with web streaming solutions.

Given your experience with Hikvision DVRs and possibly Streamedian, @kromalee, I was hoping you might share some insights or guidance on how to tackle this issue. Any advice or recommendations would be immensely appreciated.

Thank you very much for considering my request for assistance!

forget Streamedian, Its not free, and not easy to use.
Your link is correct. My link is rtsp://admin:adminXXXXXX@192.168.2.47:554/Streaming/Channels/101
If you want view stream on Internet, here's my solution:

   1. use [[easydarwin](https://github.com/EasyDarwin/EasyDarwin)](https://github.com/EasyDarwin/EasyDarwin) to distribute data(if there are many people view the stream) 
   2. use ffmpeg push the stream to easydarwin
            `nohup ffmpeg -i rtsp://admin:admin123456@192.168.2.47:554/Streaming/Channels/101?transportmode=unicast -rtsp_transport tcp -f rtsp rtsp://127.0.0.1:554/01 &`
            or I'd like use `pm2` to serve the process
   3. use node to [[transfer rtsp to flv ](https://github.com/ufoozhenghao/rtsp-to-flv-node)](https://github.com/ufoozhenghao/rtsp-to-flv-node)
   4.  use [[flv.js](https://github.com/bilibili/flv.js)](https://github.com/bilibili/flv.js) to play stream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants