RTSP Camera stream not working (Reolink RLC-810A)

Hi, I’m trying to stream directly from a camera, using a rtsp H264 stream. But I get the following error in my logs:

av.error.PermissionError: [Errno 1] Operation not permitted: '<none>'; last error log: [mp4] Malformed AAC bitstream detected: use the audio bitstream filter 'aac_adtstoasc' to fix it ('-bsf:a aac_adtstoasc' option with ffmpeg)

Can someone point me in a direction, on how to fix this?

1 Like

Hi, I have the same problem with the camera Reolink RLC-510A

2021-02-15 23:11:03 ERROR (stream_worker) [libav.mp4] Malformed AAC bitstream detected: use the audio bitstream filter 'aac_adtstoasc' to fix it ('-bsf:a aac_adtstoasc' option with ffmpeg)
2021-02-15 23:11:03 ERROR (stream_worker) [homeassistant.components.stream.worker] Stream connection failed: rtsp://admin:[email protected]:554/h264Preview_01_sub
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/stream/worker.py", line 56, in stream_worker
_stream_worker_internal(hass, stream, quit_event)
File "/usr/src/homeassistant/homeassistant/components/stream/worker.py", line 293, in _stream_worker_internal
mux_video_packet(packet) # mutates packet timestamps
File "/usr/src/homeassistant/homeassistant/components/stream/worker.py", line 213, 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 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.PermissionError: [Errno 1] Operation not permitted: '<none>'; last error log: [mp4] Malformed AAC bitstream detected: use the audio bitstream filter 'aac_adtstoasc' to fix it ('-bsf:a aac_adtstoasc' option with ffmpeg)

System Health

version core-2021.2.3
installation_type Home Assistant Supervised
dev false
hassio true
docker true
virtualenv false
python_version 3.8.7
os_name Linux
os_version 4.19.0-9-amd64
arch x86_64

i have the same problem with a RLC-820A.
both the main stream on H265 and the sub strem on H264 have this problem.

i tried the following with no luck:

- platform: ffmpeg
  name: Camera meterkast sub
  input: !secret Camera_meterkast_sub
  extra_arguments: '-bsf:a aac_adtstoasc'

I have entered an issue on Github for this item:
# Stream - Malformed AAC bitstream detected #47084

1 Like

I thought of getting a Reolink 810A but I saw this, is this still a problem?

i just got this camera.
i tried to open the stream via VLC but got errors as well. has anyone solved this issue?
rtsp://admin:[email protected]:554/videoMain

I’ve been able to open the streams via VLC.

Note that the higher quality main is h265:
rtsp://user:[email protected]:554/h265Preview_01_main
rtsp://user:[email protected]:554/h264Preview_01_sub

The still image seems to work in HA, but using the generic camera component I’m unable to load the main stream altogether, the sub stream worked a little once or twice.

I do see this warning in the log:
ADTS AAC detected - disabling audio stream

the streams work in VLC but i a portion of the main stream has a green box covering 1/4 of the picture. very annoying. i got Amcrest cameras instead

You get a portion green in VLC or in HA?

I know there’s a privacy option in the web-portal of the Reolink RLC-810A camera, you can obscure parts of the image with black squares.