-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
RTMP publishing fails with Dahua cameras #769
Comments
Hello, the problem here is that the camera sends a metadata packet that doesn't contain the video codec ID, therefore the server doesn't detect its video track. What is the model of the camera? |
It's been a while since I ran this test, but I'm pretty sure it was a Dahua camera |
This is linked to #386 - the RTMP metadata parser must be improved to support these non-standard clients. |
I developed a patch to fix this issue; please try this nightly release and let me know if it works: |
Got the Dahua camera back out and it's now outputting the following:
|
Hello, data from your network dump was copy-pasted into unit tests, therefore something must have changed. Please provided another network dump. |
I've attached a capture from the Dahua camera that is showing this issue when connecting. |
Thanks for the pcap, i've developed another fix but this time i'm not merging it into the main branch until we're sure that it works. Please try the attached release (or alternatively the "dahua" branch) and let me know if it works: |
This is the output when running with this commit:
|
Hi, EOF means that the camera closed the connection. Are you sure that the camera is publishing something? It switched from sending this metadata (no_audio.log):
to sending this metadata (dahua.log):
That's why i'm asking. Furthermore, logs with I know that this is taking time but there is no way to fix communication with a device unless... owning the device. |
The camera streams video when I connect it to an RTMP input in MediaLive, so it can send video and I believe it is doing so (or at least trying to do so) when I point it as |
Hello, the RTMP metadata parsing mechanism was updated once again to support DJI drones - please try this nightly release, it may solve this issue too: |
Still disconnects with this output:
|
I tried that release and the most recent commits, but still have the same error. |
what's the error reported in the logs when using the release linked in the previous post? null metadatas should be supported, so the error message shouldn't be "invalid metadata". |
It's the same output as before:
|
I just pulled the latest changes and tried again and this is the line that's returning the error: |
Hello, please be aware that i'm posting releases compiled from the dahua branch, therefore the right line is this one: Anyway i don't have enough data to solve the issue. If i had the camera this would be solved in 5 mins, but since this is not the case, i have to rely on your dumps, but i already inserted the content of your dumps into unit tests, therefore i don't know what else to do. If you still want to solve this issue, please provide another network dump. |
Oh sorry, I didn't realize that it was a branch. I just saw the version number in the builds and assumed it was from there. I did a build from the branch and this is now the output that I see:
|
After the camera sends the metadata with "null" payload, it closes the connection to the server with no reason. I don't know what else to do. |
Thanks for the effort. I'll take a look at the branch and see if I can get it working. |
If you're a little familiar with Golang, in my opinion you have all the means to get this issue fixed. You can then send a pull request, and it will be merged. |
Hi @aler9 thanks for the effort, we really appreciate your work... Please any one can update status of Dahua Rtmp push to RTSPSimpleServer? I can help maybe with YouTube handshake network dump on a working escenario. |
I'm also having issues with Dahua camera and it's 100% reproducuble. What info would be useful? I've enabled a debug logging, but it's not very detailed:
|
Hello @rudyryk , open a dedicated issue and provide a network dump of communication between the camera and the server. Instructions are shown when you open an issue. This issue is too old and may be unrelated from your specific problen. |
@aler9 I see, thank you! I'll try to push RTMP from my local Dahua camera. My guess is that it's some specific/incomplete protocol implementation on Dahua cameras. They work with Nginx-RTMP but when pushing to MediaMTX we get only audio track, while video track seems to be dropped by the server.
Looks like this is exactly what's happening. Could you also please check email? |
@aler9 Is it possible btw to get some dump or details on actually received data on the server side from MediaMTX? It's not always easy to get physical access to devices. |
@rudyryk yes, open an issue and attach a network dump. The network dump contains exactly what the server sees, and i will put it into a camera simulator in order to replicate the issue. |
This issue is being locked automatically because it has been closed for more than 6 months. |
Which version are you using?
v0.17.13
Which operating system are you using?
Describe the issue
Sending an RTMP stream from a camera with no audio and it's failing with this error:
Describe how to replicate the issue
Did you attach a network dump?
yes (made the extension
.log
because it was on the list of approved extension and seemed like the "best" option)no_audio.log
The text was updated successfully, but these errors were encountered: