mediamtx/internal/protocols/rtmp
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
..
amf0 update linter settings (#4790) 2025-07-26 16:44:32 +02:00
bytecounter move protocol-related code into internal/protocols (#2572) 2023-10-26 21:46:18 +02:00
chunk refactor: use the built-in max/min to simplify the code (#4867) 2025-08-14 10:32:24 +02:00
h264conf move protocol-related code into internal/protocols (#2572) 2023-10-26 21:46:18 +02:00
handshake improve fuzz tests (#3596) 2024-08-01 17:01:56 +02:00
message rtmp: improve control message compatibility with non-standard cameras (#4909) 2025-09-03 15:11:32 +02:00
rawmessage refactor: use the built-in max/min to simplify the code (#4867) 2025-08-14 10:32:24 +02:00
client.go rtmp: support connecting to sources that require standard credentials (#4530) 2025-05-15 14:23:03 +02:00
client_test.go rtmp: support connecting to sources that require standard credentials (#4530) 2025-05-15 14:23:03 +02:00
conn.go rtmp: support connecting to sources that require standard credentials (#4530) 2025-05-15 14:23:03 +02:00
from_stream.go update linter settings (#4790) 2025-07-26 16:44:32 +02:00
from_stream_test.go make RTP packet size compatible with RTSP/SRTP (#4692) 2025-07-05 15:42:58 +02:00
rc4_readwriter.go move protocol-related code into internal/protocols (#2572) 2023-10-26 21:46:18 +02:00
reader.go update linter settings (#4790) 2025-07-26 16:44:32 +02:00
reader_test.go build(deps): bump github.com/bluenviron/gohlslib/v2 from 2.2.1 to 2.2.2 (#4763) 2025-07-21 09:55:10 +02:00
server_conn.go update linter settings (#4790) 2025-07-26 16:44:32 +02:00
server_conn_test.go update linter settings (#4790) 2025-07-26 16:44:32 +02:00
to_stream.go rtmp: support additional Enhanced-RTMP features (#3685) (#4088) 2025-01-02 12:44:01 +01:00
to_stream_test.go warn users about skipped tracks when reading or publishing (#3753) 2024-09-15 19:28:05 +02:00
writer.go update linter settings (#4790) 2025-07-26 16:44:32 +02:00
writer_test.go build(deps): bump github.com/bluenviron/gohlslib/v2 from 2.2.1 to 2.2.2 (#4763) 2025-07-21 09:55:10 +02:00