Skip to content

Releases

v0.10.39: normalise the timestamps

Choose a tag to compare

@gnacho gnacho released this 06 Nov 06:10

The sound now survives the trip to the consumer.

Fixed

  • The doorbell stamps its frames with the device clock, milliseconds since an
    epoch well past 32 bits. Converting that straight to 90 kHz wrapped and left
    meaningless presentation timestamps. Video survived because a demuxer can
    resynchronise on start codes, but the audio packets were dropped: a 20 second
    capture through RTSP carried 126 undecodable packets instead of about a
    thousand.
  • Each track is now referenced to its first frame, so it starts at zero and
    grows with the real spacing.

Verified

  • TestTSMuxerNormalisesEpochTimestamps feeds epoch-sized marks and checks the
    first is zero, the second is the real difference, and that audio keeps its own
    origin. TestTSMuxerPTSIsMonotonic and TestTSMuxerNeverRepeatsAPTS updated
    to the new semantics.
  • In the container, a 25 second capture now carries 9,147 audio payloads with
    sound and only 615 of filler silence, where the old one had a single silence
    frame.
  • gofmt, go vet clean, full suite green in 9.1 s.

Not verified

  • Decoding the sound through RTSP with this version: pending deploy.

v0.10.38: mux the audio

Choose a tag to compare

@gnacho gnacho released this 06 Nov 05:59

The visitor can be heard, and the two new knobs are in the interface.

Fixed

  • The audio branch required a separate audioOut writer, but in MPEG-TS mode
    there is none: the sound goes into the muxer. So the remote audio of the
    doorbell never reached the consumer, and a session log said audio=0 while
    the stream announced PCMA and only the filler silence came out.
  • Both paths now go through writeAudioFrame, which returns whether it actually
    wrote, so the counter reflects reality.

Added

  • trickle_ms (default 20, 0 disables the filler) and lock_wait (default 300,
    0 fails at once) as add-on options, next to open_settle.

Verified

  • TestWriteAudioFrameGoesIntoTheMuxer, TestWriteAudioFrameFallsBackToTheWriter,
    TestWriteAudioFrameWithoutSinkWritesNothing and TestWriteAudioFrameSkipsEmptyFrames.
  • gofmt, go vet clean, full suite green in 9.1 s, coverage 63.9%.

Not verified

  • That audio content reaches Home Assistant: needs this version deployed and a
    live session with the bell awake, checking the frame counter in the log.

v0.10.37: renew the cloud session

Choose a tag to compare

@gnacho gnacho released this 06 Nov 05:41

The daemon no longer keeps talking into a dead session.

Fixed

  • After a few hours up, the API answered every cloud call with a timeout
    (get-device-list, get-device-token) while the same credentials worked from
    a fresh process and the container reached the vendor host fine. The duplex
    channels behind the stored session die silently and the daemon kept using them.
  • The device list, the device token and the periodic check now go through a
    wrapper that renews the session and retries once when the error looks like a
    dead connection, and keeps the original error when the renewal fails.

Verified

  • TestStaleSessionDetectsDeadConnections, TestCloudCallDoesNotRetryOtherErrors
    and TestCloudCallKeepsOriginalErrorWhenReloginFails.
  • gofmt, go vet clean, full suite green in 8.6 s, coverage 62.7%.

Not verified

  • The renewal itself against the real vendor cloud: it needs a session that dies
    while the process stays up.

v0.10.36: wait for the lock

Choose a tag to compare

@gnacho gnacho released this 06 Nov 00:13

A second viewer no longer gets a silent stream.

Fixed

  • go2rtc spawns one producer per viewer. If the previous producer had not
    released the video lock, the new one exited at once and wrote nothing, so the
    stream had no tracks and DESCRIBE hung until the timeout. Measured: first
    ffprobe answered in 3.9 s, the second timed out at 15 s.
  • The producer now writes its header and starts the filler before asking for the
    lock, and waits for it instead of giving up. A new viewer gets tracks straight
    away and picks up the real session when the previous one ends.

Verified

  • TestAcquireVideoLockWaitTakesOver releases the lock from another goroutine
    and checks the waiter takes over, TestAcquireVideoLockWaitGivesUpWhenAskedNotToWait
    covers the zero wait, TestLockWaitDefault the default of 300 s.
  • gofmt, go vet clean, full suite green in 8.6 s.

Not verified

  • Two consecutive viewers against the add-on with this version: pending deploy.

v0.10.35: feed the video track

Choose a tag to compare

@gnacho gnacho released this 06 Nov 00:10

The stream now carries a picture, not only silence, while the tunnel comes up.

Fixed

  • v0.10.34 added G711A silence every 20 ms, but that is not what go2rtc waits
    for: measured in the container the pipe carried about 9 KB per second and
    DESCRIBE still timed out.
  • The wait now also writes a 99-byte gray IDR, with its own SPS and PPS, every
    100 ms, so the demuxer sees a real video frame straight away.

Verified

  • TestAudioTrickleWritesVideoFrames finds the IDR bytes inside the PES the
    muxer produced, and the earlier trickle tests still pass.
  • gofmt, go vet clean, full suite green in 8.1 s.

Not verified

  • The RTSP start time against the add-on with this version: pending deploy.

v0.10.34: keep the stream fed

Choose a tag to compare

@gnacho gnacho released this 06 Nov 00:00

The stream no longer stays silent while the tunnel comes up.

Fixed

  • go2rtc publishes a stream only once its demuxer has carried media, and it does
    not answer RTSP DESCRIBE before that. With the doorbell asleep the tunnel
    takes tens of seconds, and until then the producer had written just the header
    and one silence frame, so a viewer waited about thirty seconds (ffprobe
    printed nothing within eight).
  • A goroutine now writes G711A silence every 20 ms while the tunnel is being
    established, and stops right before the real frames start, so there is never
    more than one writer.

Verified

  • TestAudioTrickleKeepsWriting checks that it writes continuously and that
    after stopping it writes nothing more, and that stopping twice is harmless.
  • TestTrickleInterval covers WIBOX_TRICKLE_MS (default 20, 0 disables).
  • gofmt, go vet clean, full suite green in 8.0 s.

Not verified

  • The real RTSP start time against the add-on: the measurement needs this
    version deployed with the doorbell asleep. If it still waits, the trickle is
    not what go2rtc is waiting for and the next step is serving RTSP ourselves.

v0.10.33: only a successful open keeps the bell busy

Choose a tag to compare

@gnacho gnacho released this 05 Nov 23:32

The wait after opening now only applies when the opening actually worked.

Fixed

  • 0.10.32 recorded every opening, including the failed ones, so a 503 or a
    failed retry delayed the next view by the whole settle window for nothing.
  • Only a successful opening (rc == 0, no error) leaves the marker the video
    process waits on.

Verified

  • TestRecordOpenOnlyMarksSuccessfulOpens: an opening with an error and one
    with a non-zero return code leave no marker, a successful one leaves it and
    opens the window.
  • gofmt, go vet clean, full suite green in 8.0 s, coverage 64.4% against a CI
    floor of 62%.

Not verified

  • The end-to-end open-then-watch sequence against the physical bell, which needs
    a waking window.

v0.10.32: let the bell release an open

Choose a tag to compare

@gnacho gnacho released this 05 Nov 23:29

After opening the door, watching the video right away no longer gets stuck.

Fixed

  • Opening the door keeps the bell's single session busy for a while, so a video
    process started a second later waited forever at p2pconnect: the whole stream
    stayed at the exec producer with no consumers and nothing ever arrived.
  • The daemon now remembers when it opened (<video.lock>.lastopen, unix
    nanoseconds) and the video process waits for the rest of that window before
    dialling, instead of colliding with the open.
  • WIBOX_OPEN_SETTLE (add-on option open_settle, default 75 s, 0 disables)
    sets the window. With 0 the old behaviour is back.

Verified

  • open_settle_test.go covers the window maths, a corrupt marker file, the
    no-lock no-op and the wait itself (40 ms window).
  • gofmt, go vet clean, full suite green in 8.0 s, coverage 64.3% against a CI
    floor of 62%.

Not verified

  • The end-to-end sequence open-then-watch against the physical bell: it needs a
    waking window, and the doorbell sleeps after about thirty seconds.

v0.10.31: forward frames before the keyframe

Choose a tag to compare

@gnacho gnacho released this 05 Nov 23:16

Frames can reach the viewer before the first keyframe.

Added

  • WIBOX_VIDEO_ALL_FRAMES, exposed as the video_all_frames option (off by
    default). Until now every video frame before the first IDR was discarded, and
    the doorbell can go a minute and a half, or the whole session, without one, so
    a consumer received audio only.
  • With the option on, every frame is forwarded. Colours are wrong until a
    keyframe arrives, but there is a picture and the stream stays well formed.

Fixed

  • The G711A audio was written twice when the output is MPEG-TS: once inside the
    transport stream and once on stderr, which go2rtc collects as process log.

Verified

  • TestShouldSkipFrame covers the five combinations of the discard rule,
    TestEnvFlag the truth values, TestMpegtsEnabled the muxed output switch.
  • gofmt, go vet clean, full suite green in 8.0 s, coverage 64.1% against a CI
    floor of 62%.

Not verified

  • The live picture in Home Assistant: needs a waking window and the option
    enabled in the add-on.

v0.10.30: audio frame in the opening header

Choose a tag to compare

@gnacho gnacho released this 05 Nov 22:54

The RTSP endpoint answers in milliseconds instead of half a minute.

Fixed

  • go2rtc probes a pipe source by waiting for one packet of every stream type
    the PMT announces. Our PMT declared the G711A track, but no audio packet ever
    followed, so the probe never finished: the producer was not created and the
    RTSP server did not answer a DESCRIBE until the doorbell sent real media,
    which took about 32 seconds with the bell asleep.
  • The opening header now carries one frame of G711A silence, written before
    dialling, which closes the probe immediately.

Verified

  • Read from go2rtc 1.9.15 sources (pkg/mpegts/producer.go probe waits for
    every stream type the PMT lists, including StreamTypePCMATapo 0x90).
  • A small program that calls mpegts.Open on the raw header: the old 564-byte
    header ends in ERROR: EOF, the new 752-byte header yields
    media=video codec=H264 and media=audio codec=PCMA.
  • Local go2rtc with the same version as the add-on now logs
    run pipe launch=2.318ms and answers DESCRIBE with both tracks in 3 to 11
    milliseconds, where before it hung inside the probe.
  • TestStreamHeaderCarriesBothTracks walks the TS packets of the header and
    requires PAT, PMT, video and audio. gofmt, go vet clean, suite green in
    7.9 s, coverage 64.0% against a CI floor of 62%.

Not verified

  • The add-on itself, which this release is about to be deployed to.
  • The picture: the doorbell still sends no keyframe (issue #6).