- accept schemeless
Content-Baseheader (e.g.192.168.1.10:554/stream0/instead ofrtsp://192.168.1.10:554/stream0/) as sent by some Anjvision cameras. See moonfire-nvr#356.
- support cameras which improperly set the RTP "MARK" bit on SEI data, including the LV-IP22IR40DVBL sold by Ivel. See moonfire-nvr#352.
retina::codec::FrameFormat: support Annex B encoding (#44), ADTS encoding, and parameter set insertion control. This makes it easier to feed frames directly to a decoder or muxer without munging them. It also makes Retina's behavior more camera-agnostic: previously it would include inline parameters or not based on what the camera choose; now it's configurable viaframe_format.- use the
RUST_LOGenvironment variable to control logging in the examples and tests. (Formerly it usedMOONFIRE_LOG, but Retina is not part of Moonfire, andRUST_LOGis standard.) Document inREADME.md. As requested in #55. - restructure the
webrtc-proxyexample to avoid causing the upstream RTSP server's buffer to fill while waiting for the user to copy'n'paste tokens in both directions. Fixes #80. - add a new
webcodecsexample that decodes video frames using WebCodecs API. This is the absolute lowest-latency way to watch RTSP streams from a browser! - expose receive timestamps (both wall clock and monotonic/instant) in packet contexts.
- expose coded as well as display pixel dimensions in
VideoParametersto ease construction of a WebCodecsVideoDecoderConfiguration. - expose number of audio channels in
AudioParametersto ease construction of a WebCodecsAudioDecoderConfig. - allow producing
VideoParametersfrom H.264 SPS and PPS NALs.
- trim whitespace in SSRC values from
TransportandRTP-Infoheaders, improving compatibility with some Hikvision cameras (e.g. iDS-2CD9396-BIS and DS-2CD3641G2-IZS). Thanks to @myermukhanov in #128. - ignore trailing semicolons in
RTP-Infoheader parsing, improving compatibility with Laureii cameras. Reported by @ZXY595 in #117. - H.265: fix bug in which
TrailNs (unit type 0) were rejected as a single NAL. This was noticeable with an Intel N100 encoder + ffmpeg + MediaMTX. As reported by @anti-social in #123. - H.264 and H.265: allow empty fragments, which are useless but sent by some cameras, as reported by @nemosupremo in #115.
- fix inverted logic in simple audio
frame_length()that caused valid G.711 (PCMA/PCMU) audio streams to be rejected with "invalid length" errors. Reported by C-Format in #126. - fix resuming depacketization (via
Demuxed::poll_next) after an error. Previously this could panic due to error paths not maintaining the invariants. See #122. - support
pps_scaling_list_data_present, needed by some Reolink H.265 cameras. See #112 and #116.
- fix parsing of the
Transportwhen thessrcparameter precedes other parameters and of SDP when thecontrolattribute precedes other attributes. This improves compatibility with Luckfox'srkipserver. See #120.
- fix H.265 ProfileTierLevel parsing when
sps_max_sub_layers_minus1 > 0. This caused strange error messages because the SPS bitstream was mis-positioned. Thanks to nemosupremo! - improve compatibility with some Tiandy cameras by warning rather than erroring when H.264 FU-A and H.265 FU change NAL types within a fragmented access unit. These cameras appear to never set the subsequent packets' NAL types correctly. See scottlamb/moonfire-nvr#344.
- update dependencies:
jiffto 0.2 andthiserrorto 2.0 - add an example that uses ffmpeg to decode frames
- update minimum Rust version to 1.85
- ignore the "reserved" bit in FU-A payload, improving camera compatibility
- fix H.265 SPS parsing flaw that affected the Tenda CP3PRO camera.
- fix format of RTCP packet used for firewall hole punching.
- support H.265 SPSs which set
st_ref_pic_set.inter_ref_pic_set_prediction_flag, including Xiaomi YI Pro 2K Home cameras running https://github.com/roleoroleo/yi-hack-Allwinner-v2 firmware. Fixes scottlamb/moonfire-nvr#333. - fix RFC 6381 codec string generation to match a significant bug fix in Technical Corrigendum 1 to ISO/IEC 14496-15:2014.
- support H.265 (#57).
- fix
Connecting via TCP to known-broken RTSP serverlog line on connection to a non-broken server.
- improve some error messages on bad H.264
sprop-parameter-sets - interoperate with V380 cameras by interpreting Annex B sequences in RTP payload contexts where single NALs are otherwise expected. (Fixes #68, [#108]).
- interpret Annex B sequences in H.264
sprop-parameter-setsalso, improving interoperability with additional cameras. In particular, Retina now understands these video parameters atDESCRIBEtime, rather than delaying until the first full video frame is received. - update minimum Rust to 1.70.
- use
jifffor date formatting.
- update
base64dep to 0.22 - update minimum Rust version to 1.70.
- added helpers for building
.mp4VisualSampleEntryandAudioSampleEntryfor H.264, MJPEG, and AAC. - shrunk
VideoParametersfrom 112 bytes to 88 bytes andAudioParametersfrom 80 bytes to 64 bytes (measured on a 64-bit platform).
- support MJPEG codec (contribution from zanshi)
- permit
MP2T/protocol in media description (contribution from (yujincheng08)[https://github.com/yujincheng08)]). - #102: support Reolink cameras which have extraneous bytes following the SPS.
- support servers that do not set
Content-TypeonDESCRIBEresponses
- add default User-Agent header
- add policy for handling session IDs. Required for some broken cameras which
can change the session ID between
SETUPcalls. - ignore connection refused errors triggered by the firewall punch-through packets.
- improve several vague or misleading log messages.
- fix inverted logic in live555 bug detection, introduced with
v0.3.10. - ignore
seq=0andseq=1inPLAYresponse'sRTP-Infoheader by default. These values are known to be set erroneously by the Hikvision DS-2CD2032-I and Tapo C320WS, respectively. - customizable behavior for RTCP packets with unknown ssrcs, now defaulting to ignoring them. This also is necessary to interoperate with the Tapo C320WS.
- improve some incorrect, misleading, and/or uninformative logging.
- minimum Rust is now 1.67.
- minimum Rust version is now 1.64.
- upgrade to
rtsp-types0.0.5, which ignores trailing whitespace in RTSP headers. This fixes errors when communicating with some Longse cameras (#77). - remove obsolete workaround for GW security GW security GW4089IP's bad out-of-band parameters.
Instead, we treat them as unparseable and ignore them as described in the
v0.4.2notes below.
- improve interop with Ubiquiti cameras by ignoring
fmtpattributes in SDP which have nothing (no required SP, no data) after the payload type. - fix parsing of RTP packets with extensions, which broke with
v0.4.0(2e34bf92).
- upgrade version of
h264-readercrate. Compatibility note: Retina may now be stricter about parsing H.264 parameters (SPS/PPS). In practice, with some cameras this means unparseable "out-of-line" parameters (specified in the SDP) will be ignored in favor of parseable "in-line" parameters (specified within the RTP data stream).
- ignore unparseable SDP media, improving compatibility with TP-Link cameras, as described in scottlamb/moonfire-nvr#238.
- Send keepalives at every half-session-timeout rather than a fixed 30-second interval. This allows persistent connections to servers that have timeouts shorter than 30 seconds.
- Use
OPTIONSfor initial keepalive, and only switch toSET_PARAMETERif the server advertises its support. This allows persistent connections tortsp-simple-serverv0.19.3, which does not support the latter method and drops the connection on receiving unsupported methods.
- BREAKING: remove deprecated
retina::client::Session<Playing>::teardownandretina::client::Demuxed::teardown; made private some items already#[doc(hidden)]. - BREAKING:
retina::client::Session<Described>::setuptakes a newSetupOptionsargument for future expansion. - BREAKING: the transport to use is configured per-stream as part of
retina::SetupOptions(rather than the priorretina::SessionOptions) and takes per-transport options for future expansion. - BREAKING:
retina::StreamContexthas been split out ofretina::PacketContext. Both must be printed to provide the same information as before. This change reduces how much data needs to be copied with each packet. - BREAKING:
PacketItemandCodecItemare now#[non_exhaustive]for future expansion. - BREAKING:
retina::client::rtp::Packetis nowretina::rtp::ReceivedPacket, and field access has been removed in favor of accessors. - BREAKING:
retina::client::PacketItem::RtpPackethas been renamed toretina::client::PacketItem::Rtp. - BREAKING:
retina::client::PacketItem::SenderReporthas been replaced withretina::client::PacketItem::Rtcp, to expose full RTCP compound packets. Likewiseretina::codec::CodecItem. - BREAKING:
retina::codec::Parametersis nowretina::codec::ParametersRef, which references parameters stored within theStreamto reduce copying. - minimum Rust version is now 1.59.
- ignore unparseable
rtptimevalues in thePLAYresponse'sRTP-Infoheader. This improves compatibility with the OMNY M5S2A 2812 camera, as described in scottlamb/moonfire-nvr#224.
- camera interop: eliminate
bad clockrate in rtpmaperrors with cameras that (incorrectly) add trailing spaces to this SDP parameter, as described at scottlamb/moonfire-nvr#213. - camera interop: allow ignoring RTSP interleaved data messages on unassigned channels, also described at scottlamb-moonfire-nvr#213.
- camera interop: when using TCP, default to attempting a
TEARDOWNbefore closing the connection, to improve behavior with cameras that have the live555 stale session bug but do not advertise it. - clarify
Session's expectations for tokio runtimes. - additional diagnostics/logging on certain camera failures.
- fix depacketization of fragmented AAC frames
- #52: allow compatibility with cameras that incorrectly omit the SDP origin line.
- fix panic if RTSP server precedes a data message with a CRLF.
- expose SDP framerate via
retina::client::Stream::framerate.
- #50: fix a panic on certain
invalid H.264
sprop-parameter-sets - documentation improvements
- correctly expire stale session entries that track live555 stale file descriptor sessions. See moonfire-nvr#184.
- ignore (rather than error on) spurious RTP data packets between the
PLAYrequest and response. These are sent by some versions of v4l2rtspserver.
- #42: support servers that don't send out-of-band H.264 parameters or send invalid parameters; wait for in-band parameters in this case. The in-band parameters must be valid.
- documentation improvements.
- use
rtsp-types0.0.3, and thusnom7.0.
- #25: better HTTP
authentication support via the new
http-authcrate. Before,retinawould only authenticate properly if the first requested challenge wasDigest. Now, it will pick out aDigestorBasicchallenge from a list.
- better
TEARDOWNhandling, which often avoids the need to wait for session expiration ((#34).
- warn when connecting via TCP to a known-broken live555 server version.
- improve Geovision compatibility by skipping its strange RTP packets with payload type 50.
- UDP fixes.
- improve compatibility with cameras with non-compliant SDP, including Anpviz (#26 and Geovision ([#33])(#33)).
- new mechanism to more reliably send
TEARDOWNrequests.
- BREAKING CHANGE: #30:
experimental UDP support. Several
RtspMessageContextfields have been replaced withPacketContext. - BREAKING CHANGE: remove
retina::client::SessionOptions::ignore_spurious_data. This was an attempted workaround for old live555 servers (#17) that was ineffective. - #22: fix handling of 44.1 kHz AAC audio.
- BREAKING CHANGE:
retina::client::Session::describenow takes a newoptions: SessionOptions. Thecredshas moved into theoptions, along with some new options. - BREAKING CHANGE: renamed
PlayPolicytoPlayOptionsfor consistency. - Added options to work around bugs found in Reolink cameras.
- #9. Improve compatibility
with how some cameras handle the
controlandRTP-Infourls. This adopts a URL joining behavior which isn't RFC-compliant but seems to be more compatible in practice.
- use
SET_PARAMETERSrather thanGET_PARAMETERSfor keepalives. The latter doesn't work with GW Security GW4089IP cameras. - removed
rtcpdependency. Fixes #8. Avoids picking up various transitive dependencies needed by later versions of thertcpcrate, includingtokio. (retina's owntokiodependency will likely become optional in a future version.)
- BREAKING CHANGE: New opaque error type with more uniform, richer error
messages. No more
failuredependency. - BREAKING CHANGE:
retina::client::Stream::parametersnow returns parameters by value. This allows shrinking depacketizer types. - BREAKING CHANGE:
retina::codec::VideoFrame::new_parametersis now boxed. This allows shrinkingVideoFrameandCodecItemby 80 bytes each (on 64-bit platforms). The box is only rarely populated. - in
client mp4example, handle an initial video parameter change correctly.
- bugfix: Retina stopped receiving packets after receiving a keepalive response.
- BREAKING CHANGE:
Session<Playing>now directly implementsStreaminstead of throughpkts(). - Performance improvements.
- BREAKING CHANGE: Video frames are now provided as a single, contiguous
Bytes, and H.264 depacketization is more efficient (#4).
Initial release.