Closed Quentame closed 4 years ago
stream documentation stream source (message by IssueLinks)
Just seen #39850 that is the same issue when I try to stream on my local network, duplicates on this part. So I think we can unassign you @hunterjm
But when I'm out of my network, I think it's a different issue we can focus on, with @shenxn
Hey there @hunterjm, @uvjustin, mind taking a look at this issue as its been labeled with an integration (stream
) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)
Hey there @hacf-fr, mind taking a look at this issue as its been labeled with an integration (synology_dsm
) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)
@hunterjm Any idea why it would mux the same packet twice? We have the monotonicity check in there...
@hunterjm I think it might be from a rounding error when the packet rebases the time base: https://github.com/PyAV-Org/PyAV/blob/1fa8dd6a95336321feca69b66aebefb4f08d7e85/av/container/output.pyx#L216 I'll make a PR that uses the time base of the inputs and see if that fixes things.
@Quentame can you see if this PR fixes the local network problem? (The other problem seems unrelated.)
I went ahead and merged it since it won't really do any harm and he can then just update to the next dev docker build. Feel free to re-open this issue if it doesn't solve your problem.
It works fine.
Thanks for being so responsive 😍
@uvjustin I'm still getting this issue on version 2021.2.1. Any chance you could revisit this? Thank you!
2021-02-07 20:18:45 ERROR (recorder_save_worker) [libav.mp4] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 346578 >= 346545
2021-02-07 20:18:45 ERROR (recorder_save_worker) [root] Uncaught thread exception
Traceback (most recent call last):
File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/usr/src/homeassistant/homeassistant/components/stream/recorder.py", line 64, in recorder_save_worker
output.mux(packet)
File "av/container/output.pyx", line 204, in av.container.output.OutputContainer.mux
File "av/container/output.pyx", line 227, in av.container.output.OutputContainer.mux_one
File "av/container/core.pyx", line 257, in av.container.core.Container.err_check
File "av/error.pyx", line 336, in av.error.err_check
av.error.ValueError: [Errno 22] Invalid argument: '/tmp/camera_nas_1_hall_20210207-201832.mp4'; last error log: [mp4] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 346578 >= 346545
Exception ignored in: 'av.container.output.OutputContainer.__dealloc__'
Traceback (most recent call last):
File "av/container/output.pyx", line 25, in av.container.output.close_output
2021-02-07 20:18:53 ERROR (MainThread) [root] Uncaught exception
Traceback (most recent call last):
File "av/container/output.pyx", line 25, in av.container.output.close_output
TypeError: 'NoneType' object is not iterable
TypeError: 'NoneType' object is not iterable
Edit: It might be worth saying I'm streaming and recording at the same time. Not sure if that could cause issues with the monotonic clock?
@ruimarinho This issue looks similar but is not the same as the original one here. Please open another issue. The problem you have seems interesting and might be some kind of race condition with the threads. I forgot exactly what the original code looks like and @allenporter is in the middle of putting through quite a few changes so we can see if you still have the problem after those go through.
Thank you for the input @uvjustin. Added as https://github.com/home-assistant/core/issues/46299.
The problem
Using an Eufy Indoor Cam 2K throw the Synology Surveillance Station on dev, when I open the live stream it sometimes stops with an error.
On my local network:
When out of my local network, I got this all the time, no stream at all (maybe wrong IP/host):
Environment
Traceback/Error logs
Additional information
Camera platform added on dev with #39838, ping @shenxn