Releases: bluenviron/mediamtx
Releases · bluenviron/mediamtx
v1.7.0
New features
- playback: support serving streams in standard MP4 format (#3213). This provides an alternative stream format that offers greater compatibility with some players.
Fixes and improvements
General
- do not switch to legacy authentication system when readUser, readPass, publishUser, publishPass are present but are empty (#3113)
- playback: do not concatenate segments with different tracks (#3197)
- playback: fix concatenation of segments with multiple tracks (#3198). the duration of segments was computed erroneously, since it was taking. into consideration the last track only. Now the duration of a segment. corresponds to the maximum duration among all tracks.
- playback: decrease concatenation tolerance to 0.5 secs (#3199)
- playback: increase sequence number of fMP4 parts (#3200)
- playback: adjust speed to compensate discrepancies between NTP and DTS (#3202)
- playaback: use a fixed fMP4 part duration (#3203)
- playback: improve performance when reading big segments (#3209)
- playback: fix bug that messed up duration of last sample of each track (#3210)
- playback: support serving tracks with any time scale (#3211)
- record: use original timescale of track instead of 90khz (#3212)
- deprecate path.playback parameter (#3217). this has become useless after the introduction of the new. authentication system, that already allows to select which paths are. available for playback
- formats/fmp4: improve unmarshaler performance (bluenviron/mediacommon#112)
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 [email protected]
HLS
- decrease number of idle connections kept open after a reconnection (#3128)
- fix freeze in case of muxing errors (#3135) (#3150)
- fix directory creation when using hlsDirectory (#3135) (#3151)
- store init.mp4 exclusively on RAM (bluenviron/gohlslib#143)
- webrtc, hls: use absolute paths in Location header (#3195) (#3177) (#3240)
WebRTC
- fix deadlock when a WHEP source fails (#3062) (#3108) (#3110). Co-authored-by: Jonathan Martin [email protected]. Co-authored-by: aler9 [email protected]
- fix memory leak when WHEP track gathering fails and decrease count of idle HTTP connections (#3124). * fix: whep gathering failure leaks peer connections. * fix: failure to create whep client leaks. when read fails, client is not closed. * fix: close idle connection with whip client. * fix: no link check on early whip client close. * move http.Client.CloseIdleConnections() outside WHIPClient. * automatically call WHEPClient.Close() in case of errors during WHEPClient.Read() or WHEPClient.Publish(). ---------. Co-authored-by: Jonathan Martin [email protected]. Co-authored-by: aler9 [email protected]
- fix crash when marshaling ICE fragments (#3231)
- return 404 in case a WHIP PATCH or WHIP DELETE request fails (#3232)
- webrtc, hls: use absolute paths in Location header (#3195) (#3177) (#3240)
- Add option for ICE servers to be client only (#3164). * Add option for ICE servers to be client only. * add clientOnly to configuration file and API docs. ---------. Co-authored-by: aler9
API
- Fix API version in docs (#3180)
Dependencies
- build(deps): bump golang.org/x/sys from 0.17.0 to 0.18.0 (#3099)
- build(deps): bump golang.org/x/term from 0.17.0 to 0.18.0 (#3098)
- build(deps): bump github.com/pion/sdp/v3 (#3102)
- build(deps): bump github.com/golang-jwt/jwt/v5 from 5.2.0 to 5.2.1 (#3104)
- build(deps): bump github.com/MicahParks/keyfunc/v3 from 3.2.5 to 3.2.7 (#3105)
- build(deps): bump golang.org/x/crypto from 0.20.0 to 0.21.0 (#3103)
- build(deps): bump github.com/pion/sdp/v3 from 3.0.7 to 3.0.8 (#3120)
- build(deps): bump github.com/MicahParks/keyfunc/v3 from 3.2.7 to 3.2.8 (#3132)
- build(deps): bump github.com/MicahParks/keyfunc/v3 from 3.2.8 to 3.2.9 (#3136)
- build(deps): bump github.com/alecthomas/kong from 0.8.1 to 0.9.0 (#3133)
- build(deps): bump google.golang.org/protobuf from 1.30.0 to 1.33.0 (#3139)
- build(deps): bump github.com/pion/rtp from 1.8.3 to 1.8.4 (#3153)
- build(deps): bump github.com/datarhei/gosrt from 0.5.7 to 0.6.0 (#3154)
- build(deps): bump github.com/pion/interceptor from 0.1.25 to 0.1.27 (#3171)
- build(deps): bump github.com/pion/rtp from 1.8.4 to 1.8.5 (#3178)
- build(deps): bump github.com/MicahParks/keyfunc/v3 from 3.2.9 to 3.3.2 (#3168)
- build(deps): bump github.com/pion/sdp/v3 from 3.0.8 to 3.0.9 (#3179)
- build(deps): bump golang.org/x/term from 0.18.0 to 0.19.0 (#3191)
- build(deps): bump golang.org/x/crypto from 0.21.0 to 0.22.0 (#3192)
- bump hls.js to v1.5.8 (#3222). Co-authored-by: mediamtx-bot bot@mediamtx
- build(deps): bump github.com/pion/interceptor from 0.1.27 to 0.1.28 (#3228)
v1.6.0
New major features
- New authentication system (#1341) (#1992) (#2205) (#3081). This is a new authentication system that covers all the features exposed by the server, including playback, API, metrics and PPROF, improves internal authentication by adding permissions, improves HTTP-based authentication by adding the ability to exclude certain actions from being authenticated, adds an additional method (JWT-based authentication).
Fixes and improvements
General
- stop logging HTTP requests twice (#2993)
- remove hls.js from the repository and restore plain MIT license (#3008)
- fix compilation with Windows and git autocrlf (#3010) (#3011)
- fix double 'v' in automatic hls.js bump commits (#3020)
- remove double 'v' from hls.js bump messages (#3040)
- in hooks, allow replacing placeholders with environment (#3044)
- when stopping hooks, stop all their subprocesses too (#3004) (#3087)
- mpegts: emit decode error instead of exiting in case of parse errors (bluenviron/mediacommon#110)
RTSP
- add random value to timestamp of tracks from other protocols (#3071)
- fix infinite loop when parsing specially-crafted headers (bluenviron/gortsplib#521)
- add fuzz tests to all headers (bluenviron/gortsplib#522)
- split headers.Authenticate and headers.Authorization (bluenviron/gortsplib#523)
- support authenticating with SHA-256 digest (bluenviron/gortsplib#524)
- change rtptime.Encoder signature and initialize time to a random value (bluenviron/gortsplib#525)
RTMP
- add new AMF0 encoder and encoder (#3069). This improves performance, security and removes a dependency.
HLS
- in logs, store both ip and port of incoming requests (#3013)
- when alwaysRemux is true, prevent clients from creating muxers (#3015)
- fix crash when muxer is being recreated, improve performance (#3017)
- stop spamming 'stream doesn't contain any supported codec' when hlsAlwaysRemux is true (#3018)
- client: fix race condition when decoding time of MPEG-TS streams (bluenviron/gohlslib#141)
- client: fix race condition when reading absolute time (bluenviron/gohlslib#142)
WebRTC
- return an error when proxying stream with no tracks (#3042)
SRT
- add additional metrics (#2962) by @nerdbaggy
Dependencies
- build(deps): bump golang.org/x/crypto from 0.18.0 to 0.19.0 (#3002)
- bump hls-js to v1.5.4 (#2999). Co-authored-by: mediamtx-bot bot@mediamtx
- bump hls-js to vv1.5.5 (#3019). Co-authored-by: mediamtx-bot bot@mediamtx
- build(deps): bump github.com/bluenviron/mediacommon from 1.9.1 to 1.9.2 (#3030)
- bump hls.js to v1.5.6 (#3038). Co-authored-by: mediamtx-bot bot@mediamtx
- bump hls.js to v1.5.7 (#3072). Co-authored-by: mediamtx-bot bot@mediamtx
- build(deps): bump golang.org/x/crypto from 0.19.0 to 0.20.0 (#3078)
- build(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0 (#3090)
- build(deps): bump github.com/pion/rtcp from 1.2.13 to 1.2.14 (#3089)
v1.5.1
Fixes and improvements
General
- playback: add /list endpoint to list available timespans (#2978)
- playback: accept durations written in seconds (#2979)
- playback: make 'format' parameter optional (#2980)
- prevent multiple crashes when reloading the configuration (#2945)
HLS
- fix infinite loop in web client when reading incompatible codecs (#2956). . when a player received a stream with incompatible codecs, it started. polling the server for index.m3u8 in an infinite loop. This was caused. by #2631
- hls, webrtc: in the web page, show connection errors to users (#2957)
- hls, webrtc: in web page, prevent video from overflowing (#2958)
- hls, webrtc: in web page, add shadow to messages (#2959)
- fix crash in case of disk write errors (bluenviron/gohlslib#136) (bluenviron/gohlslib#137)
WebRTC
- hls, webrtc: in the web page, show connection errors to users (#2957)
- hls, webrtc: in web page, prevent video from overflowing (#2958)
- hls, webrtc: in web page, add shadow to messages (#2959)
API
- add endpoints for recording management (#2901) (#2988)
- improve performance by using RWMutex (#2968)
- apidocs: group operations by using tags (#2987)
RTSP
- fix compatibility with some TP-Link cameras (bluenviron/gortsplib#509) (bluenviron/gortsplib#510)
- fix ClockRate() of G711 16khz tracks (bluenviron/gortsplib#511)
- client: prevent UDP listener from closing twice (bluenviron/gortsplib#515)
RPI Camera
- add rpiCameraAWBGains (#2858)
Dependencies
- bump Linux Alpine to 3.19 (https://github.com/bluenviron/mediamtx/issues/2837) (#2953)
- build(deps): bump github.com/google/uuid from 1.5.0 to 1.6.0 (#2939)
- bump hls-js to v1.5.2 (#2948). . Co-authored-by: mediamtx-bot bot@mediamtx
- bump hls-js to v1.5.3 (#2964). . Co-authored-by: mediamtx-bot bot@mediamtx
v1.5.0
New major features
Fixes and improvements
General
- support G711 tracks with multiple channels and custom sample rates (#2891)
- Add Argon2 credential hash support (#2888)
- treat different RTSP formats as different tracks in logs and API (#2907)
- do not wait for HTTP connections to close when shutting down the server (#2909)
- record: use reception time instead of current time in segment names (#2925)
- h264: fix chroma_format_idc value for baseline profile (bluenviron/mediacommon#103)
- support MPEG-2 audio (bluenviron/mediacommon#107) (bluenviron/gortsplib#486)
RTSP
- support G711 multiple channels and custom sample rates (bluenviron/gortsplib#497)
- Fixing issue for SDP avigilon when activating onvif backchannel (bluenviron/gortsplib#479) (bluenviron/gortsplib#501)
SRT
- wait some seconds before returning authentication errors (#2918)
- support standard streamID syntax (#2469) (#2919)
API
Dependencies
v1.4.2
Fixes and improvements
General
- Log start errors of custom commands (#2828) by @jsbohnert
RTSP
- support detecting LPCM formats with payload types 10 and 11 (bluenviron/gortsplib#496)
RTMP
HLS
- client: support reading streams in Low-Latency mode (bluenviron/gohlslib#72) (bluenviron/gohlslib#126)
- muxer: progressively increase SequenceNumber of parts (bluenviron/gohlslib#115). . this prevents warning 'Fragment sequence discontinuity detected' in VLC
- muxer: allow writing audio frames before video frames (bluenviron/gohlslib#116)
- client: correctly sort tracks of multivariant playlists (bluenviron/gohlslib#120)
- client: return ErrClientEOS when a playlist ends (bluenviron/gohlslib#59) (bluenviron/gohlslib#125)
WebRTC
API
Dependencies
- build(deps): bump golang.org/x/term from 0.15.0 to 0.16.0 (#2873)
- build(deps): bump github.com/pion/rtcp from 1.2.12 to 1.2.13 (bluenviron/gortsplib#482)
- build(deps): bump github.com/google/uuid from 1.4.0 to 1.5.0 (bluenviron/gortsplib#483)
v1.4.1
Fixes and improvements
RTMP
- fix parsing error caused by extended timestamps (#2393) (#2556) (#2384) (#1550) (#2564) (#2808)
- return error in case of extended chunk stream IDs (#2806)
- rtmp, srt: fix output of 'is reading from' log entry (#2820)
- change default RTMPS port to 1936 when it is omitted in source (#2821)
HLS
- bump hls-js to v1.4.14 (#2825)
WebRTC
SRT
- rtmp, srt: fix output of 'is reading from' log entry (#2820)
RPI Camera
- pass log level to libcamera (https://github.com/bluenviron/mediamtx/issues/2617) (#2811)
Dependencies
v1.4.0
New features
- support using static sources in paths with regular expressions (#824) (#2799). This allows to proxy requests to other servers by using regular expressions.
Fixes and improvements
General
- support unix timestamp in filenames of recorded segments (#2774) by @neerajkanhere
- fix crash when requesting metrics and RTMP, SRT or WebRTC servers are not present anymore (#2782)
- add RTMPS metrics (#2783)
- always use 'all_others' or 'all' after every other path configuration (#2798)
RTSP
- sdp: fix parsing SDP from UDP technology cameras (bluenviron/gortsplib#474) (bluenviron/gortsplib#478)
- sdp: fix compatibility with Altasec NVRs (bluenviron/gortsplib#476). . (#2762)
HLS
- bump hls-js to v1.4.13 (#2791). . Co-authored-by: mediamtx-bot bot@mediamtx
- fix appending slash when behind a reverse proxy (#2770)
- hls, webrtc: prevent XSS attack when appending slash to paths (#2766) (#2767) (#2772)
- hls, webrtc: fix appending slash to paths that contain slashes (#2773)
RPI Camera
WebRTC
- hls, webrtc: prevent XSS attack when appending slash to paths (#2766) (#2767) (#2772)
- hls, webrtc: fix appending slash to paths that contain slashes (#2773)
- fix propagating query parameters when appending slash to paths (#2771)
Dependencies
v1.3.1
Fixes and improvements
General
- allow using 'fallback' with static sources (#2606) (#2706)
- record: fix invalid segment duration in case of offsets between video/audio (#2477) (#2715)
- h264: fix DTS extraction in case of long NALUs (bluenviron/mediacommon#98)
- h265: improve DTS extractor performance (bluenviron/mediacommon#99)
SRT
- Add query as optional block for SRT publish and read (#2656)
HLS
- fix parsing and generating EXT-X-PLAYLIST-TYPE (bluenviron/gohlslib#108)
- support optional URI in EXT-X-MEDIA tag (bluenviron/gohlslib#104)
- muxer: fix invalid fMP4 BaseTime in case of negative DTS (bluenviron/gohlslib#111)
WebRTC
- fix crash when reading from path 'publish' (#2688) (#2692)
- fix bad quality when converting Opus from WebRTC to LL-HLS (#2499) (#2740)
API
- apidocs: add missing recording settings to PathConf (#2705)
Dependencies
v1.3.0
New features
General
- metrics: add paths_bytes_sent, srt_conns, srt_conns_bytes_received, srt_conns_bytes_sent (#2620) (#2619) (#2629) by @rse
- metrics: expose state of WebRTC sessions (#2662)
- add runOnUnDemand hook (#2645)
WebRTC
- improve connectivity mechanism: add
webrtcAdditionalHosts
and allow to use DNS names in place of IPs; always use a fixed UDP port; allow to disable UDP; do not use a STUN server by default (#2686) - add options (width, height, framerate, audio capture) and store parameters in URL (#1837) (#2167) (#2584) by @Lukinoh
Fixes and improvements
General
- fix crash when publishing to a path with 'runOnDemand' from outside 'runOnDemand' (#2636) (#2637)
- tests: fix race condition in TestPathRunOnDemand (#2663)
- fix setting 'recordDeleteAfter' to zero (#2670) (#2671)
- record: fix deleting segments in case of relative paths (#2526) (#2673)
- record: allow using special characters in recording path (#2674)
RTSP
- rename sourceProtocol into rtspTransport, sourceAnyPortEnable into rtspAnyPort (#2644)
- server: fix crash in case of requests with nil URL (bluenviron/gortsplib#458) by @database64128
RTMP
WebRTC
- fix crash in case of errors during PATCH (#2609) (#2613)
- allow using sourceFingerprint with WebRTC sources (#2618) (#2626)
- restore compatibility when running behind a proxy, in a subpath (#2638)
- prevent pion/webrtc from writing log lines (#2681)
API
HLS
- apply readTimeout to HLS sources (#2627)
- HLS.js usage: bugfix, stability improvements and resilience improvement (#2631)
- muxer: fix discontinuity in part ID (bluenviron/gohlslib#107). . (#2317). . this prevented Low-Latency HLS from running smoothly on Safari
SRT
- fix race condition when disposing late packets (#2648)
Dependencies
- build(deps): bump github.com/pion/interceptor from 0.1.24 to 0.1.25 (#2622)
- build(deps): bump github.com/gorilla/websocket from 1.5.0 to 1.5.1 (#2652)
- build(deps): bump github.com/pion/rtcp from 1.2.10 to 1.2.11 (#2669)
- build(deps): bump golang.org/x/term from 0.13.0 to 0.14.0 (#2667)
- build(deps): bump golang.org/x/crypto from 0.14.0 to 0.15.0 (#2668)
- build(deps): bump github.com/pion/rtcp from 1.2.11 to 1.2.12 (#2676)
- build(deps): bump github.com/pion/rtp from 1.8.2 to 1.8.3 (#2677)
- build(deps): bump github.com/pion/webrtc/v3 from 3.2.21 to 3.2.22 (#2675)
v1.2.1
Fixes and improvements
General
- add environment variable MTX_QUERY to some hooks (#2483) (#2522)
- bump Go to 1.21 (#2546)
- fix crash when setting deprecated settings with environment (#2529) (#2550)
- restart recordings in case of errors (#2439) (#2571)
- fix hot reloading on Windows when letter case changes (#2586) by @jsbohnert
RTSP
- support receiving responses with spaces in CSeq (bluenviron/gortsplib#437) (bluenviron/gortsplib#446)
- support SDPs without leading version (bluenviron/gortsplib#448) (bluenviron/gortsplib#450)
- support cameras with decimal numbers in SDP origin (bluenviron/gortsplib#455). . (#2558)
WebRTC
- fix compatibility with Alexa offers (#2544)
- support WHIP/WHEP DELETE method (#2507) by @rgl
- improve stability by reordering incoming packets (#2570)
- return detailed errors in responses (#2594)
RTMP
RPI Camera
- Fix Raspberry Pi Camera 3 auto focus (#2326) (#2552)
- Switch default autofocus mode to 'continuous' (#2591)
API
- return full configuration in config/paths/list and config/paths/get (#2535) (#2595)
- add path name to config/paths/list and config/paths/get (#2535) (#2596)
- return 500 instead of 404 in case of non-existing items (#2582)
- send error messages in response body (#2518) (#2583)
Dependencies