blakeblackshear / frigate

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

Simplify downloading clip #13688

Closed Joeviocoe closed 1 month ago

Joeviocoe commented 2 months ago

Describe what you are trying to accomplish and why in non technical terms It takes multiple steps of navigation to download a clip to the local device.

Describe the solution you'd like Add a "Download" button next to the "Export" button so a user can choose to download or export.

Everett115 commented 2 months ago

I second this, maybe a separate action specifically for clips. When I first upgraded and saw the export button I thought it downloaded the current motion clip.

hawkeye217 commented 2 months ago

There is no direct concept of a "clip" anymore (as there was in Frigate 0.13 and earlier). Because review items can be made up of multiple tracked objects in 0.14, the Export pane was added to select a time period to export.

However, there are multiple shortcuts to be able to quickly export review items. See the FAQ, Usage question 6.

Once the footage has been exported using the method described in the FAQ, it's only 2 clicks/taps to download - navigate to the Export pane and click the download button for the video you want to save to your device.

leccelecce commented 1 month ago

Came here with the same thought. Are we really saying it's acceptable in a NVR to need 3-4 clicks to download a video of interest? Also, I rarely want to additionally store a copy of the clip on the server, but just download and share it somewhere - by lumping this in with the Export functionality, I now also have to go back and delete the export, so it's 2 further clicks just to keep things tidy. It's also a break in the journey as you have to jump between the Review and Export sections which further adds friction - what if there are several clips I want to export?

Of the other NVR/cloud security products I have access to, none require more than 2 clicks to download a video, versus up to 6 here.

"Don't Make Me Think" - can't we just have a download icon on the Review items?

NickM-27 commented 1 month ago

the problem is that it takes time to generate a download, so with exports you can request the creation of one and then not worry about the UI hanging / waiting for that file to come through like it does for a download. Perhaps there is a better solution in the browser like a worker or something, but that will be more complicated and take time.

leccelecce commented 1 month ago

That makes perfect sense, though I would hope relatively minor implementation complexity (compared to all the other hard problems you guys solve!) doesn't overly constrain the UI design of core journeys :-)

I think most web users are accustomed to the concept that if they request a download, it can take several seconds to start, and if they navigate away from the page they'll interrupt this. Once the download starts coming through most browsers will display progress in some form (or if the filesize is unknown, just some kind of "in progress" animation). I wonder if the output of the ffmpeg command that stitches the recordings together could be parsed directly to the HTTP response rather than the filesystem i.e. essentially stream it as each few megabytes is complete? That way the response would start to be written pretty quickly, so the user would be aware the download was in progress.

Looks like Frigate already accomplishes something similar using FastAPI's StreamingResponse https://github.com/blakeblackshear/frigate/blob/dd7a07bd0d01a7bef5a689ccc88661a938dff3ea/frigate/api/media.py#L63

NickM-27 commented 1 month ago

In the past there was no easy way I could find to do that, we only recently switched to fast API so it's possible now we could output to the browser directly. Will have to see.

leccelecce commented 1 month ago

Fantastic!