* Handle stream failures in recorder
Fail gracefully with an error message when the recorder is invoked with no segments due to a stream failure.
* Update homeassistant/components/stream/recorder.py
Co-authored-by: uvjustin <46082645+uvjustin@users.noreply.github.com>
Co-authored-by: uvjustin <46082645+uvjustin@users.noreply.github.com>
* Add discontinuity support to stream recorder
* Use same container options for both StreamOutputs
* Fix pts adjuster
* Remove redundant/incorrect duplicate hls segment check
* Use same StreamBuffer across outputs
* Remove keepalive check for recorder
* Set output video timescale explicitly
* Disable avoid_negative_ts
Separate the HLS stream view logic out of StreamOutput since the hls
stream view is about to get more complex to track discontinuities. This
makes the idle timeout, shutdown, and coupling between hls and record
more explicit.
* Remove dependencies on keepalive from StremaOutput and stream_worker
Pull logic from StreamOutput and stream_worker into the Stream
class, unifying keepalive and idle timeout logic. This prepares
for future changes to preserve hls state across stream url changes.
* Remove unnecessary pts adjustments
* Add comments
* Use -inf for initial last_dts to be more clear
* Use video first_pts as common adjuster in recorder
* Remove seek(0) before av.open
* Add audio to stream component
* Use container options to do most fmp4 formatting
* Add test for treatment of different audio inputs
* Add test for treatment of different audio inputs
* pcm_mulaw frames should be s16
* Use seek to get BytesIO length
* Remove unused utcnow
* Remove peek_next_audio_pts
* only demux audio and video packets - ignoring data and subtitle streams
Co-authored-by: Jason Hunter <hunterjm@gmail.com>