Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration of ffmpeg and exiftool naming, and data folder. #131

Open
gedw99 opened this issue Mar 3, 2025 · 3 comments
Open

Configuration of ffmpeg and exiftool naming, and data folder. #131

gedw99 opened this issue Mar 3, 2025 · 3 comments

Comments

@gedw99
Copy link

gedw99 commented Mar 3, 2025

Hey @SmilyOrg

Task file is expertly manicured !!

Can I configure the naming of the ffmpeg and exiftool, such that it's configurable ?
Maybe ENV or config or something that suits ?

I build both for all OS's ( win, Mac, linux) and they are named a little differently for each.

I can PR the FFMPEG and EXIFTOOL in as a Task file include if you want. It pulls the right one for your OS or All of them.

@gedw99
Copy link
Author

gedw99 commented Mar 3, 2025

Also can I configure the "data" folder where the DB is created ?

Cant see anything on the CLI to do it, so maybe ENV or config ?

@gedw99 gedw99 changed the title ffmpeg and exiftool naming ffmpeg and exiftool naming, and data folder. Mar 3, 2025
@gedw99 gedw99 changed the title ffmpeg and exiftool naming, and data folder. Configuration of ffmpeg and exiftool naming, and data folder. Mar 3, 2025
@gedw99
Copy link
Author

gedw99 commented Mar 3, 2025

seems that https://github.com/SmilyOrg/photofield/blob/main/defaults.yaml is the place to config the naming of the binaries it uses for ffmpeg and exiftool and DB folder to use ?

We could make room for naming there if you want.

For example on a Mac, arm64 "ffmpeg_bin_darwin_arm64" is the binary naming, so its it can be reflectively calculated at runt time also based on GOOS and GOARCH naming conventions.

@SmilyOrg
Copy link
Owner

SmilyOrg commented Mar 3, 2025

Hey @SmilyOrg

Task file is expertly manicured !!

Thanks @gedw99! It took a long time 🙈

seems that https://github.com/SmilyOrg/photofield/blob/main/defaults.yaml is the place to config the naming of the binaries it uses for ffmpeg and exiftool and DB folder to use ?

Also can I configure the "data" folder where the DB is created ?

There are already some env vars, but not documented 😢 PRs for docs appreciated 😅

For the DB folder, you can set PHOTOFIELD_DATA_DIR. It will also look for the configuration.yaml in that dir and it's not possible to separately configure the db and config dirs currently.

Can I configure the naming of the ffmpeg and exiftool, such that it's configurable ? Maybe ENV or config or something that suits ?

I build both for all OS's ( win, Mac, linux) and they are named a little differently for each.

For ffmpeg / exiftool names/paths the config file might be a good place for them?

I was just looking into making the ffmpeg path configurable, my proposal would be media.source_types.ffmpeg.path as that's where the "base" ffmpeg is configured and some other sources already use this field (sqlite, thumb).

For exiftool, it's not really treated as a source right now, but there is already a media.exif_tool_count, so maybe media.exif_tool_path would be a good addition?

The path configuration could follow the rules of LookPath, meaning that it looks at PATH if there are no slashes, otherwise it tries to load the (relative) path directly.

I can PR the FFMPEG and EXIFTOOL in as a Task file include if you want. It pulls the right one for your OS or All of them.

Hmm, that might be cool, but I'm thinking if you go as far as cloning & running the Taskfile, you can also probably install those in your PATH? It seems like it could be easier for end-users though.

The Docker image already bundles ffmpeg and exiftool, but for e.g. Windows installation, there could be an installer that bundles all these tools alongside the main binary? They could also be embedded into the main executable, but I'm afraid extracting and running executables would trip too many virus scanners 😅

For example on a Mac, arm64 "ffmpeg_bin_darwin_arm64" is the binary naming, so its it can be reflectively calculated at runt time also based on GOOS and GOARCH naming conventions.

Hmm, is this common naming? How did you install it? I would the usual naming to be just ffmpeg (that's what I see for e.g. windows builds)

Thanks for the thoughts and questions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants