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

Implement "general HA media folder" support #1748

Open
Jack77777777 opened this issue Dec 13, 2024 · 20 comments
Open

Implement "general HA media folder" support #1748

Jack77777777 opened this issue Dec 13, 2024 · 20 comments
Labels
feature New feature or request

Comments

@Jack77777777
Copy link

Jack77777777 commented Dec 13, 2024

Hello @dermotduffy ,

First of all i love frigate and the frigate card.
I have setup frigate only for live view of my cameras in docker onto Synology DS718+. Seems like for the detection feature of frigate my Synology has not enough power and no detector. For this reason i use the Surveillance Station from Synology for detection and recordings.

Is there a way to implement recordings from Synology Surveillance Station into frigate or frigate card?

Best regards,
Jack

@dermotduffy
Copy link
Owner

dermotduffy commented Dec 13, 2024

First of all i love frigate and the frigate card.

Glad you find it useful!

Is there a way to implement recordings from Synology Surveillance Station into frigate or frigate card?

Of course, anything is technically possible, just might be a lot of work. Does Surveillance Station have an Home Assistant integration, and can you already access Surveillance Station recordings through Home Assistant (e.g. the Media Browser)?

  • If yes, we could probably get recordings into the card with a moderate amount of work
  • If no, we could probably get recordings into the card with a substantial amount of work

Both would likely require someone with a Surveillance Station do the work though...

@dermotduffy dermotduffy added the question Further information is requested label Dec 13, 2024
@Jack77777777
Copy link
Author

Jack77777777 commented Dec 14, 2024

Hi @dermotduffy,

Photos should be availabe in media browser through the synology dsm integration but seems to not working an the PR home-assistant/core#92092 was closed. Anyway recordings are not supported at all. I can mount the recordings to /media and view them through media browser in „my media“. Is it possible to include my media as location in frigate card?

I can help with needed paths, information, screenshots but have no dev exerpience.

@dermotduffy
Copy link
Owner

@Jack77777777 Realistically, to do this right, it needs a developer with both the capability to integrate this into the card AND the necessary hardware to test. That is not me. Sounds like it is also not you :-) We can leave this issue open and hope that someone comes along better suited to implement this.

Another idea I've had more generally is to just allow the Frigate card to browse media separate from the camera system. This wouldn't allow any kind of media filtering, link between camera and media, or timeline support, but would be pretty much "Have a version of the HA media browser" in the card, i.e. Anything you could see in the HA media browser, you could "browse to" yourself in the Frigate card. That might be a hacky way to give you somewhat close to what you want, but wouldn't be anything like the same level of integration the card has for frigate, reolink, motioneye, etc.

@Jack77777777
Copy link
Author

@dermotduffy could you make it possible to copy recordings manually to frigate storage and have them visible? I already tried this by renaming folders and files to fit frigate structre (https://docs.frigate.video/configuration/record/). But the recordings are not visble in media browser->frigate. I read that this is nothing intented but probably there is way ;) ?

I could set up a job to copy and rename automatically i think.

@dermotduffy
Copy link
Owner

@dermotduffy could you make it possible to copy recordings manually to frigate storage and have them visible? I already tried this by renaming folders and files to fit frigate structre (https://docs.frigate.video/configuration/record/). But the recordings are not visble in media browser->frigate. I read that this is nothing intented but probably there is way ;) ?

Both the card and HA are asking Frigate what events happened between date X and Y. Simply having the media present is not sufficient.

@Jack77777777
Copy link
Author

Jack77777777 commented Dec 14, 2024

@dermotduffy
Ok. Regarding to link media browser to the card. Would it be possible to link each camera to different folders in mymedia?

cam1: media browser/mymedia/recordings_cam1
cam2: media browser/mymedia/recordings_cam2
.
.
.

@Jack77777777
Copy link
Author

In best case seperate for Recordings, Snapshots... for each cam 😅

@dermotduffy
Copy link
Owner

dermotduffy commented Dec 14, 2024

In best case seperate for Recordings, Snapshots... for each cam 😅

Yes, perhaps something like (making this up):

camera:
  - camera.foo:
    media_library:
      paths:
        snapshots: ["My Camera Ecosystem", "Images", "Baz"]
        clips: ["My Camera Ecosystem", "Events", "Baz"]
        recordings: ["My Camera Ecosystem", "24x7 Recordings", "Baz"]

None of these would work:

  • Timeline
  • Media filtering of any kind
  • "Infinite scrolling back in time"
  • Triggering media
  • You could easily get snapshots in your clips, if that's what the media browser shows at that path.
  • [Lots of other fancy things]

It would simply present the same contents of the Media Browser, in the card (but perhaps starting at the paths as specified above).

@Jack77777777
Copy link
Author

@dermotduffy this would fit my needs 👍🏻.

@apos-t
Copy link

apos-t commented Dec 15, 2024

@dermotduffy It would be great if you can implement local paths as media source. Thats the feature I'm missing in the moment. Switching from frigate to basic reolink detection and upload the clips/images to an ftp on my ha server. That feature would work, for all cameras with ftp support - also for the battery driven.

There is an other card https://github.com/lukelalo/gallery-card using local media - maybe that helps

For the timeline they exctract the filenames - which needs to be configurable - for reolink my config looks like:

entities:

  • camera.camera_einfahrt_fliessend
  • path: media-source://media_source/local/camera-einfahrt/
    recursive: true
    include_images: false
    menu_alignment: bottom
    maximum_files: 5
    file_name_date_begins: 19
    file_name_format: YYYYMMDDHHmmss
    caption_format: MM/DD HH:mm

@dermotduffy
Copy link
Owner

For the timeline they exctract the filenames - which needs to be configurable - for reolink my config looks like:

This is part of the problem with this feature, honestly. The card already supports fancy media handling, and extracting times from filenames (this is what reolink and motioneye cameras do in the card), and is much more extensible than a configuration like this. But it needs someone who has the willingness & hardware to implement it.

If this "generic folder" feature turns into something like the above -- I fear we're missing the point, and should just implement support for that camera type "properly" into the card.

@apos-t
Copy link

apos-t commented Dec 16, 2024

Thank you for the answer, I understand your point to support camera types and not create something generic with all the support this feature will have in the future. Your suggestion should definetly work - with reolink ftp for example you always get the snapshot and the clip in the same folder - with a different timestamp for the same event, not really great for automations...

@dermotduffy dermotduffy changed the title Implement recordings from Synology Surveillance Station Implement "general HA media folder" support Dec 17, 2024
@dermotduffy dermotduffy added feature New feature or request and removed question Further information is requested labels Dec 17, 2024
@haforme
Copy link

haforme commented Dec 17, 2024

I struggle with a similar use case. I use the frigate card for my ring camera. Any of the motion or ding event videos are uploaded from ring to my media folder. To review the videos, I have to go to the media folder and drill down to the "My Media" folder. It works but having similar functionality from the frigate card would be the cats meow!

@dermotduffy
Copy link
Owner

A few thoughts about how this could work . Comments very welcome here or in the doc.

@oeiber
Copy link

oeiber commented Dec 19, 2024

A few thoughts about how this could work . Comments very welcome here or in the doc.

Looks very good!

@haforme
Copy link

haforme commented Dec 19, 2024

I reviewed your plan, and it appears to meet my needs in that I want to be able to tag a specific camera to a specific directory. Thanks for doing this. It will make a great addition for the non-Frigate cameras. This would also be a reason to rename the card to a more universal name.

@apos-t
Copy link

apos-t commented Dec 19, 2024

Looks good, I have one point:
the logic of creating the timeline from the file names would be delivered true the attached camera? When I understand it correctly, this will work only for reolink cameras at the moment

@dermotduffy
Copy link
Owner

the logic of creating the timeline from the file names would be delivered true the attached camera? When I understand it correctly, this will work only for reolink cameras at the moment

It works for frigate, reolink and motioneye all of which have some sort of "proper" camera engines implemented in the card. To start, I don't want to go anywhere near making that generic, so in v1 of this feature there'll be no timeline association whatsoever with media in the folders and barebones filtering (if any).

Timeline support would come if we implement the work described under "Future Possibilities", but that would not be in the initial version.

@apos-t
Copy link

apos-t commented Dec 20, 2024

That's also my understanding and is completly fine, I just want to make it clear for everybody with other cameras like ring etc.

@Jack77777777
Copy link
Author

A few thoughts about how this could work . Comments very welcome here or in the doc.

This would be fantastic!

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

No branches or pull requests

5 participants