RTSP camera stream not working correctly

Hi,

I’m using an rtsp camera in HomeAssistant:

stream:
ffmpeg:
camera:
  - platform: ffmpeg
    name: Flur EG Kamera
    input: -rtsp_transport tcp -i rtsp://192.168.178.189/ch0_1.h264

The still camera picture in lovelace works fine, but the stream not:

There are some errors in the logs as well:

2019-10-10 13:04:28 ERROR (stream_worker) [libav.NULL] SEI type 192 size 1720 truncated at 1432
2019-10-10 13:04:38 ERROR (stream_worker) [libav.rtsp] nal size exceeds length: 3721 5
2019-10-10 13:05:07 ERROR (stream_worker) [libav.NULL] SEI type 161 size 1832 truncated at 792
2019-10-10 13:05:44 ERROR (stream_worker) [libav.NULL] SEI type 2 size 984 truncated at 336
2019-10-10 13:06:09 ERROR (stream_worker) [libav.NULL] non-existing PPS 2 referenced
2019-10-10 13:06:24 ERROR (stream_worker) [libav.NULL] SEI type 229 size 1080 truncated at 472
2019-10-10 13:07:05 ERROR (stream_worker) [libav.NULL] SEI type 16 size 1688 truncated at 1088
2019-10-10 13:07:05 ERROR (stream_worker) [libav.NULL] SEI type 135 size 336 truncated at 312
2019-10-10 13:07:31 ERROR (stream_worker) [libav.rtsp] Undefined type (30)
2019-10-10 13:08:57 ERROR (stream_worker) [libav.NULL] SEI type 93 size 200 truncated at 56
2019-10-10 13:09:36 ERROR (stream_worker) [libav.NULL] SEI type 86 size 1776 truncated at 1192
2019-10-10 13:10:21 ERROR (stream_worker) [libav.NULL] sps_id 4 out of range
2019-10-10 13:10:24 ERROR (stream_worker) [libav.NULL] SEI type 226 size 1680 truncated at 48
2019-10-10 13:10:55 ERROR (stream_worker) [libav.NULL] SEI type 40 size 1488 truncated at 1472
2019-10-10 13:11:45 ERROR (stream_worker) [libav.rtsp] nal size exceeds length: 12811 5

Anyone an idea on how to fix this?

Best regards, Stefan

Hi, did you manage to solve this?

I found out that it was a camera related problem - the stream contained errors and was not standard comliant to h264.

My camera was a yi home, using this firmware: https://github.com/roleoroleo/yi-hack-6FUS_4.5.0/releases/tag/0.1.2
The firmware was fixed in a later release.