Camera.record problem (edit: not) solved

Hi guys. I had a problem with the camera.record service on a raspberrypi2

HA version is 0.91.4

on the service page i used

camera.record with the following options:

{
"entity_id": "camera.haustuer",
"filename": "/tmp/alarm.mp4",
"duration": "5"
}

Errormessage:
2019-04-20 07:42:15 ERROR (stream_worker) [libav.h264] error while decoding MB 17 15, bytestream -39

I could fix the problem by installing libav-tools

sudo apt-get install libav-tools

sorry for the wrong information… i still have the issue

new error:

019-04-20 07:47:11 ERROR (recorder_save_worker) [libav.h264] left block unavailable for requested intra4x4 mode -1
2019-04-20 07:47:11 ERROR (recorder_save_worker) [libav.h264] error while decoding MB 0 14, bytestream 59623
2019-04-20 07:47:11 ERROR (recorder_save_worker) [libav.h264] left block unavailable for requested intra4x4 mode -1
2019-04-20 07:47:11 ERROR (recorder_save_worker) [libav.h264] error while decoding MB 0 23, bytestream 33919

You might try to turn on “preload stream” for the camera that you’re trying to record. I think that “fixed” the problem when I had similar error messages. In my case, I was trying to record with a “lookback”:

- service: camera.record
  data:
    entity_id: camera.cam6
    filename: /config/www/snaps/cam6.mp4
    duration: 15
    lookback: 10

which I thought was causing the problem. I did not install libav-tools and am running 0.91.2 via the docker container image.

1 Like

preload stream made it work. thank you