mediamtx/internal/protocols/rtmp/message
hyesung913 cb16f68432
rtmp: improve control message compatibility with non-standard cameras (#4909)
* feat: improve RTMP control message compatibility with non-standard cameras

- Add flexible chunk stream ID validation for control messages
- Support common non-standard chunk stream IDs (2,3,4,5,6) used by various cameras
- Maintain backward compatibility with standard RTMP clients
- Fix connection issues with PTZ cameras using chunk stream ID 4

This resolves compatibility issues with IP cameras that don't strictly follow
RTMP spec while maintaining full support for standard RTMP implementations.
Previously, cameras using non-standard chunk stream IDs would fail with
'unexpected chunk stream ID' errors. Now MediaMTX provides nginx-rtmp level
compatibility with real-world camera implementations."

* add tests

* entirely remove control chunk stream ID validation

---------

Co-authored-by: Hyesung.Kim <hyesung.kim@xcath.com>
Co-authored-by: aler9 <46489434+aler9@users.noreply.github.com>
2025-09-03 15:11:32 +02:00
..
testdata/fuzz/FuzzReader rtmp: support additional Enhanced-RTMP features (#3685) (#4088) 2025-01-02 12:44:01 +01:00
message.go rtmp: support additional Enhanced-RTMP features (#3685) (#4088) 2025-01-02 12:44:01 +01:00
msg_acknowledge.go rtmp: improve control message compatibility with non-standard cameras (#4909) 2025-09-03 15:11:32 +02:00
msg_audio.go rtmp: support additional Enhanced-RTMP features (#3685) (#4088) 2025-01-02 12:44:01 +01:00
msg_audio_ex_coded_frames.go rtmp: support additional Enhanced-RTMP features (#3685) (#4088) 2025-01-02 12:44:01 +01:00
msg_audio_ex_multichannel_config.go rtmp: support additional Enhanced-RTMP features (#3685) (#4088) 2025-01-02 12:44:01 +01:00
msg_audio_ex_multitrack.go rtmp: support additional Enhanced-RTMP features (#3685) (#4088) 2025-01-02 12:44:01 +01:00
msg_audio_ex_sequence_end.go rtmp: support additional Enhanced-RTMP features (#3685) (#4088) 2025-01-02 12:44:01 +01:00
msg_audio_ex_sequence_start.go switch to mediacommon/v2 (#4259) 2025-02-17 14:54:58 +01:00
msg_command_amf0.go rtmp: support additional Enhanced-RTMP features (#3685) (#4088) 2025-01-02 12:44:01 +01:00
msg_command_amf0_test.go rtmp: support additional Enhanced-RTMP features (#3685) (#4088) 2025-01-02 12:44:01 +01:00
msg_data_amf0.go rtmp: support additional Enhanced-RTMP features (#3685) (#4088) 2025-01-02 12:44:01 +01:00
msg_set_chunk_size.go rtmp: improve control message compatibility with non-standard cameras (#4909) 2025-09-03 15:11:32 +02:00
msg_set_peer_bandwidth.go rtmp: improve control message compatibility with non-standard cameras (#4909) 2025-09-03 15:11:32 +02:00
msg_set_window_ack_size.go rtmp: improve control message compatibility with non-standard cameras (#4909) 2025-09-03 15:11:32 +02:00
msg_user_control_ping_request.go rtmp: improve control message compatibility with non-standard cameras (#4909) 2025-09-03 15:11:32 +02:00
msg_user_control_ping_response.go rtmp: improve control message compatibility with non-standard cameras (#4909) 2025-09-03 15:11:32 +02:00
msg_user_control_set_buffer_length.go rtmp: improve control message compatibility with non-standard cameras (#4909) 2025-09-03 15:11:32 +02:00
msg_user_control_stream_begin.go rtmp: improve control message compatibility with non-standard cameras (#4909) 2025-09-03 15:11:32 +02:00
msg_user_control_stream_dry.go rtmp: improve control message compatibility with non-standard cameras (#4909) 2025-09-03 15:11:32 +02:00
msg_user_control_stream_eof.go rtmp: improve control message compatibility with non-standard cameras (#4909) 2025-09-03 15:11:32 +02:00
msg_user_control_stream_is_recorded.go rtmp: improve control message compatibility with non-standard cameras (#4909) 2025-09-03 15:11:32 +02:00
msg_video.go rtmp: support additional Enhanced-RTMP features (#3685) (#4088) 2025-01-02 12:44:01 +01:00
msg_video_ex_coded_frames.go fix documentation (#4110) 2025-01-05 12:02:04 +01:00
msg_video_ex_frames_x.go rtmp: support additional Enhanced-RTMP features (#3685) (#4088) 2025-01-02 12:44:01 +01:00
msg_video_ex_metadata.go rtmp: support additional Enhanced-RTMP features (#3685) (#4088) 2025-01-02 12:44:01 +01:00
msg_video_ex_multitrack.go rtmp: support additional Enhanced-RTMP features (#3685) (#4088) 2025-01-02 12:44:01 +01:00
msg_video_ex_sequence_end.go rtmp: support additional Enhanced-RTMP features (#3685) (#4088) 2025-01-02 12:44:01 +01:00
msg_video_ex_sequence_start.go rtmp: support additional Enhanced-RTMP features (#3685) (#4088) 2025-01-02 12:44:01 +01:00
opus_id_header.go mpegts, srt: support MPEG-4 Audio LATM tracks (#4403) (#4759) 2025-07-21 10:02:40 +02:00
reader.go update linter settings (#4790) 2025-07-26 16:44:32 +02:00
reader_test.go rtmp: improve control message compatibility with non-standard cameras (#4909) 2025-09-03 15:11:32 +02:00
readwriter.go update linter settings (#4790) 2025-07-26 16:44:32 +02:00
readwriter_test.go move protocol-related code into internal/protocols (#2572) 2023-10-26 21:46:18 +02:00
writer.go rtmp: add new AMF0 encoder and encoder (#3069) 2024-02-24 19:11:42 +01:00
writer_test.go move protocol-related code into internal/protocols (#2572) 2023-10-26 21:46:18 +02:00