Camera.record don't build correct index in mp4 videos

Hello, I have been recording my cameras for a long time using the camera.record service with code similar to this:

- service: camera.record
    data:
      entity_id: camera.patio
      filename: '/config/tmp/records/patio/{{ now().strftime("%Y%m%d-%H%M%S") }}.mp4'
      duration: 30
      lookback: 5

the generated files seem correct, but when I play them in any player they don’t seem to have the index well built. The player cannot interpret the duration of the video and it is not possible to advance or rewind the mp4 file.

Is there any solution or another way to do my records?.

Thanks in advance

The mp4 video length issue should be fixed in the next HA release (.110). I had reported it via Github as a stream/record issue a few weeks ago, and @hunterjm implemented an update to solve it.

BTW - some players overlook this problem (such as the one built into Chrome). There is a workaround using ffmpeg to remux the file and create a valid length (which I’m using now). If you need help with that, let me know. Or just wait for .110.

Oh! Perfect, I will wait, 110 is very close. Thank you!