-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
ImportError: "RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work" #21
Comments
Do you have ffmpeg installed ? |
After looking into installed packages, pydub has that error if you don't have a path to either ffmpeg or avconv in your system's PATH variable Here's the code from pydub if you're curious: def which(program):
"""
Mimics behavior of UNIX which command.
"""
# Add .exe program extension for windows support
if os.name == "nt" and not program.endswith(".exe"):
program += ".exe"
envdir_list = [os.curdir] + os.environ["PATH"].split(os.pathsep)
for envdir in envdir_list:
program_path = os.path.join(envdir, program)
if os.path.isfile(program_path) and os.access(program_path, os.X_OK):
return program_path
def get_encoder_name():
"""
Return enconder default application for system, either avconv or ffmpeg
"""
if which("avconv"):
return "avconv"
elif which("ffmpeg"):
return "ffmpeg"
else:
# should raise exception
warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)
return "ffmpeg" |
I am using this for conversion of pdf documents only and transcriptions are not required for my application. Do I still have to install ffmpeg? |
After looking into both the code of TLDR: Either you uninstall pydub if you don't need it. Or you install either ffmpeg or avconv to remove that error from
|
Audio Transcript:Error. Could not transcribe this audio. |
What did you try before getting this error ? |
The Pull Request got accepted. Can you please try again on the new version |
C:\Users\HP\AppData\Local\Programs\Python\Python310\lib\site-packages\pydub\utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work
warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)
The above error is encountered even if I just import the module "markitdown"
The text was updated successfully, but these errors were encountered: