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

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) #348

Closed
saurabhbidwai opened this issue Dec 20, 2018 · 54 comments

Comments

@saurabhbidwai
Copy link

Steps to reproduce

from pydub import AudioSegment

Expected behavior

load the library

Actual behavior

C:\Users\DELL\Anaconda3\lib\site-packages\pydub\utils.py:165: 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)

Your System configuration

  • Python version: 3.6
  • Pydub version: 0.23.0
  • ffmpeg or avlib?:
  • ffmpeg/avlib version:
@saurabhbidwai
Copy link
Author

http://blog.gregzaal.com/how-to-install-ffmpeg-on-windows/

@ChristofHenkel
Copy link

same on ubuntu 18.04

@Rajan-sust
Copy link

For ubuntu 18.04 just install ffmpeg

sudo apt install ffmpeg

@naveen-marthala
Copy link

@Rajan-sust how do i do that on windows10?

@app-src
Copy link

app-src commented Mar 21, 2020

@Rajan-sust how do i do that on windows10?

pip install ffmpeg

In cmd

@danielcjacobs
Copy link

I installed ffmpeg on windows using "python3 -m pip install ffmpeg" and it successfully installed, but I still get the same error message.

@naveen-marthala
Copy link

naveen-marthala commented May 12, 2020

first download ffmpeg from official website and include it in your path. then do pip install ffmpeg and then you will be able to use it without any problems.

@arthavmane
Copy link

arthavmane commented May 13, 2020

first download ffmpeg from official website and include it in your path. then do pip install ffmpeg and you can then use will be able to use it without any problems.

I'm sorry but I'm a beginner. What does "include it in your path" mean? Do I need to download the source code file to a specific location?

@naveen-marthala
Copy link

naveen-marthala commented May 13, 2020

by path i mean 'system environment variables'. include ffmpeg's location in your environment variables. Edit your variables and include location of it in your path like this:
Annotation 2020-05-13 134755

@arthavmane
Copy link

Yes done. Thank you so much. It worked!

@CJSparrow
Copy link

doesn't work for me :)

@GreyAlien502
Copy link
Collaborator

@CJSparrow, does running the command "ffmpeg" work?

@CJSparrow
Copy link

Yeah it does work

@SubhamSubhasisPatra
Copy link

just add the class path

for mac-OS

export PATH="/Users/yourmacname/Downloads/ffmpeg-20200608-d29aaf1-macos64-static/bin:$PATH"

@hsriv0777
Copy link

by path i mean 'system environment variables'. include ffmpeg's location in your environment variables. Edit your variables and include location of it in your path like this:
Annotation 2020-05-13 134755

Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning

I have been facing this problem for three days, I have tried all the methods but still this error has come. please help me!

@hsriv0777
Copy link

e.

For ubuntu 18.04 just install ffmpeg

sudo apt install ffmpeg

["Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning"]
i am using windows 10
I have been facing this problem for three days, I have tried all the methods but still this error has come. please help me!

@naveen-marthala
Copy link

If python couldn't find ffmpeg, possbile reasons(but not limited to) are:

  1. you have ffmpeg properly in place. But, the ffmpeg your path refers to, is not bin folder of ffmpeg or there many not be a bin folder at all or there are some mistake in the path iteself.
  2. you have set path properly. But, the ffmpeg may not have been properly downloaded or the directory structure is not what python is looking for.

@MacKenzieHnC
Copy link

Similar situation, but I can use it from the Windows 10 command prompt, but not Anaconda. I've tried all of the techniques previously mentioned.

Does Python get the directory from the Windows path? Or should I refer to something in my Anaconda folder?

@naveen-marthala
Copy link

Similar situation, but I can use it from the Windows 10 command prompt, but not Anaconda. I've tried all of the techniques previously mentioned.

Does Python get the directory from the Windows path? Or should I refer to something in my Anaconda folder?

I don't know what actually causes this behaviour. But, try including ffmpeg path in user variables, not just system variables.

@KvaksMan
Copy link

KvaksMan commented Sep 16, 2020

http://blog.gregzaal.com/how-to-install-ffmpeg-on-windows/

I have installed ffmpeg for windows but I get this error.

  File "D:\Python\lib\site-packages\pydub\utils.py", line 170
    warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)
RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work```

@Ant-007
Copy link

Ant-007 commented Sep 29, 2020

Can you guys please help me with this error I tried everything like adding it to env and all that stuff but it's still giving me the same error? I'm trying to do large audio files to text.

@karol-nowakowski
Copy link

If you're on Windows and Anaconda, try installing the ffmpeg package distributed by Anaconda, like this:
conda install -c main ffmpeg (you can also install it from the Anaconda Navigator).
In my case, it worked without problems.

@rbracco
Copy link

rbracco commented Nov 19, 2020

Thanks @karol-nowakowski, the conda install -c main ffmpeg worked for me when nothing else did (I tried both pip install and manual install from source and add ffmpeg to path.

@TheDavidFin
Copy link

I have the same problem: "Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work". But I already download ffmpeg, add path to user and system variable, uninstall and install ffmpeg and pydub by pip, but nothing can help. I don't know what I can do more. The problem the same I windows 7 and in windows server. Please help me.

@GreyAlien502
Copy link
Collaborator

If get the warning Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work,
try putting the following code in your program to check if the path python gets is the one you expect.

import os; print(os.environ["PATH"].split(os.pathsep))

We should really be showing the user the output of this whenever there's a problem finding ffmpeg,
but evidently we currently don't.

@dzbanecznix
Copy link

for me pip install ffmpeg-python worked after I added ffmpeg to path

@aqasemi
Copy link

aqasemi commented Dec 31, 2020

if you already install ffmeg and add it to path, just reopen your IDE in my case it was vscode and you are ready to go.
"there is noneed to install the ffmeg or ffmeg-python libraries using pip".

@omegastripes
Copy link

if you already install ffmeg and add it to path, just reopen your IDE in my case it was vscode and you are ready to go.
"there is noneed to install the ffmeg or ffmeg-python libraries using pip".

Additionally I had to relogin user to make it to work on windows.

@zeroalphagit
Copy link

After install ffmepg and adding it to the system variables path i had to restart my IDE

@NathanRibeiroC
Copy link

If you're on Windows and Anaconda, try installing the ffmpeg package distributed by Anaconda, like this:
conda install -c main ffmpeg (you can also install it from the Anaconda Navigator).
In my case, it worked without problems.

Worked for me, the ones that are in trouble installing packages on anaconda, always try using: conda package install command, because it organizes better the path in order to work fine with anaconda enviroments.

Thanks bro.

@tatashbar
Copy link

conda install -c main ffmpeg worked for me

@alec-jensen
Copy link

For windows users: Install chocolatey (https://chocolatey.org/install) then run choco install ffmpeg

@alixaprodev
Copy link

if you already install ffmeg and add it to path, just reopen your IDE in my case it was vscode and you are ready to go.
"there is noneed to install the ffmeg or ffmeg-python libraries using pip".

Thank you so much it worked

@shanmukh05
Copy link

If you're on Windows and Anaconda, try installing the ffmpeg package distributed by Anaconda, like this:
conda install -c main ffmpeg (you can also install it from the Anaconda Navigator).
In my case, it worked without problems.

You're my life saver😅

@sheloholes
Copy link

If you're on Windows and Anaconda, try installing the ffmpeg package distributed by Anaconda, like this:
conda install -c main ffmpeg (you can also install it from the Anaconda Navigator).
In my case, it worked without problems.

You're my life saver😅

what this -c does?

@karol-nowakowski
Copy link

If you're on Windows and Anaconda, try installing the ffmpeg package distributed by Anaconda, like this:
conda install -c main ffmpeg (you can also install it from the Anaconda Navigator).
In my case, it worked without problems.

You're my life saver😅

what this -c does?

It specifies which repository (channel) to take the package from (in this case, main, which includes packages built by Anaconda). If you omit this, conda will install the default version which may or may not work.

@chuongmep
Copy link

For windows users: Install chocolatey (https://chocolatey.org/install) then run choco install ffmpeg

It working for me.

@dstushar7
Copy link

For windows users: Install chocolatey (https://chocolatey.org/install) then run choco install ffmpeg

This worked well.

@mdequanter
Copy link

by path i mean 'system environment variables'. include ffmpeg's location in your environment variables. Edit your variables and include location of it in your path like this:
Annotation 2020-05-13 134755

Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning

I have been facing this problem for three days, I have tried all the methods but still this error has come. please help me!

That worked for me to!

@Fifanon
Copy link

Fifanon commented Jan 18, 2022

After adding the path C:\ffmpeg\bin to the environment variables, close any opened command line window, before the change takes effect.

@MicheleAwada
Copy link

first download ffmpeg from official website and include it in your path. then do pip install ffmpeg and then you will be able to use it without any problems.

but what if i want to make a game i cant tell people to go download that and do a bunch of stuff for it to work

@Fretless14
Copy link

I second @MicheleAwada. How would you package this?

@jiaaro
Copy link
Owner

jiaaro commented Jun 11, 2023

For folks making games, you can set the path to ffmpeg explicitly. Alternatively, pydub will also look for ffmpeg in the current working directory for your program

@Fretless14
Copy link

I made a folder for an edited version of Pydub and included ffmpeg/ffprobe/ffplay in a folder, and changed the utils.py file to point to those executables, and works great. I should be able to package it with the rest of the app when I get to pyinstaller.

@QinHsiu
Copy link

QinHsiu commented Jun 15, 2023

conda install -c main ffmpeg

it's work for me, thanks.

@pranav-chandrode
Copy link

If you're on Windows and Anaconda, try installing the ffmpeg package distributed by Anaconda, like this: conda install -c main ffmpeg (you can also install it from the Anaconda Navigator). In my case, it worked without problems.

It worked for me like a charm! Thank you.

@FrostFireFalcon
Copy link

FrostFireFalcon commented Jul 19, 2023

I did scoop install ffmpeg in windows powershell and it finally worked. I didn't need to add path to system variables.

@Shaked-g
Copy link

I followed this tutorial on Win10 and it solved it for me.
basically downloading and adding to PATH.

https://phoenixnap.com/kb/ffmpeg-windows

@samycrash
Copy link

samycrash commented Sep 3, 2023

#- download the ffmpeg from the website (https://ffmpeg.org/download.html)
#- extract the ffmpeg, in bin you will see ffmpeg.exe
#- copy that file to your project file, and now run it again, i think it must done.

@Basit-Arif
Copy link

first download ffmpeg from official website and include it in your path. then do pip install ffmpeg and then you will be able to use it without any problems.

how to do this thing in Mac OS

@JonathanYang-yzh
Copy link

I installed ffmpeg and added it to PATH successfully. I verified with the command ffmpeg -help in cmd. But I am still getting this warning.

@MOTURUPRAVEENBHARGAV
Copy link

#348 (comment)

This helped me. Thank You @samycrash

@maxpetrusenko
Copy link

This helped me on m2:

brew install ffmpeg

@chai-13w
Copy link

I followed this tutorial on Win10 and it solved it for me. basically downloading and adding to PATH.

https://phoenixnap.com/kb/ffmpeg-windows

It solved my problem very effectively!

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