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

Arm64 app fails to find installed ffmpeg/ffprobe. #5

Open
4c0d3r opened this issue Dec 24, 2022 · 7 comments
Open

Arm64 app fails to find installed ffmpeg/ffprobe. #5

4c0d3r opened this issue Dec 24, 2022 · 7 comments

Comments

@4c0d3r
Copy link

4c0d3r commented Dec 24, 2022

Here namer detects the presence of ffmpeg and ffprobe (for it's own uses), and video hashes cannot detect them:

ThePornDatabase/namer#124 (comment)

Any help appreciated.

@gebau00a
Copy link

I guess it's related to the internal.GetFFPaths() function as the error message is exactly as defined

@gebau00a
Copy link

gebau00a commented Dec 24, 2022

Seems to me that the os.Getwd() only looks in the working directory.
For Unix systems, the paths variable should be used to check for executables.

Example code

@peolic
Copy link
Owner

peolic commented Dec 24, 2022

My internal function mostly just sends the current working directory path to a stashapp/stash function, which first checks paths.
In any case, I am only able to test on Windows and Linux (both amd64), so if there really is an issue with my code I don't have any means of debugging it.

My current theory for the reason it doesn't find ffmpeg is this if branch which calls pathBinaryHasCorrectFlags.
You could find out by running ffmpeg -buildconf and checking if any of those build switches are missing from the list.

I read some of the thread on namer and I no longer think this applies to this issue.

@peolic
Copy link
Owner

peolic commented Dec 24, 2022

Here namer detects the presence of ffmpeg and ffprobe (for it's own uses), and video hashes cannot detect them

@4c0d3r, another idea:
Maybe it's because namer code is using shell=True when looking for ffmpeg, but not when calling the videohashes tool.
You'd have to check the Python documentation too, for the security considerations of using it.

@gebau00a
Copy link

My internal function mostly just sends the current working directory path to a stashapp/stash function, which first checks paths. In any case, I am only able to test on Windows and Linux (both amd64), so if there really is an issue with my code I don't have any means of debugging it.

My current theory for the reason it doesn't find ffmpeg is this if branch which calls pathBinaryHasCorrectFlags. You could find out by running ffmpeg -buildconf and checking if any of those build switches are missing from the list. I read some of the thread on namer and I no longer think this applies to this issue.

The webp flag was not present in my ffmpeg build as I had no need so far.
Recompiled with webp activated and videohashes can be executed directly.

Thanks for the suggestion.
I propose to change the error message, as ffmpeg was present.
On the other hand, symlinking ffmpeg without the webp option in the same folder videohashes is run from ignores the flag check, thus the behaviour is not consistent.

@DirtyRacer1337
Copy link

@peolic, @gebau00a tried to run it manually and he got same error, so problem shell=True probably not helps, I added it because whole program will crash if file not exist

@4c0d3r
Copy link
Author

4c0d3r commented Dec 28, 2022

Fixed in: #6

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

4 participants