Commit Graph

193 Commits (9008006ac813736be92c5ba4c84e826e6d1f8c34)

Author SHA1 Message Date
Marc Mueller 63d519c1a8
Spelling updates () 2022-11-28 16:51:43 +01:00
uvjustin 6bab63fb0a
Redact more credentials in stream URL query params ()
Co-authored-by: Allen Porter <allen.porter@gmail.com>
2022-11-15 12:42:40 +08:00
uvjustin ee910bd0e4
Refactor camera stream settings () 2022-11-13 01:22:59 +08:00
uvjustin 84725f15a6
Use IntEnum for stream orientation ()
* Use IntEnum for stream orientation

* Rename enum values

* Add comments

* Fix import
2022-11-09 07:28:28 -08:00
Aarni Koskela 738419309d
Add numpy requirement to stream ()
Closes https://github.com/home-assistant/core/pull/81790
2022-11-09 12:22:14 +01:00
Erik Montnemery 3aa64aaaf1
Mark some integrations as system integrations () 2022-10-25 15:30:46 +02:00
uvjustin 3b78df07de
Use empty_moov in stream recorder () 2022-10-21 22:34:03 +08:00
uvjustin eb141a532c
Bump ha-av to v10.0.0 () 2022-10-20 00:06:49 +03:00
uvjustin d38d21ab3a
Fix stream recorder with orientation transforms ()
Find moov instead of using fixed location
2022-10-17 21:12:45 -04:00
uvjustin 2d7b364713
Bump ha-av to v10.0.0.b5 () 2022-09-26 10:52:03 +02:00
uvjustin 852b0caf5b
Add orientation transforms to stream () 2022-09-06 13:31:36 +08:00
uvjustin bb77af71ff
Use fragmented mp4 in stream recorder () 2022-09-06 13:30:55 +08:00
uvjustin 5e6217f20c
Use executor to finish stream recording () 2022-07-27 14:13:38 +08:00
uvjustin b71e3397fd
Add error message for duplicate stream recordings () 2022-07-23 08:40:45 -07:00
uvjustin a612d7a0f3
Round up for stream record lookback () 2022-07-22 11:46:00 +08:00
uvjustin 2f92c47fe3
Apply filter to libav.hls logging namespace () 2022-07-16 14:07:47 -07:00
uvjustin 75892385bb
Fix playback of hls cameras in stream () 2022-07-14 12:24:24 -07:00
Franck Nijhof d244d06711
Update PyTurboJPEG to 1.6.7 () 2022-07-11 13:21:37 +02:00
uvjustin f45afe7379
Use bitstream filter to allow ADTS AAC audio in stream () 2022-06-29 10:15:22 +02:00
uvjustin fef21c02ee
Clean up disabling audio in stream () 2022-06-28 01:56:10 +02:00
uvjustin 03246d2649
Use ha-av instead of av and bump to v10.0.0b3 ()
* Use ha-av instead of av and bump to v10.0.0b1

* Change generic

* Use v10.0.0b2

* Use v10.0.0b3
2022-06-22 13:38:44 +02:00
uvjustin 7a3f632c1d
Make stream recorder work concurrently () 2022-06-18 05:13:07 +10:00
uvjustin f276523ef3
Ignore in progress segment when adding stream recorder lookback () 2022-06-17 11:07:08 +10:00
uvjustin 01a4a83bab
Improve stream playback on high latency cameras ()
* Disable LL-HLS for HLS sources
* Add extra wait for Nest cameras
2022-06-17 01:48:52 +10:00
uvjustin 73f2bca377
Make Stream.stop() async ()
* Make Stream.start() async
* Stop streams concurrently on shutdown
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-06-08 00:10:53 +08:00
uvjustin c2612d1ade
Remove cache control headers from stream () 2022-05-23 13:56:26 +08:00
uvjustin 0608506bac
Reuse codec_context on stream thread restart () 2022-05-16 20:52:48 -07:00
uvjustin 32b3ce5727
Clean up use_wallclock_as_timestamps in generic () 2022-05-16 09:06:54 -07:00
uvjustin 221b77297e
Declare exports from stream explicitly () 2022-05-15 17:58:57 +02:00
uvjustin 617b0d04dc
Decouple stream options from PyAV options ()
Co-authored-by: Allen Porter <allen.porter@gmail.com>
2022-05-14 23:31:18 -07:00
uvjustin 06c80e454b
Use av instead of ha-av () 2022-04-27 16:08:05 +02:00
uvjustin 9281f46bcd
Skip invalid segments in stream recorder ()
* Skip segment if duration is None

* Copy segments deque before passing to thread
2022-04-27 15:36:09 +02:00
uvjustin 44e9146463
Use ha-av instead of av and bump to v9.1.1-3 () 2022-04-14 13:36:25 +10:00
J. Nick Koston 32a10648a5
Downgrade av to 8.1.0 to fix memory leak () 2022-04-10 22:58:30 -07:00
Allen Porter 5027e1bcff
Mark stream available on idle timeout ()
Mark stream as available on idle timeout so that the frontend can
still interact with it. In particular, the Frontend won't interact
with camera objects that are not available e.g. from picture glance
card.

Issue 
2022-03-19 10:24:32 -07:00
Allen Porter 41a032e3e3
Add diagnostics to stream's Stream objects ()
* Add diagnostics to stream's Stream objects

Add diagnostics key/value pair to the Stream object. Diagnostics support
in camera integration will be added in a follow up and will access the
diagnostics on the Stream object, similar to the examples in the unit
test.

* Rename to audio/video codec

* Fix test codec names

* Update tests/components/stream/test_worker.py

Co-authored-by: uvjustin <46082645+uvjustin@users.noreply.github.com>

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: uvjustin <46082645+uvjustin@users.noreply.github.com>
2022-03-18 07:40:09 -07:00
uvjustin accc4fda28
Bump PyAV to v9.0.0 () 2022-03-08 07:53:17 -08:00
Franck Nijhof 63957787c4
Update PyTurboJPEG to 1.6.6 () 2022-03-07 23:26:30 +01:00
Marc Mueller ec980a574b
Improve typing [util.decorator] () 2022-02-23 20:58:42 +01:00
uvjustin 4efada7db0
Allow stream log level to change at runtime () 2022-02-21 17:58:15 +01:00
Allen Porter b016259206
Reset the stream backoff timeout when the url updates ()
Reset the stream backoff timeout when the url updates, meant to improve the retry behavior
for nest cameras. The problem is the nest url updates faster than the stream reset time
so the wait timeout never resets if there is a temporarily problem with the new url. In particular
this *may* help with the flaky cloud nest urls, but seems more correct otherwise.
2022-02-13 07:09:37 -08:00
Allen Porter 0a128d006f
Improve stream robustness by always retrying worker ()
Improve stream robustness by always retrying in the worker on failure, rather than only when
keepalive is enabled.

This will make cloud cameras like nest more robust, since they have a tendency to be flaky. This
is also needed to improve client side retry behavior because when the client attempts to retry,
the stream token is already revoked because the worker stopped.

The worker will still idle timeout if no streams are present, so it won't go on forever if no
frontend is viewing the stream.
2022-02-12 20:59:11 -08:00
Allen Porter 2e54daa61f
Redact stream url credentials in debug logging () 2022-02-12 14:03:26 -08:00
Allen Porter 24418417fd
Fix nest streams that get stuck broken () 2022-02-11 13:17:19 -08:00
J. Nick Koston 5b755b74fb
Add loggers to integration manifest.json () 2022-01-28 13:37:53 -08:00
Allen Porter e74fe0e390
Enable Low Latency HLS (LL-HLS) by default to lower stream latency () 2022-01-23 15:38:29 +01:00
Franck Nijhof c339233421
Update PyTurboJPEG to 1.6.5 () 2022-01-10 13:28:04 +01:00
Franck Nijhof 31f37f3363
Update PyTurboJPEG to 1.6.4 () 2022-01-06 08:56:39 -08:00
Marc Mueller 04e1933728
Use correct relative imports [n-z] () 2022-01-05 17:23:49 +01:00
uvjustin 849dc0e53a
Use original PyAv in stream () 2021-12-30 10:54:25 -08:00