Comments (3)
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.
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.
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)
- Error parsing track number!strconv.Atoi: parsing "--file=": invalid syntax HOT 5
- Error waiting for ubv: exit status 1 HOT 3
- A few items getting started HOT 1
- Error waiting for ubv: exit status 1 HOT 3
- Wrapper might need some adjustment HOT 1
- Video resolution lower than recording HOT 3
- where to find ubnt_ubvinfo on Dream Machine Pro HOT 2
- Remux : Command Not Found HOT 7
- Unable to run on X86 machine HOT 6
- Error waiting for ubv: exit status 5 HOT 9
- Need more help / clarification HOT 14
- Question: Why sometimes the video is stored in low-res instead of the native 4K of the camera HOT 1
- Instructions for copying video files using scp HOT 1
- Could not find codec parameters for stream 0 (Video: h264, none): unspecified size HOT 5
- Allow skipping partitions whose inspection/remux fails
- Cannot run remux on any .ubv-files. HOT 2
- Extracting Frame by Frame HOT 22
- Newb question here HOT 1
- Add Support for H265 HEVC Encoding HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unifi-protect-remux.