blakeblackshear / frigate

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

Direct link to export playback #13103

Closed jftanner closed 1 day ago

jftanner commented 4 weeks ago

Describe what you are trying to accomplish and why in non technical terms I want to be able to share a link to a specific export in Frigate v0.14.x, so that I can direct other authorized users to the footage.

Today, if I want to share an clip with family members, I have two options:

  1. Download the video and share it via Discord, YouTube, etc.
  2. Say "Go to https://frigate.local/export and click in 'Deer Eating Corn`".

Instead, I want to just send them a link that brings them directly to that clip.

Describe the solution you'd like Ideally, the window location would update automatically when viewing exports, so that I can copy-paste it, bookmark it, or use in-browser sharing tools.

For example, the URL could be something like <HOST>/export/adorable_cat or <HOST>/export/driveway_cam_abcdef. In either case, visiting that URL should navigate directly to the export page and open that particular video.

There are several reasons why this may preferable to sending the video itself:

Describe alternatives you've considered If updating window.location isn't practical (perhaps due to how the page router is implemented), then a "Share" button next to the "Download" button would be a reasonable alternative.

Additional context This request is similar to #6416 and #12776, but for exports instead of events and review. Though, the same approach could work for those as well.

This feature would be useful now, but it'll be even more valuable once role-based authorization is available, especially if permissions can be assigned on a per-file basis. Being able to grant access to a particular export (or event) would be fantastic. But, even without that, a role which allows access only to exports would allow users to share clips with friends and family without giving them access to view everything.

NickM-27 commented 4 weeks ago

this already exists, you can just right click the download button and press copy link address. When another user opens this link it will play the full video directly

jftanner commented 4 weeks ago

That's a good work-around, but it not quite the same thing. Critically: it won't bring them to the Frigate UI.

If you have authentication configured, and they don't happen to be logged in, they'll get an unfriendly "401 Authorization Required" page with obvious way to authenticate. (You and I know to just go log in and try again, but that's unfriendly for other family members that aren't software developers.)

(Actually, as a fun side bug: the same thing happens for https://frigate.local:8971/exports/. If you're not logged in, you get a default browser error page instead of a login screen.)

Besides the authentication issue, it would also be nicer to land them in the UI so they can navigate to other exports, events, etc, if they want to investigate further.

jftanner commented 4 weeks ago

Ah. That's a much better issue title!