[FFmpeg-trac] #11669(undetermined:new): Compatibility issue with RTMP push from Dahua cameras

FFmpeg trac at avcodec.org
Sat Jul 12 19:40:26 EEST 2025


#11669: Compatibility issue with RTMP push from Dahua cameras
-------------------------------------+-------------------------------------
             Reporter:  mms          |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:
  undetermined                       |  unspecified
             Keywords:  RTMP dahua   |               Blocked By:
             Blocking:               |  Reproduced by developer:  1
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:

 Dahua cameras do not send a videocodecid in the RTMP handshake metadata.
 FFMPEG in -listen mode currently fails to accept video streams from these
 cameras, it disconnects. This would be a workaround fix.

 When videocodecid is missing, one simple workaround is to check for width
 metadata which the camera does send and proceed as if the videocodecid was
 sent, assuming h264. This was done with this library, line 35 reader.go:

 https://github.com/bluenviron/mediamtx/pull/2298/commits/1d5994e75f3668e15405b16d0a217d84ffc613b8

 Perhaps a way for ffmpeg to take parameters and run in a non-strict mode,
 taking default values hints for codec from the command line would be best
 general solution.

 No ideal solution here, in the end it means millions of cameras out there
 (that will not be updated) are unusable with ffmpeg.


 How to reproduce:
 Run ffmpeg in -listen mode for rtmp connections and watch the connection
 drop right away when a Dahua camera connects.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/11669>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list