blakeblackshear / frigate

NVR with realtime local object detection for IP cameras
https://frigate.video
MIT License
19.21k stars 1.76k forks source link

[Support]: The media could not be loaded #4086

Closed sbelongie closed 1 year ago

sbelongie commented 2 years ago

Describe the problem you are having

Having an issue with just one camera. It looks like a few days ago one of my cameras stopped being able to playback video in the browswer. I am able to download the file and play it though.

The error I am getting is: The media could not be loaded, either because the server or network failed or because the format is not supported.

Version

0.11.1-2EADA21

Frigate config file

mqtt:
  host: 192.168.1.xxx
  user: xxxx
  password: password
  stats_interval: 60
#logger:
  # Optional: default log level (default: shown below)
#  default: debug
  # Optional: module by module log level configuration
 # logs:
 #   frigate.http: debug

record:
  events:
    # Optional: Number of seconds before the event to include (default: shown below)
    pre_capture: 10
    # Optional: Number of seconds after the event to include (default: shown below)
    post_capture: 20

cameras:
  backyard_north:
    ffmpeg:
      inputs:
        - path: rtsp://user:Password@192.168.1.x:554/live
          roles:
            - record
            - rtmp
        - path: rtsp://user:Password@192.168.1.x:554/cam/realmonitor?channel=1&subtype=1
          roles:
           - detect     
    detect:
      width: 1280
      height: 720
      fps: 5
    record:
      enabled: true
      retain:
        days: 10
        mode: all
      events:
        retain:
          default: 15
          mode: motion
    snapshots:
      enabled: True
      retain:
        default: 3      
    objects:
      track:
        - person
        - dog
        - cat
      filters:
        person:
          threshold: 0.74
  Backyard_south:
    ffmpeg:
      inputs:
        - path: rtsp://user:Password@192.168.1.x:554/live
          roles:
            - record
            - rtmp
        - path: rtsp://user:Password@192.168.1.x:554/cam/realmonitor?channel=1&subtype=1
          roles:
           - detect     
    detect:
      width: 1280
      height: 720
      fps: 5
      stationary:
        interval: 0
        threshold: 50
    record:
      enabled: true
      retain:
        days: 10
        mode: all
      events:
        retain:
          default: 15
          mode: motion       
    snapshots:
      enabled: True
      retain:
        default: 3      
    objects:
      track:
        - person
        - dog
        - cat
      filters:
        person:
          threshold: 0.74
  Front_doorbell:
    ffmpeg:
      inputs:
        - path: rtsp:user:Password@192.168.1.x:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif
          roles:
            - record
            - rtmp
        - path: rtsp:user:Password@192.168.1.x:554/cam/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif
          roles:
           - detect     
    detect:
      width: 1280
      height: 720
      fps: 5
      stationary:
        interval: 0
        threshold: 50
    record:
      enabled: true
      retain:
        days: 10
        mode: all
      events:
        retain:
          default: 15
          mode: motion       
    snapshots:
      enabled: True
      retain:
        default: 3      
    objects:
      track:
        - person
        - dog
        - cat
        - car
        - bicycle
        - motorcycle
        - bird
      filters:
        car:
          mask:
            - 1280,377,1280,511,968,470,970,382
        person:
          threshold: 0.60

ffmpeg:
  output_args:
     record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -c:a aac
  hwaccel_args:
    -c:v h264_qsv
birdseye:
  enabled: false

Relevant log output

none at this time

FFprobe output from your camera

none at this time

Frigate stats

No response

Operating system

UNRAID

Install method

Docker Compose

Coral version

CPU (no coral)

Network connection

Wired

Camera make and model

amcrest AD410

Any other information that may be helpful

No response

NickM-27 commented 2 years ago

My AD410 is working as expected, you'll want to make sure it is set to h.264 as the encoding and not h.265

sbelongie commented 2 years ago

My AD410 is working as expected, you'll want to make sure it is set to h.264 as the encoding and not h.265

yes that setting is correct already. This just started to happen a few days ago so I am thinking it is a frontend or database issue. I am not sure though.

sbelongie commented 2 years ago

I deleted the database and that seems to have fixed the issue. Any ideas on why I had to recreate the database?

NickM-27 commented 2 years ago

Interesting, it may have been a bad database entry. I saw that once many months ago but haven't been able to reproduce it.

conorlap commented 2 years ago

Same issue happening here with Amcrest AD410. Had to delete database to fix it but unfortunately the issue appeared again after a few days

floari commented 2 years ago

Same issue here after the recent update.

aervig commented 1 year ago

I had the same problem, I recreated the camera with a new name and it started to work again. Probably some corrupts recording files..

NickM-27 commented 1 year ago

We pin pointed how this happens with corrupt recording files and it's been fixed for 0.12

esmoyer commented 1 year ago

Glad I found this. My instance has been truckin' along just fine but have noticed in the last couple of weeks that loading clips takes a long time and will sometimes give that error. I figured maybe the DB needed some sort of optimizing or something, but eager to hopefully see a fix!

heisenberg2980 commented 1 year ago

Glad to hear this will be fixed in the next release. I cannot playback video from couple of my cameras and I couldn´t figure out the issue as the settings of these cameras are exactly the same as the other cameras. Looking forward to get 0.12

NickM-27 commented 1 year ago

It should be noted that this won't be retroactively fixed, the db will need to be cleared out or bad recordings files deleted

heisenberg2980 commented 1 year ago

Is there a way to know what the bad recordings are and delete only those instead of having to delete all the files and the whole db?

NickM-27 commented 1 year ago

Yes, open http://frigate_ip:5000/api/<camera_name>/recordings and look for end_time with values much higher than the others.

heisenberg2980 commented 1 year ago

Thanks @NickM-27, I found multiple recordings with endtime in the future (year 2075), and after deleting those records from the database the issue is fixed

heisenberg2980 commented 1 year ago

it's been fixed for 0.12

Is there any ETA of when 0.12 will be released?

NickM-27 commented 1 year ago

You can follow the progress here https://github.com/blakeblackshear/frigate/pull/4055

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.