v1.7.0

bluenviron/mediamtxv1.7.0Apr 14, 2024by github-actions[bot]

AI Summary

Introduces support for serving streams in standard MP4 format during playback. It also resolves critical WebRTC deadlocks and HLS freezing issues, and deprecates the `path.playback` configuration parameter.

Key Highlights

  • Playback support for standard MP4 format
  • Fix deadlock when a WHEP source fails
  • Fix freeze in case of muxing errors in HLS
  • Fix memory leak when WHEP track gathering fails

Breaking Changes

  • Deprecate path.playback parameter

New Features

  • RTMP: fix streaming errors by handling AMF0 strict arrays
  • HLS: store init.mp4 exclusively on RAM
  • WebRTC: Add option for ICE servers to be client only

Full Release Notes

## New features

* playback: support serving streams in standard MP4 format (https://github.com/bluenviron/mediamtx/issues/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 (https://github.com/bluenviron/mediamtx/issues/3113)
* playback: do not concatenate segments with different tracks (https://github.com/bluenviron/mediamtx/issues/3197)
* playback: fix concatenation of segments with multiple tracks (https://github.com/bluenviron/mediamtx/issues/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 (https://github.com/bluenviron/mediamtx/issues/3199)
* playback: increase sequence number of fMP4 parts (https://github.com/bluenviron/mediamtx/issues/3200)
* playback: adjust speed to compensate discrepancies between NTP and DTS (https://github.com/bluenviron/mediamtx/issues/3202)
* playaback: use a fixed fMP4 part duration (https://github.com/bluenviron/mediamtx/issues/3203)
* playback: improve performance when reading big segments (https://github.com/bluenviron/mediamtx/issues/3209)
* playback: fix bug that messed up duration of last sample of each track (https://github.com/bluenviron/mediamtx/issues/3210)
* playback: support serving tracks with any time scale (https://github.com/bluenviron/mediamtx/issues/3211)
* record: use original timescale of track instead of 90khz (https://github.com/bluenviron/mediamtx/issues/3212)
* deprecate path.playback parameter (https://github.com/bluenviron/mediamtx/issues/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 (https://github.com/bluenviron/mediacommon/issues/112)

RTMP

* fix streaming errors by handling AMF0 strict arrays (https://github.com/bluenviron/mediamtx/issues/3188) (https://github.com/bluenviron/mediamtx/issues/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>

HLS

* decrease number of idle connections kept open after a reconnection (https://github.com/bluenviron/mediamtx/issues/3128)
* fix freeze in case of muxing errors (https://github.com/bluenviron/mediamtx/issues/3135) (https://github.com/bluenviron/mediamtx/issues/3150)
* fix directory creation when using hlsDirectory (https://github.com/bluenviron/mediamtx/issues/3135) (https://github.com/bluenviron/mediamtx/issues/3151)
* store init.mp4 exclusively on RAM (https://github.com/bluenviron/gohlslib/issues/143)
* webrtc, hls: use absolute paths in Location header (https://github.com/bluenviron/mediamtx/issues/3195) (https://github.com/bluenviron/mediamtx/issues/3177) (https://github.com/bluenviron/mediamtx/issues/3240)

WebRTC

* fix deadlock when a WHEP source fails (https://github.com/bluenviron/mediamtx/issues/3062) (https://github.com/bluenviron/mediamtx/issues/3108) (https://github.com/bluenviron/mediamtx/issues/3110). Co-authored-by: Jonathan Martin <jonathan.martin@marss.com>. Co-authored-by: aler9 <46489434+aler9@users.noreply.github.com>
* fix memory leak when WHEP track gathering fails and decrease count of idle HTTP connections (https://github.com/bluenviron/mediamtx/issues/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 <jonathan.martin@marss.com>. Co-authored-by: aler9 <46489434+aler9@users.noreply.github.com>
* fix crash when marshaling ICE fragments (https://github.com/bluenviron/mediamtx/issues/3231)
* return 404 in case a WHIP PATCH or WHIP DELETE request fails (https://github.com/bluenviron/mediamtx/issues/3232)
* webrtc, hls: use absolute paths in Location header (https://github.com/bluenviron/mediamtx/issues/3195) (https://github.com/bluenviron/mediamtx/issues/3177) (https://github.com/bluenviron/mediamtx/issues/3240)
* Add option for ICE servers to be client only (https://github.com/bluenviron/mediamtx/issues/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 (https://github.com/bluenviron/mediamtx/issues/3180)

Dependencies

* build(deps): bump golang.org/x/sys from 0.17.0 to 0.18.0 (https://github.com/bluenviron/mediamtx/issues/3099)
* build(deps): bump golang.org/x/term from 0.17.0 to 0.18.0 (https://github.com/bluenviron/mediamtx/issues/3098)
* build(deps): bump github.com/pion/sdp/v3 (https://github.com/bluenviron/mediamtx/issues/3102)
* build(deps): bump github.com/golang-jwt/jwt/v5 from 5.2.0 to 5.2.1 (https://github.com/bluenviron/mediamtx/issues/3104)
* build(deps): bump github.com/MicahParks/keyfunc/v3 from 3.2.5 to 3.2.7 (https://github.com/bluenviron/mediamtx/issues/3105)
* build(deps): bump golang.org/x/crypto from 0.20.0 to 0.21.0 (https://github.com/bluenviron/mediamtx/issues/3103)
* build(deps): bump github.com/pion/sdp/v3 from 3.0.7 to 3.0.8 (https://github.com/bluenviron/mediamtx/issues/3120)
* build(deps): bump github.com/MicahParks/keyfunc/v3 from 3.2.7 to 3.2.8 (https://github.com/bluenviron/mediamtx/issues/3132)
* build(deps): bump github.com/MicahParks/keyfunc/v3 from 3.2.8 to 3.2.9 (https://github.com/bluenviron/mediamtx/issues/3136)
* build(deps): bump github.com/alecthomas/kong from 0.8.1 to 0.9.0 (https://github.com/bluenviron/mediamtx/issues/3133)
* build(deps): bump google.golang.org/protobuf from 1.30.0 to 1.33.0 (https://github.com/bluenviron/mediamtx/issues/3139)
* build(deps): bump github.com/pion/rtp from 1.8.3 to 1.8.4 (https://github.com/bluenviron/mediamtx/issues/3153)
* build(deps): bump github.com/datarhei/gosrt from 0.5.7 to 0.6.0 (https://github.com/bluenviron/mediamtx/issues/3154)
* build(deps): bump github.com/pion/interceptor from 0.1.25 to 0.1.27 (https://github.com/bluenviron/mediamtx/issues/3171)
* build(deps): bump github.com/pion/rtp from 1.8.4 to 1.8.5 (https://github.com/bluenviron/mediamtx/issues/3178)
* build(deps): bump github.com/MicahParks/keyfunc/v3 from 3.2.9 to 3.3.2 (https://github.com/bluenviron/mediamtx/issues/3168)
* build(deps): bump github.com/pion/sdp/v3 from 3.0.8 to 3.0.9 (https://github.com/bluenviron/mediamtx/issues/3179)
* build(deps): bump golang.org/x/term from 0.18.0 to 0.19.0 (https://github.com/bluenviron/mediamtx/issues/3191)
* build(deps): bump golang.org/x/crypto from 0.21.0 to 0.22.0 (https://github.com/bluenviron/mediamtx/issues/3192)
* bump hls.js to v1.5.8 (https://github.com/bluenviron/mediamtx/issues/3222). Co-authored-by: mediamtx-bot <bot@mediamtx>
* build(deps): bump github.com/pion/interceptor from 0.1.27 to 0.1.28 (https://github.com/bluenviron/mediamtx/issues/3228)