blakeblackshear / frigate

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

[Config Support]: How to change playback video type? #7273

Closed Serhioromano closed 1 year ago

Serhioromano commented 1 year ago

Describe the problem you are having

I've successfully setup Frigate and it works just fine. Only one thing is not working. When I go to recordings for clips, I cannot watch them on my all android devices. I have hikvision camera and my settings for recording stream is H.264. Is there a way to transcode clips or recordings to MPEG when play on mobile device?

Version

1.3

Frigate config file

mqtt:
  enabled: true
  host: 192.168.1.1
  port: 1883
  user: m
  password: m
  client_id: frigate

motion:
  threshold: 25
  contour_area: 30
  delta_alpha: 0.2
  frame_alpha: 0.2
  frame_height: 50
  improve_contrast: False
  mqtt_off_delay: 5

record:
  enabled: True
  retain:
    days: 7
    mode: motion
  events:
    objects:
      - person
    retain:
      default: 30
      mode: active_objects

snapshots:
  enabled: True
  timestamp: True
  bounding_box: True
  crop: True
  retain:
    default: 10

objects:
  track:
    - person
  filters:
    person:
      threshold: 0.79

cameras:
  my_office:
    ffmpeg:
      inputs:
        - path: rtsp://admin:!@192.168.1.24/Stream/Channels/101
          roles:
            - record
        - path: rtsp://admin:!@192.168.1.24/Stream/Channels/102
          roles:
            - detect
      output_args:
        record: preset-record-generic-audio-aac
        detect: -f rawvideo -pix_fmt yuv420p
    snapshots:
      required_zones:
        - zone_0
    record:
      events:
        required_zones:
          - zone_0
    detect:
      enabled: true
      width: 640
      height: 360
      fps: 6
    objects:
      filters:
        person:
          mask:
            - 432,360,424,263,276,273,0,191,0,360
    motion:
      mask:
        - 92,115,205,183,276,158,418,0,640,0,640,360,0,360,0,218
        - 24,41,200,38,205,18,21,20
    zones:
      zone_0:
        coordinates: 365,0,348,125,245,213,143,170,86,0
        objects:
          - person
        filters:
          person:
            threshold: 0.79

Relevant log output

2023-07-24 01:09:22.742940304  [INFO] Starting Frigate...
2023-07-24 01:09:24.154599133  [2023-07-24 01:09:24] frigate.app                    INFO    : Starting Frigate (0.12.1-367d724)
2023-07-24 01:09:24.177421566  [2023-07-24 01:09:24] peewee_migrate                 INFO    : Starting migrations
2023-07-24 01:09:24.189194769  [2023-07-24 01:09:24] peewee_migrate                 INFO    : There is nothing to migrate
2023-07-24 01:09:24.249996649  [2023-07-24 01:09:24] frigate.app                    INFO    : Output process started: 416
2023-07-24 01:09:24.268299670  [2023-07-24 01:09:24] frigate.app                    INFO    : Camera processor started for my_office: 419
2023-07-24 01:09:24.273428816  [2023-07-24 01:09:24] frigate.app                    INFO    : Capture process started for my_office: 420
2023-07-24 01:09:24.285461490  [2023-07-24 01:09:24] detector.cpu                   INFO    : Starting detection process: 415
2023-07-24 01:09:24.285467718  [2023-07-24 01:09:24] frigate.detectors              WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes.

Frigate stats

No response

Operating system

Debian

Install method

Docker CLI

Coral version

CPU (no coral)

Any other information that may be helpful

No response

NickM-27 commented 1 year ago

There is no support for transcoding at playback time. There used to be a big need when browsers didn't support h.265 but that has since changed.

I've never had an issue with my loryta / hikvision cameras being played back on the iPhone or my Samsung but I have heard of at least one user with a OnePlus device that was unable to playback recordings with resolution higher than 1080p. There are requests for recording the main and the sub stream at the same time for various reasons, but that has not been implemented yet.

okpig commented 1 year ago

I am in the process of setting up some new Hikvision cameras and am having the same issue (model DS-2CD2387G2-LU) which are set to h.264 - what other settings might be important on the camera? From Frigate web app (in Chrome on Android) and in Home Assistant app I can only live view the substream and cannot play recordings. I don't know what to do next exactly, I am using preset-record-generic-audio-aac preset and have set up go2rtc.

Work around for me on my Samsung Galaxy is to use the Samsung Internet browser to open Home Assistant and the streams and recordings all play fine through the browser.

NickM-27 commented 1 year ago

Work around for me on my Samsung Galaxy is to use the Samsung Internet browser to open Home Assistant and the streams and recordings all play fine through the browser.

If it plays in Samsung Internet but not chrome then that means it is a chrome issue, other users have reported similar with the current stable version of chrome and I would suggest trying the beta version instead

Serhioromano commented 1 year ago

I had a suggestion somewhere and it worked for me. I change main channel resolution from 2k to 1080 and how everything plays fine.

@okpig