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

feature: Keep track if ffmpeg is installed #33

Open
3 of 4 tasks
tygore587 opened this issue Oct 5, 2024 · 4 comments
Open
3 of 4 tasks

feature: Keep track if ffmpeg is installed #33

tygore587 opened this issue Oct 5, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@tygore587
Copy link

tygore587 commented Oct 5, 2024

✨ Describe the feature you'd like

At the moment it is checked if yt-dlp is installed and otherwise it will install it. The same would be cool to have for ffmpeg as its e.g. used to extract audio of a download or put together audio and video after downloading the best quality.

🌧 Is your feature request related to a problem?

I have yt-dlp configured to extract audio of a youtube video and ffmpeg is not installed, it will fail and return with the error:

ERROR: Postprocessing: ffprobe and ffmpeg not found. Please install or provide the path using --ffmpeg-location
exit status 1

So it would be a good feature to also install ffmpeg if it's not present when calling MustInstall or Install.

🔎 Describe alternatives you've considered

The only alternative is to give the user an error if ffmpeg is not installed if they want to run the tool or if I want to integrate it somewhere else. Or I need to make sure, I'll bring ffmpeg, so it will be always present.

⚠ If implemented, do you think this feature will be a breaking change to users?

No

⚙ Additional context

No response

🤝 Requirements

  • I have confirmed that someone else has not submitted a similar feature request.
  • If implemented, I believe this feature will help others, in addition to solving my problems.
  • I have looked into alternative solutions to the best of my ability.
  • (optional) I would be willing to contribute to testing this feature if implemented, or making a PR to implement this functionality.
@tygore587 tygore587 added the enhancement New feature or request label Oct 5, 2024
@lrstanley
Copy link
Owner

I've briefly looked into the feasibility of including ffmpeg, and it's not looking great so far.

  1. No single download provider provides ffmpeg for all operating systems.
    • BtbN only provides git-based with a timestamp, and only includes windows/linux
    • gyan.dev only includes windows
    • johnvansickle.com provides linux static builds, however, the latest version is under a non-versioned URL, and old-releases doesn't provide the newest release, making it possible to get the latest release in a stable fashion. We'd either have to always fetch the latest, or always fetch an old version.
    • evermeet.cx provides macos based ffmpeg downloads

Given the different sources, this means a different download & extraction (including compression algorithm) solution for each, potentially different versioning for each, etc. This also doesn't include that we may not be able to properly validate all releases, as it looks like some of them aren't signed.

If I could find a single source that provides variants for all major operating systems, using all-git or all-release based builds, with some kind of signing key, that would be super helpful. Otherwise, I think this will be very low priority on the list.

@tygore587
Copy link
Author

tygore587 commented Oct 5, 2024

Thanks for your feedback. I will also google a little bit if I find something. I also thought about it again and my idea was maybe to just have an option for MustInstall to check if ffmpeg is installed? So it's returning an error and informing the user to install ffmpeg instead of failing in middle of a download process like it did for me? This would be good to know beforehand if you download an hour long (or longer) video.

@lrstanley
Copy link
Owner

I don't know if that's something that should be enabled by default (as I think there are various things you can do with yt-dlp that don't require ffmpeg), but I could see an option to install being "CheckFFMpeg" or similar.

@tygore587
Copy link
Author

Yeah I also woudln't activate it by default (also for backwards compatibility and like you said, if someone doesn't need ffmpeg) but as an option if you want to check for it.

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

No branches or pull requests

2 participants