Giter Club home page Giter Club logo

Comments (3)

petergeneric avatar petergeneric commented on September 18, 2024 1

That sounds like a perfectly reasonable approach given how you want it to work. Personally I'd be inclined to keep the output-listing capability in scripts rather than in Go (simply because shell is great at working with the filesystem). One thought would be a shell script that wraps remux that will process one or more .ubv files passed in as arguments, and if successfully demuxed will delete the .ubv and create the equivalent .done file (or you could even rename the .ubv to .done, and then periodically use truncate to empty the .ubv file - this way you'd be able to hold on to the originals for a while in the event of any problems.

If you're new to shell scripting and planning to release the scripts, I'd also recommend running your scripts through shellcheck to catch any subtle bugs or non-portable behaviours.

P.S. since I wrote remux, Ubiquiti has started shipping ubnt_ubvexport with Protect, and you may wish to wrap this instead - give it a go, it seems reasonably good (although I still think there are cases where my tool can help recover frames from corrupted files)

As an aside, I used to do something similar, but instead I transferred and kept the .ubv files (I like to keep originals as the archived media, rather than converted files -- and I also wanted to run all IO-intensive operations on server hardware rather than the fairly IO-limited cloudkey). Because I was transferring the .ubv files, I was able to use rsync to pull them onto to my server & it would automatically handle pulling across only new/changed files. Any time a .MP4 was required, it was easy to generate on the fly given the much larger IO capabilities of my server vs the cloudkey (I used the x86 version of ubnt_ubvinfo, but it would work just as well with the qemu wrapper).

from unifi-protect-remux.

briankhud avatar briankhud commented on September 18, 2024

Thanks @petergeneric - for your suggestion, I'm still not sure how to deal with the fact that I don't know what file names the tool will create prior to running it, so there's no elegant way to know what to delete after transfer.

I had tried rsync as well, but found the filtering syntax to be really unintuitive. I ended up using SyncThing - but I'll admit that's a lot of extra software running, especially given how admin for it works and the nature of the data.

I'll check out ubvinfo and (new!) ubvexport tool and see if an approach for solving the file name is available.

from unifi-protect-remux.

petergeneric avatar petergeneric commented on September 18, 2024

I don't think ubvexport has an option for that, but I'd be inclined to extract to a dedicated folder rather than worrying about the exact output filenames? Good luck anyway! Feel free to drop a comment on this ticket if/when you decide to release your scripts

from unifi-protect-remux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.