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

Add ffmpeg4 installation instructions in warnings #5167

Conversation

polinaeterna
Copy link
Contributor

@polinaeterna polinaeterna commented Oct 26, 2022

Adds instructions on how to install ffmpeg=4 on Linux (relevant for Colab users).

Looks pretty ugly because I didn't find a way to check ffmpeg version from python (without subprocess.call(); ctypes.util.find_library doesn't work`), so the warning is raised on each decoding. Any suggestions on how to make it look nice are welcome!

This is how it looks on Colab:
image

@polinaeterna polinaeterna self-assigned this Oct 26, 2022
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Oct 26, 2022

The documentation is not available anymore as the PR was closed or merged.

Copy link
Member

@lhoestq lhoestq left a comment

Choose a reason for hiding this comment

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

thanks !

src/datasets/features/audio.py Outdated Show resolved Hide resolved
@lhoestq
Copy link
Member

lhoestq commented Oct 26, 2022

To make it warn only once, feel free to use a global counter in python - and if the warning has already been done, you don't do it again

Co-authored-by: Quentin Lhoest <42851186+lhoestq@users.noreply.github.com>
Copy link
Member

@lhoestq lhoestq left a comment

Choose a reason for hiding this comment

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

Added the same formatting for the error message :) thanks !

Oh and regarding the warning counter, you can do it in another PR maybe ?

src/datasets/features/audio.py Outdated Show resolved Hide resolved
Co-authored-by: Quentin Lhoest <42851186+lhoestq@users.noreply.github.com>
@polinaeterna
Copy link
Contributor Author

Added the same formatting for the error message :)

nice!! thank you!

Oh and regarding the warning counter, you can do it in another PR maybe ?

Yes, more warnings is better then no warnings.... I'll merge when the CI passes

@polinaeterna polinaeterna merged commit 669121c into huggingface:main Oct 27, 2022
@polinaeterna polinaeterna deleted the add-ffmpeg4-installation-instructions branch October 27, 2022 08:59
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

Successfully merging this pull request may close these issues.

3 participants