https://github.com/sam0x17/video-manager
a tool for automatically optimizing files in your video library using ffmpeg
https://github.com/sam0x17/video-manager
crystal crystal-shard crystal-shards ffmpeg ffmpeg-wrapper plex plex-media-server video-encoding
Last synced: 11 months ago
JSON representation
a tool for automatically optimizing files in your video library using ffmpeg
- Host: GitHub
- URL: https://github.com/sam0x17/video-manager
- Owner: sam0x17
- License: mit
- Created: 2020-03-15T03:09:48.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-07-25T16:29:12.000Z (over 1 year ago)
- Last Synced: 2025-03-14T14:21:16.230Z (about 1 year ago)
- Topics: crystal, crystal-shard, crystal-shards, ffmpeg, ffmpeg-wrapper, plex, plex-media-server, video-encoding
- Language: Crystal
- Size: 11.7 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# video-manager
This simple crystal program will loop over the list of directories you tell it
to via the config file. For each video file in the directory, it will optimize
the file according to the ffmpeg encoding settings listed in your config file.
Each file is copied to /tmp before conversion begins, and all file changes
are done atomically, meaning the program can be interrupted at any point and
you won't corrupt or lose any data. You can also configure the number of
parallel conversions that will run at once. The default ffmpeg settings
are designed to allow for fast seeking on a Plex server.
The program will save the hashes (based on filename, file size, and the ffmpeg
options that were used) of each file it has already optimized in the config
file so if it is re-run those same files will not be converted again. If you
make a change to your ffmpeg options, all files will be re-converted since
their hashes will be invalidated.
On a very good CPU (i.e. a 9900k), 8 threads seems to be the sweet spot.
The config file is located at `~/.video-manager-settings.json`. The first
time the program is run a default config will be created and you can further
configure things from there.
Only linux and macos are supported. Once windows support is added to crystal
I may update this to work on windows if running ffmpeg on windows is even
feasible, which I don't know.
## Installation
1. download and install crystal via https://crystal-lang.org/install/
2. clone the repo `git clone git@github.com:sam0x17/video-manager.git`
3. `cd` into the repo (`cd video-manager`)
4. run `shards install`
5. run `shards build --release`
The binary is now located in the `bin` folder. You can run it directly,
or install it somewhere more permanent on your system like `/usr/bin`.