v0.18.0

bluenviron/mediamtxv0.18.0Apr 10, 2022by github-actions[bot]

AI Summary

A major update featuring support for dynamic H264 resolutions and deep improvements to RTSP packet parsing to fix long-standing timing issues.

Key Highlights

  • Support for H264 streams with dynamic SPS/PTS (changing resolution over time)
  • Improved RTSP packet parsing leading to automatic remuxing and padding removal
  • Removed `runOnPublish` and replaced it with `runOnReady`
  • Fixed timing issues with B-frames preventing errors in FFmpeg

Breaking Changes

  • Removed `runOnPublish` in favor of `runOnReady`

New Features

  • Support for dynamic H264 resolution changes

Full Release Notes

### New major features

* General: support H264 streams with dynamic SPS / PTS, i.e. streams with a resolution that changes over time. This is particularly useful when dealing with IP cameras, whose resolution can be changed into their settings page
* RTSP server/source: parse all incoming RTP/RTCP packets. This allowed to solve a series of long-standing issues that required a deeper understanding on what exactly is routed by the server, including:
  * remove padding from outgoing RTP packets, saving bandwidth
  * generate RTCP sender reports automatically; stop routing RTCP packets from publishers to readers
  * automatically remux oversized RTP/H264 packets into smaller packets; remove parameter `readBufferSize` since it is not necessary anymore
  * fix computation of RTCP sender report timestamps, RTCP receiver report timestamps and timestamp of the RTP-Info header, in case of H264 streams with B-frames. This prevents timing issues with FFmpeg and a lot of other software (#622)

### Fixes and improvements

* General: fix panic that happened when integer keys are used in config maps (#865)
* General: (breaking change) remove `runOnPublish`; it is replaced by the more generic `runOnReady`
* General: add upper limit on H264 NALU size and AAC AU size in order to prevent RAM exhaustion
* RTSP server: set timeout in Session header only when client is playing
* RTSP server: remove Session header from ANNOUNCE responses, supporting some additional clients (#840)
* RTSP server: set multicast TTL to 16 (#873)
* RTSP source: skip tracks with an invalid clock rate (#832)
* RTSP source: support servers that sends UDP packets with a different IP
* RTSP source: support IOI trk-101 (https://github.com/aler9/gortsplib/pull/116)
* HLS muxer: fix blank screen on iOS / Android in case of video-only streams (#816)
* HLS muxer: fix format of EXT-X-PROGRAM-DATE-TIME
* HLS muxer: fix computation of last PTS of segments
* HLS muxer: fix (again) DTS computation
* HLS source: support segments with relative URLs
* HLS source: fix freeze that happened during a video decoding error 
* HLS source: ignore Annex-B decode errors
* RTMP server: always send H264 configuration before IDR frames