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

feat: Warn user if FFmpeg is not installed #441

Merged
merged 12 commits into from
Sep 14, 2024

Conversation

seakrueger
Copy link
Collaborator

Creates a Warning dialog on startup if the program cannot find FFmpeg orFFprobe in the PATH. Other interactions with the program are blocked until the issue is either ignored or resolved.

Uses native OS dialog, so should match Mac and Windows design paradigms on their respective systems (testers required to confirm)
image

Creates a Warning dialog on startup if the program cannot find FFmpeg or
FFprobe in the PATH. Other interactions with the program are blocked
until the issue is either ignore or resolved.
@CyanVoxel CyanVoxel added this to the Alpha v9.4.1 milestone Sep 4, 2024
@CyanVoxel CyanVoxel added Type: UI/UX User interface and/or user experience Status: Review Needed A review of this is needed Priority: Medium An issue that shouldn't be be saved for last labels Sep 4, 2024
Per QT docs, handling custom iconPixmap requires multiple icons per
platform. Easier to just use universal, default warning icon (yellow
triangle)
@seakrueger seakrueger changed the title Ffmpeg check feat: Warn user if FFmpeg is not installed Sep 4, 2024
Copy link
Collaborator

@eivl eivl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved once comments are resolved.
Nice change!

def installed(self):
"""Checks if both FFmpeg and FFprobe are installed and in the PATH."""
# Same checker that ffmpeg-python uses
if which("ffmpeg"):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont like this implementation of which, it could just have been a method in your class, but since it ships with ffmpegs install it is fine to use. But, it uses os.name for platform checking, and I have seen many discussion about this usage and how it is better to use platform.system() to get the current platform name.

It also uses os.path instead of pathlib

I would like @CyanVoxel to comment on this. I can write the method if that is wanted as a new PR after this is merged. there is currently nothing wrong about this usage.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could shutil.which() be used here instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not know the Python stdlib had a built in which command, using that instead.

@seakrueger
Copy link
Collaborator Author

It may better to hold off until #460 is merged and update the url to point to the new docs site

@Nginearing
Copy link
Contributor

Nginearing commented Sep 6, 2024

It may better to hold off until #460 is merged and update the url to point to the new docs site

By the way as soon as #460 is merged, CyanVoxel plans to use the domain "tagstud.io" that they have already bought, so the url will actually be something like docs.tagstud.io but it will still be github pages under the hood.

@CyanVoxel CyanVoxel removed the Status: Review Needed A review of this is needed label Sep 8, 2024
@CyanVoxel
Copy link
Member

@seakrueger With #460 having been merged, the docs can be updated here 👍

@seakrueger
Copy link
Collaborator Author

The url now points to "https://docs.tagstud.io/help/ffmpeg/". Though it seems the new doc page will need to be cherry-picked to main for the url to work

@CyanVoxel
Copy link
Member

The doc directory was also renamed to docs on main, just so you don't miss it

@seakrueger
Copy link
Collaborator Author

seakrueger commented Sep 8, 2024

The actual docs page has now been spun off into its own PR (#473). The guide does not actually need to be part of this PR, and that solves the renamed dir and need to be on a different branch problems.

@seakrueger
Copy link
Collaborator Author

Confirmed that the help buttons works pointing towards https://docs.tagstud.io/help/ffmpeg/

@CyanVoxel CyanVoxel merged commit b2dbc57 into TagStudioDev:Alpha-v9.4 Sep 14, 2024
4 checks passed
@NeedNot
Copy link

NeedNot commented Sep 17, 2024

Maybe just me but on Macos it says it can't find ffmpeg but the ffmpeg command works fine along with which or where ffmpeg

@CyanVoxel CyanVoxel mentioned this pull request Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Medium An issue that shouldn't be be saved for last Type: UI/UX User interface and/or user experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants