Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Support]: Clips are saving as html (so not saving) #2536

Closed
NickM-27 opened this issue Dec 29, 2021 · 9 comments
Closed

[Support]: Clips are saving as html (so not saving) #2536

NickM-27 opened this issue Dec 29, 2021 · 9 comments

Comments

@NickM-27
Copy link
Sponsor Collaborator

NickM-27 commented Dec 29, 2021

Describe the problem you are having

I have detection enabled and snapshots are being saved fine as jpgs. However, clips are showing and when I try to view I get an unsupported format error. If I donwload it is downloading the file clip.html. The same thing was happening for snapshots until I set snapshot: enabled: true

Version

0.9.4-26AE608

Frigate config file

mqtt:
  host: xxx.xxx.xx.x
  user: xxxxxxxxx
  password: xxxxxxxxxxx

# Main Setup

cameras:
  doggo_cam:
    ffmpeg:
      inputs:
        - path: rtsp:https://wyze:[email protected]/live
          roles:
            - rtmp
            - detect
            - clips
            - record

# Detection

detect:
  enabled: true

objects:
  track:
    - person
    - dog

# Recording / Saving Media

record:
  enabled: true
  retain_days: 1
  events:
    max_seconds: 120
    pre_capture: 5
    post_capture: 12

snapshots:
  enabled: true
  retain:
    default: 10
    objects:
      person: 15

Relevant log output

[2021-12-29 12:43:53] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:56312]
[2021-12-29 12:43:55] frigate.mqtt INFO : Turning on detection for doggo_cam via mqtt
[2021-12-29 12:44:24] frigate.mqtt INFO : Turning off detection for doggo_cam via mqtt
[2021-12-29 12:44:27] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:56312]
[2021-12-29 12:44:27] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:56442]
[2021-12-29 12:44:27] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:56442]
[2021-12-29 12:44:27] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:56450]
[2021-12-29 12:45:27] frigate.mqtt INFO : Turning on detection for doggo_cam via mqtt
[2021-12-29 12:45:55] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:56450]
[2021-12-29 12:45:55] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:56680]
[2021-12-29 12:45:56] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:56680]
[2021-12-29 12:45:56] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:56740]
[2021-12-29 12:45:57] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:56740]
[2021-12-29 12:45:57] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:56802]
[2021-12-29 12:45:57] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:56802]
[2021-12-29 12:45:57] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:56860]
[2021-12-29 12:45:57] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:56860]
[2021-12-29 12:45:57] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:56918]
[2021-12-29 12:45:58] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:56918]
[2021-12-29 12:45:58] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:56978]
[2021-12-29 12:45:58] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:56978]
[2021-12-29 12:45:58] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:57014]
[2021-12-29 12:45:58] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:57014]
[2021-12-29 12:45:58] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:57072]
[2021-12-29 12:46:29] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:57072]
[2021-12-29 12:46:29] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:57244]
[2021-12-29 12:46:29] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:57244]
[2021-12-29 12:46:29] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:57302]
[2021-12-29 12:46:30] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:57302]
[2021-12-29 12:46:30] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:57360]
[2021-12-29 12:46:30] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:57360]
[2021-12-29 12:46:30] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:57418]
[2021-12-29 12:46:30] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:57418]
[2021-12-29 12:46:30] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:57476]
[2021-12-29 12:46:30] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:57476]
[2021-12-29 12:46:30] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:57534]
[2021-12-29 12:46:31] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:57534]
[2021-12-29 12:46:31] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:57592]
[2021-12-29 12:46:31] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:57592]
[2021-12-29 12:46:31] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:57650]
[2021-12-29 12:46:31] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:57650]
[2021-12-29 12:46:31] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:57708]
[2021-12-29 12:46:31] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:57708]
[2021-12-29 12:46:31] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:57766]
[2021-12-29 12:46:31] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:57766]
[2021-12-29 12:46:31] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:57824]
[2021-12-29 12:46:31] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:57824]
[2021-12-29 12:46:32] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:57884]
[2021-12-29 12:46:39] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:57884]
[2021-12-29 12:46:39] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:57948]
[2021-12-29 12:46:40] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:57948]
[2021-12-29 12:46:40] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:58006]

FFprobe output from your camera

N/A

Frigate stats

No response

Operating system

UNRAID

Install method

Docker CLI

Coral version

CPU (no coral)

Network connection

Wired

Camera make and model

Wyze V2

Any other information that may be helpful

No response

@NickM-27
Copy link
Sponsor Collaborator Author

I look in the Media/clips folder and there are only pngs and jpgs, no mp4s.

@blakeblackshear
Copy link
Owner

There won't be any mp4s in the clips folder. This usually means that the recordings were discarded because they were invalid. You should see messages in the logs if so.

@NickM-27
Copy link
Sponsor Collaborator Author

@blakeblackshear Thanks, I updated the original post with the logs I just saw after trying. No errors seem to be occurring.

@NickM-27
Copy link
Sponsor Collaborator Author

Also just so I am clear on behavior, what happens if I have detect on but record off (I don't currently, just curious). Would it save the event but not save the recorded file?

@blakeblackshear
Copy link
Owner

If you have record off, you won't save any video.

Can you post the JSON version of your config from the debug page?

@NickM-27
Copy link
Sponsor Collaborator Author

@blakeblackshear

{
  "birdseye": {
    "enabled": true,
    "height": 720,
    "mode": "objects",
    "quality": 8,
    "width": 1280
  },
  "cameras": {
    "doggo_cam": {
      "best_image_timeout": 60,
      "detect": {
        "enabled": true,
        "fps": 5,
        "height": 720,
        "max_disappeared": 25,
        "width": 1280
      },
      "ffmpeg": {
        "global_args": [
          "-hide_banner",
          "-loglevel",
          "warning"
        ],
        "hwaccel_args": [],
        "input_args": [
          "-avoid_negative_ts",
          "make_zero",
          "-fflags",
          "+genpts+discardcorrupt",
          "-rtsp_transport",
          "tcp",
          "-stimeout",
          "5000000",
          "-use_wallclock_as_timestamps",
          "1"
        ],
        "inputs": [
          {
            "global_args": [],
            "hwaccel_args": [],
            "input_args": [],
            "path": "rtsp:https://doggocam:[email protected]/live",
            "roles": [
              "record",
              "rtmp",
              "detect"
            ]
          }
        ],
        "output_args": {
          "detect": [
            "-f",
            "rawvideo",
            "-pix_fmt",
            "yuv420p"
          ],
          "record": [
            "-f",
            "segment",
            "-segment_time",
            "10",
            "-segment_format",
            "mp4",
            "-reset_timestamps",
            "1",
            "-strftime",
            "1",
            "-c",
            "copy",
            "-an"
          ],
          "rtmp": [
            "-c",
            "copy",
            "-f",
            "flv"
          ]
        }
      },
      "ffmpeg_cmds": [
        {
          "cmd": "ffmpeg -hide_banner -loglevel warning -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp:https://doggocam:[email protected]/live -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /tmp/cache/doggo_cam-%Y%m%d%H%M%S.mp4 -c copy -f flv rtmp:https://127.0.0.1/live/doggo_cam -r 5 -s 1280x720 -f rawvideo -pix_fmt yuv420p pipe:",
          "roles": [
            "record",
            "rtmp",
            "detect"
          ]
        }
      ],
      "live": {
        "height": 720,
        "quality": 4
      },
      "motion": {
        "contour_area": 99,
        "delta_alpha": 0.2,
        "frame_alpha": 0.2,
        "frame_height": 180,
        "mask": "",
        "threshold": 25
      },
      "mqtt": {
        "bounding_box": true,
        "crop": true,
        "enabled": true,
        "height": 270,
        "quality": 70,
        "required_zones": [],
        "timestamp": true
      },
      "name": "doggo_cam",
      "objects": {
        "filters": {
          "dog": {
            "mask": null,
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "person": {
            "mask": null,
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.5,
            "threshold": 0.7
          }
        },
        "mask": "",
        "track": [
          "person",
          "dog"
        ]
      },
      "record": {
        "enabled": true,
        "events": {
          "max_seconds": 45,
          "objects": null,
          "post_capture": 8,
          "pre_capture": 4,
          "required_zones": [],
          "retain": {
            "default": 7,
            "objects": {}
          }
        },
        "retain_days": 2
      },
      "rtmp": {
        "enabled": true
      },
      "snapshots": {
        "bounding_box": true,
        "clean_copy": true,
        "crop": false,
        "enabled": true,
        "height": null,
        "quality": 70,
        "required_zones": [],
        "retain": {
          "default": 7,
          "objects": {}
        },
        "timestamp": false
      },
      "timestamp_style": {
        "color": {
          "blue": 255,
          "green": 255,
          "red": 255
        },
        "effect": null,
        "format": "%m/%d/%Y %H:%M:%S",
        "position": "tl",
        "thickness": 2
      },
      "zones": {}
    }
  },
  "database": {
    "path": "/media/frigate/frigate.db"
  },
  "detect": {
    "enabled": true,
    "fps": 5,
    "height": 720,
    "max_disappeared": null,
    "width": 1280
  },
  "detectors": {
    "cpu": {
      "device": "usb",
      "num_threads": 3,
      "type": "cpu"
    }
  },
  "environment_vars": {},
  "ffmpeg": {
    "global_args": [
      "-hide_banner",
      "-loglevel",
      "warning"
    ],
    "hwaccel_args": [],
    "input_args": [
      "-avoid_negative_ts",
      "make_zero",
      "-fflags",
      "+genpts+discardcorrupt",
      "-rtsp_transport",
      "tcp",
      "-stimeout",
      "5000000",
      "-use_wallclock_as_timestamps",
      "1"
    ],
    "output_args": {
      "detect": [
        "-f",
        "rawvideo",
        "-pix_fmt",
        "yuv420p"
      ],
      "record": [
        "-f",
        "segment",
        "-segment_time",
        "10",
        "-segment_format",
        "mp4",
        "-reset_timestamps",
        "1",
        "-strftime",
        "1",
        "-c",
        "copy",
        "-an"
      ],
      "rtmp": [
        "-c",
        "copy",
        "-f",
        "flv"
      ]
    }
  },
  "live": {
    "height": 720,
    "quality": 4
  },
  "logger": {
    "default": "info",
    "logs": {}
  },
  "model": {
    "height": 320,
    "labelmap": {},
    "labelmap_path": null,
    "path": null,
    "width": 320
  },
  "motion": null,
  "mqtt": {
    "client_id": "frigate",
    "host": "192.168.50.106",
    "password": "@MQTTbrick8",
    "port": 1883,
    "stats_interval": 60,
    "tls_ca_certs": null,
    "tls_client_cert": null,
    "tls_client_key": null,
    "tls_insecure": null,
    "topic_prefix": "frigate",
    "user": "nickmowen"
  },
  "objects": {
    "filters": null,
    "mask": "",
    "track": [
      "person"
    ]
  },
  "record": {
    "enabled": true,
    "events": {
      "max_seconds": 30,
      "objects": null,
      "post_capture": 5,
      "pre_capture": 5,
      "required_zones": [],
      "retain": {
        "default": 14,
        "objects": {}
      }
    },
    "retain_days": 1
  },
  "rtmp": {
    "enabled": true
  },
  "snapshots": {
    "bounding_box": true,
    "clean_copy": true,
    "crop": false,
    "enabled": false,
    "height": null,
    "quality": 70,
    "required_zones": [],
    "retain": {
      "default": 10,
      "objects": {}
    },
    "timestamp": false
  },
  "timestamp_style": {
    "color": {
      "blue": 255,
      "green": 255,
      "red": 255
    },
    "effect": null,
    "format": "%m/%d/%Y %H:%M:%S",
    "position": "tl",
    "thickness": 2
  }
}

@NickM-27
Copy link
Sponsor Collaborator Author

@blakeblackshear So I noticed something weird. Every time I restarted frigate it would set recording to disabled even though it was enabled in the config. I enabled it manually in frigate but it didn't help. However, I just now tried rebooting and then enabling recordings via HomeAssistant and voila it started working perfectly! Perhaps there is a bug / difference in it being set locally vs through mqtt?

@blakeblackshear
Copy link
Owner

Yep. It's a pinned issue: #2129

@NickM-27
Copy link
Sponsor Collaborator Author

In that case I will go ahead and close this issue as it seems it is related to that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants