dustin / gopro

Tools for making the most out of GoPro Plus.
http://dustin.sallings.org/2020/04/29/gopro-plus.html
BSD 3-Clause "New" or "Revised" License
91 stars 12 forks source link

Is it possible to serve content from local backup incase gopro cloud subscription runs out #32

Open tanmaytat11 opened 8 months ago

tanmaytat11 commented 8 months ago

First of all, thanks a lot for this epic tool. It might have been answered but I was not able to find it, I want to use the tool but locally only going forward. My gopro plus subscription has run out so I am just downloading all my data and planning to backup to a local medium going forward. What would be the best way to tackle this. Did not knew what would be the best place to ask so thought of creating an issue. Please feel free to close it if does not fall into place. Thanks again!!

dustin commented 8 months ago

Yeah, I've not really spent too much time thinking about this. I do like having the cheap off-site backups. But I also have all of the data stored locally in cheap unreliable storage (ZFS on USB drives).

I wrote a FUSE filesystem that talks to the backend and provides a regular filesystem view of all of the data. My work Mac is using that along with Blackmagic Proxy Generator to generate proxies for all the downloaded media. I use the same filesystem in Davinci Resolve for editing, so it's basically my "local content" service at the moment with the files stored across multiple drives on multiple computers.

The only real missing link would be uploads. Right now, this software gets richer metadata presentation than GoPro cloud's own stuff, so creating some alternatives would be fairly straightforward. It's just ensuring local media is stored and recording where (S3, local, etc...).

tanmaytat11 commented 8 months ago

Thanks for the answer. I will try using the FUSE system. How does the blackmagic proxy thing work, does it in your web ui serve the content through the downloaded source rather than gopro/aws servers? Yeah the upload thing would be the one missing, will try seeing if I can contribute but my experience with haskell just started with compiling this project itself and running it. I again want to thank you for providing this awesome set of tools. Is there a way to serve the local downloaded content as a streamable view, like I want to expose the downloads and use the metadata but the end user should be able to play the streams thus eliminating the need to hit the go pro servers. Right now I can see the files beautifully arranged but I am missing the direct play thing. Let me know if this can be added to the web ui and I will try to learn and add it if you can guide me a little. Thanks!

dustin commented 8 months ago

The BlackMagic Proxy Generator finds files in a tree of form some/path/something.mp4 and creates some/path/Proxy/something.mov with whatever proxy you configure (which might not be.mov, but the basic idea remains). Davinci Resolve will look for proxies under any media you import using this form.

The FUSE filesystem works by unioning a lot of local storage areas into a read-only view across all of them so accessing some path like /mnt/2023/10/wbmrENDdEymXM/GX011866.MP4 will pull resources from any of the places you have overlayed or dynamically pull blocks as needed from the cloud origin. Then it allows an overlay such that /mnt/2023/10/wbmrENDdEymXM/Proxy can be created and managed in a separate space. This also means I can overlay different types of proxies at different times.

I wrote more about it here: https://dustin.sallings.org/2023/10/16/goprofs.html

Regarding offline serving: The backend could also work with knowledge of a full backup tree and serve local content, but I don't actually download anything beyond the minimal here, so that wouldn't work for any of my use cases. The minimum size for my data (including their smaller versions for serving) is about 22TB for me. Just grabbing the mp4_low would only add about another 14GB to my storage which isn't too bad. It's the 2TB of high res proxies and another 2TB of other weird unknowns that would be a larger impact on me.

In any case, just having it be aware of a local tree with these options could be enough. The web site will already serve content.