ffmpeg-templates
ffmpeg-templates copied to clipboard
Forager integration
ffmpeg can optionally accept input via stdin. Let's see if we can input videos directly via the forager database. This avoids the need for saving them elsewhere and losing context.
research
- [x] does it work
- SO example here: https://stackoverflow.com/questions/67388548/multiple-named-pipes-in-ffmpeg
- [ ] is it slower than reading a file
- [ ] does it have a higher memory need (e.g. Could a file reader just look at disk more often?)
schema changes
clips:
- input: './local_file.mp4'
# why not support urls too!
- input: 'https://cnd.com/asset.mp4'
# database is an optional param. It can also be set by env var `DATABASE=`
# and defaults to the share-xdg dir (~/.local/share/forager.db)
# we could possibly support more searching in the future. sha512checksum feels like a good one to support
- input: 'sqlite:///home/andrew/.local/share/forager.db?id=1234'
technically this is to support just the forager project, but lets simplify it by just requiring that a database contain the following schema:
CREATE TABLE media_file (
id INTEGER,
sha512checksum TEXT
);
CREATE TABLE media_chunk (
media_file_id INTEGER
chunk BLOB
);