this post was submitted on 23 May 2024
25 points (90.3% liked)
Linux
48051 readers
867 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I do something similar for my property's exterior cameras, which are streamed to my VPS in 'real-time'.
You will need to re-encode the footage - videos are already pretty well compressed, so traditional compression methods like 7z (lzma), gz, zip etc being layered on top can't compress them further.
For your solution, I'd probably run a
find
every minute w/ cron to look for these files in a staging/watch folder, move them to another folder so they aren't picked up on the next run, then re-encode with ffmpeg. Do note that when you re-encode footage, you always lose quality, even if you're on a high quality preset.I have a feeling that the Handbrake project can do this with a watch folder though, so might be worth looking into that. After a quick search this looks easier to setup than my solution:
https://github.com/HandBrake/HandBrake
https://github.com/shannah/handbrake-watcher
Thank you, this is exactly my use-case, along with some live streaming.
However,
If you want a live conversion and can't afford the >100$ it would cost to grab an ssd for a scratchdisk, you might also look into using vlc to grab the video stream from source camera, and encode it out to somewhere else, such as a webserver.
https://wiki.videolan.org/Documentation:Streaming_HowTo/Receive_and_Save_a_Stream/
You might also need a script to make sure it's always up.
Alternatively, there's a good chance that zoneminder will be able to do what you want with just a little tinkering. https://zoneminder.com/