core: Camera streams not working

The problem

Camera streams are broken for me in 0.115.0b2. The snapshots in the cards update, but no stream shows, not even static images. At best I get errors in the log file (below)

Environment

Problem-relevant configuration.yaml

camera:
- platform: local_file
  name: "Front camera from Doods"
  file_path: "/data/homeassistant/cameras/front_camera_latest.jpg"
- platform: generic
  name: 'Front camera'
  still_image_url: !secret front_camera_image
  stream_source: !secret front_camera_stream
  username: !secret front_camera_user
  password: !secret front_camera_pass
  authentication: basic
- platform: mjpeg
  name: 'Front camera motion'
  still_image_url: !secret front_motion_still
  mjpeg_url: !secret front_motion_mjpeg

Traceback/Error logs

2020-09-09 12:04:12 ERROR (stream_worker) [libav.rtsp] Undefined type (31)
2020-09-09 12:04:12 ERROR (stream_worker) [libav.h264] FMO not supported
2020-09-09 12:04:12 ERROR (stream_worker) [libav.h264] non-existing PPS 2 referenced
2020-09-09 12:04:12 ERROR (stream_worker) [libav.Eval] Undefined constant or missing '(' in 'skip_sidx'
2020-09-09 12:04:12 ERROR (stream_worker) [libav.mp4 muxer] Unable to parse option value "skip_sidx+frag_discont"
2020-09-09 12:04:12 ERROR (stream_worker) [libav.mp4 muxer] Error setting option movflags to value frag_custom+empty_moov+default_base_moof+skip_sidx+frag_discont.
2020-09-09 12:04:12 ERROR (stream_worker) [homeassistant.components.stream.worker] Stream connection failed: rtsp://192.168.1.42/ISAPI/Streaming/channels/101/
Traceback (most recent call last):
  File "/srv/ha_venv/3.8.5/lib/python3.8/site-packages/homeassistant/components/stream/worker.py", line 45, in stream_worker
    _stream_worker_internal(hass, stream, quit_event)
  File "/srv/ha_venv/3.8.5/lib/python3.8/site-packages/homeassistant/components/stream/worker.py", line 243, in _stream_worker_internal
    mux_video_packet(packet)  # mutates packet timestamps
  File "/srv/ha_venv/3.8.5/lib/python3.8/site-packages/homeassistant/components/stream/worker.py", line 173, in mux_video_packet
    buffer.output.mux(packet)
  File "av/container/output.pyx", line 204, in av.container.output.OutputContainer.mux
  File "av/container/output.pyx", line 210, in av.container.output.OutputContainer.mux_one
  File "av/container/output.pyx", line 180, in av.container.output.OutputContainer.start_encoding
  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: '<none>'; last error log: [mp4 muxer] Error setting option movflags to value frag_custom+empty_moov+default_base_moof+skip_sidx+frag_discont.
2020-09-09 12:04:47 ERROR (stream_worker) [libav.Eval] Undefined constant or missing '(' in 'skip_sidx'
2020-09-09 12:04:47 ERROR (stream_worker) [libav.mp4 muxer] Unable to parse option value "skip_sidx+frag_discont"
2020-09-09 12:04:47 ERROR (stream_worker) [libav.mp4 muxer] Error setting option movflags to value frag_custom+empty_moov+default_base_moof+skip_sidx+frag_discont.
2020-09-09 12:04:47 ERROR (stream_worker) [homeassistant.components.stream.worker] Stream connection failed: rtsp://192.168.1.42/ISAPI/Streaming/channels/101/
Traceback (most recent call last):
  File "/srv/ha_venv/3.8.5/lib/python3.8/site-packages/homeassistant/components/stream/worker.py", line 45, in stream_worker
    _stream_worker_internal(hass, stream, quit_event)
  File "/srv/ha_venv/3.8.5/lib/python3.8/site-packages/homeassistant/components/stream/worker.py", line 243, in _stream_worker_internal
    mux_video_packet(packet)  # mutates packet timestamps
  File "/srv/ha_venv/3.8.5/lib/python3.8/site-packages/homeassistant/components/stream/worker.py", line 173, in mux_video_packet
    buffer.output.mux(packet)
  File "av/container/output.pyx", line 204, in av.container.output.OutputContainer.mux
  File "av/container/output.pyx", line 210, in av.container.output.OutputContainer.mux_one
  File "av/container/output.pyx", line 180, in av.container.output.OutputContainer.start_encoding
  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: '<none>'; last error log: [mp4 muxer] Error setting option movflags to value frag_custom+empty_moov+default_base_moof+skip_sidx+frag_discont.

Additional information

ffmpeg version 4.2.2

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 45 (28 by maintainers)

Most upvoted comments

Reproducing the exact same error on current dev (commit 5117a16) with the Synology DSM integration : #39937

It includes commit “Updated frontend to 20200909.0 (#39869)” from 0.115.0b5

Environnement: venv with macOS

This doesn’t seem like the exact same error…

The MJPEG/non-stream related portion of this ticket is resolved in 0.115.0b5

I think this may also be two separate issues. There was a frontend issue where MJPEG streams weren’t showing correctly that should be fixed in an upcoming beta, but the one where the camera does support stream (generic with stream_source set) is what’s throwing the other errors.