Commit Graph

55 Commits

Author SHA1 Message Date
dependabot[bot]
253df883c2 build(deps): bump github.com/bluenviron/mediacommon/v2 (#4990)
Bumps [github.com/bluenviron/mediacommon/v2](https://github.com/bluenviron/mediacommon) from 2.4.2 to 2.4.3.
- [Commits](https://github.com/bluenviron/mediacommon/compare/v2.4.2...v2.4.3)

---
updated-dependencies:
- dependency-name: github.com/bluenviron/mediacommon/v2
  dependency-version: 2.4.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-18 13:10:42 +02:00
Alessandro Ros
e3b8af8933 switch to gortsplib/v5 (#4978) 2025-09-16 13:10:34 +02:00
dependabot[bot]
ebd9eb6665 build(deps): bump github.com/bluenviron/mediacommon/v2 (#4975)
Bumps [github.com/bluenviron/mediacommon/v2](https://github.com/bluenviron/mediacommon) from 2.4.2-0.20250909112826-017d0bbe41db to 2.4.2.
- [Commits](https://github.com/bluenviron/mediacommon/commits/v2.4.2)

---
updated-dependencies:
- dependency-name: github.com/bluenviron/mediacommon/v2
  dependency-version: 2.4.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-15 22:56:28 +02:00
Alessandro Ros
1b8897d30d rtmp: move implementation to gortmplib (#4968) 2025-09-13 11:50:36 +02:00
Alessandro Ros
57021467e9 rename formatprocessor into codecprocessor (#4962) 2025-09-12 10:24:11 +02:00
Alessandro Ros
9318107779 rtmp: support additional enhanced RTMP features (#4168) (#4321) (#4954)
* support reading AV1, VP9, H265, Opus, AC-3, G711, LPCM
* support reading multiple video or audio tracks at once
2025-09-11 23:18:46 +02:00
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
alex9long
262ce82d58 refactor: use the built-in max/min to simplify the code (#4867)
Signed-off-by: alex9long <alex9long@outlook.com>
2025-08-14 10:32:24 +02:00
Alessandro Ros
d423a71aaa update linter settings (#4790) 2025-07-26 16:44:32 +02:00
Alessandro Ros
cc27cf6563 mpegts, srt: support MPEG-4 Audio LATM tracks (#4403) (#4759) 2025-07-21 10:02:40 +02:00
dependabot[bot]
d0a97e47ff build(deps): bump github.com/bluenviron/gohlslib/v2 from 2.2.1 to 2.2.2 (#4763)
Bumps [github.com/bluenviron/gohlslib/v2](https://github.com/bluenviron/gohlslib) from 2.2.1 to 2.2.2.
- [Commits](https://github.com/bluenviron/gohlslib/compare/v2.2.1...v2.2.2)

---
updated-dependencies:
- dependency-name: github.com/bluenviron/gohlslib/v2
  dependency-version: 2.2.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-21 09:55:10 +02:00
Alessandro Ros
82956a4abb rtmp: fix compatibility with GStreamer rtmp2src / rtmp2sink (#1433) (#4718) 2025-07-12 14:17:04 +02:00
Alessandro Ros
1083eea307 make RTP packet size compatible with RTSP/SRTP (#4692)
when RTSP encryption is enabled, maximum RTP packet size is slightly
decreased to make room for SRTP.
2025-07-05 15:42:58 +02:00
Alessandro Ros
c21c969a8c revert #4583 (#4606)
This reverts commit 500d18b6c6.
2025-06-03 20:27:53 +02:00
Alessandro Ros
500d18b6c6 rtmp: fix timeout when publishing with GLive T80 (#4002) (#4583) 2025-06-03 18:26:00 +02:00
Alessandro Ros
fad64a87bd bump golangci-lint (#4550) 2025-05-23 15:10:21 +02:00
Alessandro Ros
1b9dfbd367 rtmp: support connecting to sources that require standard credentials (#4530) 2025-05-15 14:23:03 +02:00
Alessandro Ros
3b3b898358 fix error message (#4522) 2025-05-12 22:10:13 +02:00
Alessandro Ros
a85d8f1391 rtmp: fix connect command when reading (#4512)
when reading, the "connect" command should not contain fpad,
capabilities, audioCodecs, videoCodecs, videoFunction.
2025-05-10 15:26:48 +02:00
Alessandro Ros
15fff95246 ensure unmarshaled entities can be marshaled back (#4484) 2025-05-04 11:34:05 +02:00
Alessandro Ros
986e270862 count and log all discarded frames, decode errors, lost packets (#4363)
Discarded frames, decode errors and lost packets were logged
individually, then there was a mechanism that prevented more than 1 log
entry per second from being printed, resulting in inaccurate reports.

Now discarded frames, decode errors and lost packets are accurately
counted, and their count is printed once every second.
2025-03-25 21:59:58 +01:00
Alessandro Ros
416ac1357e bump mediacommon and gortsplib (#4364) 2025-03-24 17:25:18 +01:00
Alessandro Ros
b329c4bbe8 replace New* with Initialize() (#4345) 2025-03-16 15:34:53 +01:00
Alessandro Ros
244da930a1 switch to mediacommon/v2 (#4259) 2025-02-17 14:54:58 +01:00
dependabot[bot]
b66efd66da build(deps): bump github.com/bluenviron/gortsplib/v4 (#4236)
Bumps [github.com/bluenviron/gortsplib/v4](https://github.com/bluenviron/gortsplib) from 4.12.2 to 4.12.3.
- [Commits](https://github.com/bluenviron/gortsplib/compare/v4.12.2...v4.12.3)

---
updated-dependencies:
- dependency-name: github.com/bluenviron/gortsplib/v4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-07 20:19:14 +01:00
Alessandro Ros
5bb751a4c8 hls: fix reading AV1 from OBS+WHIP (#3886) (#4177) 2025-01-19 18:40:18 +01:00
Alessandro Ros
070ea5fc19 rtmp: fix compatibility with DJI Osmo Action 4 (#3802) (#4116) 2025-01-07 17:36:31 +01:00
Alessandro Ros
6d7d0e6e21 fix documentation (#4110) 2025-01-05 12:02:04 +01:00
Alessandro Ros
8cbbbc05c3 rtmp: support additional Enhanced-RTMP features (#3685) (#4088)
new features:
* support publishing Opus and AC-3 tracks
* support publishing more than 2 tracks. This is compatible with OBS multitrack video and OBS VOD audio track
2025-01-02 12:44:01 +01:00
Alessandro Ros
770d72b638 rtmp: support Extended Metadata Frames (#4006) (#4014) (#4018) 2024-12-04 23:29:16 +01:00
Alessandro Ros
23002d9f5f route original timestamps without converting to durations (#3839)
This improves timestamp precision.
2024-10-07 17:59:32 +02:00
Alessandro Ros
2586782031 fix race condition in tests (#3834) 2024-10-05 21:54:11 +02:00
Alessandro Ros
4c3ac34425 fix memory leak in case of errors during initialization of a reader (#3831) 2024-10-05 00:49:44 +02:00
Alessandro Ros
658848f8c8 log track ID when skipping tracks (#3798) 2024-09-26 14:42:48 +02:00
Alessandro Ros
783fede2cb remove debug lines (#3771) 2024-09-15 22:52:55 +02:00
Alessandro Ros
471019f606 warn users about skipped tracks when reading or publishing (#3753) 2024-09-15 19:28:05 +02:00
Alessandro Ros
e6653857aa rtmp: support ingesting AV1, VP9, H265, MP3, PCM from other servers (#3751) 2024-09-09 12:26:35 +02:00
Alessandro Ros
c9a938a501 improve fuzz tests (#3596) 2024-08-01 17:01:56 +02:00
Alessandro Ros
afec0cd86c rtmp: fix publishing from DJI FlightHub Sync (#3301) (#3504) 2024-07-01 16:03:12 +02:00
Jacob Su
3a2594d610 rtmp: fix error when publishing AAC audio tracks (#3414)
* fix single aac file rtmp publish error.

* add tests

---------

Co-authored-by: aler9 <46489434+aler9@users.noreply.github.com>
2024-06-11 13:26:45 +02:00
xjr20042
8b51ca9c8b rtmp: fix error when reading metadata (#3302)
some rtmp client will send set chunk size after publish stream
2024-04-29 21:49:38 +02:00
Alessandro Ros
1204f76eb7 update golangci-lint (#3300) 2024-04-28 18:20:08 +02:00
Pedro Sánchez
8aa26d6fb3 rtmp: fix streaming errors by handling AMF0 strict arrays (#3188) (#3189)
* add amf0 strict array decode

* add amf0 long string decode

* support amf0 types undefined, unsupported, xmldocument and date

* fix error and add tests

* modify tests to follow original way to test

* do not skip markerUnsupported / markerUndefined

* implement StrictArray marshaling; remove handling of long strings, XML documents, date

---------

Co-authored-by: aler9 <46489434+aler9@users.noreply.github.com>
2024-04-12 16:13:57 +02:00
Alessandro Ros
a50642c669 improve record tests (#3216) 2024-04-09 09:36:38 +02:00
Alessandro Ros
c7dbb951f3 update golangci-lint (#3149) 2024-03-19 12:53:26 +01:00
Alessandro Ros
b6db3121b5 rtsp: add random value to timestamp of tracks from other protocols (#3071) 2024-02-26 00:41:05 +01:00
Alessandro Ros
da7c5744b1 rtmp: add new AMF0 encoder and encoder (#3069)
This improves performance, security and removes a dependency.
2024-02-24 19:11:42 +01:00
Alessandro Ros
f8a56aae91 rtmp: simplify Audio message structure (#2924) 2024-01-21 16:29:13 +01:00
Alessandro Ros
20bb9b90cd support G711 tracks with multiple channels and custom sample rates (#2891) 2024-01-13 11:40:26 +01:00
Alessandro Ros
27975d8b67 rtmp: support publishing G711 and LPCM tracks (#2857) (#2884) 2024-01-07 17:02:22 +01:00