Closed GoogleCodeExporter closed 9 years ago
Are you using windows 32 bits / or windows 64 bits ?
Have you installed FFMPEG dll on your system ?
The wrapper is only a bridge for the DLL, the FFMPEG dll need to be installed
on your system.
The best way to be sure that they are installed is to copy them in windows
system directory.
Let me know if these first general advice help you finding the solution.
Original comment by bertr...@lm3labs.com
on 4 Jan 2011 at 3:36
I am experiencing the same problem and for some reason I can not seem to find
out what the rootcause is here.
I am using a 32bit windows system.
Python 2.6.5
FFMPEG DLL are installed as mentioned in your comment.
pyffmpeg-2.0.win32.zip unzip to C:\Python26\Lib\site-packages
Am I using the wrong version of FFMPEG?
avcodec-52.dll
avcore-0.dll
avdevice-52.dll
avfilter-1.dll
avformat-52.dll
avutil-50.dll
swscale-0.dll
Any suggestion is very much welcome.
Thanks.
Original comment by rut...@gmail.com
on 11 Jan 2011 at 10:39
I have not that much time to investigate, althought it is possible
that some API change in FFMPEG may have caused a new incompatibility, but
I'll finish to check nothing is wrong in the install...
Check that the FFMPEG DLL are found and loadable:
Tries the following 1. (in python):
import ctypes
ctypes.CDLL('avcodec-52.dll')
ctypes.CDLL('avcore-0.dll')
ctypes.CDLL('avformat-52.dll')
ctypes.CDLL('swscale-0.dll')
If the previous commands are successful,
check that the pyffmpeg pyd is correctly found....Download procmon from
sysinternals, run it, starts the logging, then open a new python session,
and type :
import pyffmpeg
stop the logging in procmon and Filter in order to "include only" all lines
that "contains" , "pyffmpeg", and check that there is at least one successful
for loading the library.
Sorry, this is a bit complex, but the error message is not informative enough
to know
what happened exactly...
Original comment by bertrand...@gmail.com
on 11 Jan 2011 at 2:09
I also have this problem:
import pyffmpeg
ImportError: DLL load failed: The specified module could not be found.
on both Win7 64bit & XP SP3 32bit.
After hours spent trying to find what is happening, and copying pyffmped.pyd
and ffmpeg to several locations, and tweaking paths, & installing the MS C++
redistributable 2008 (reported to fix some cases), and making no progress,
I found that there is a long-time known problem with *.pyd files,
(which may be the cause here) documented here:
http://bugs.python.org/issue4120 &
http://bugs.python.org/issue7833
Apparently the 'fix' is to compile the *.pyd with no Manifest, or with an empty
Manifest (these 2 states may act differently). This is getting into areas that
I don't know the details of.
Apparently .pyd files may run on one computer but not on another that is
superficially similar. If a particular piece of code happens to be sitting in a
particular location, it will run, hence (I assume) the C++ Redistributable
thing that 'fixes' some cases.
I don't have the expertise or energy to go about setting myself up to compile
different version of pyffmpeg.pyd, but if someone will provide me with them (no
Manifest, and empty Manifest) I'll test them, as I can easily reproduce the
problem.
Original comment by travo...@gmail.com
on 11 Jan 2011 at 4:14
Thanks for the quick reply.
Tried your proposal on ctypes:
import ctypes
ctypes.CDLL('avcodec-52.dll')
ctypes.CDLL('avcore-0.dll')
ctypes.CDLL('avformat-52.dll')
ctypes.CDLL('swscale-0.dll')
This worked without failure. No issue at all.
Attached logfile of procmon.
Thanks for your time and effort.
Original comment by rut...@gmail.com
on 11 Jan 2011 at 4:41
Attachments:
Hmm, the logs seems very fine.
So beside the possible bug referred by travosAB,
there remain the following possibilities :
1. some evolution in the FFMPEG the dll
(go to the folder containing the PYD file and try to do ...
import ctypes
ctypes.CDLL("pyffmpeg.pyd")
Normally this should fail, but the error message maybe more explicit than the one provided by python.
2. Some forgotten dependency (numpy for instance)
(if numpy is not installed , try to install it as it may solve the problem)
Regarding the bug referred by travosAB, I don t think it will change anything,
as pyffmeg has been compiled using MINGW, however I have quickly recompiled
with no MANIFEST and with empty MANIFEST the compressed files have the same size
...
If all of these fail, can you indicate me where you have downloaded your ffmpeg
library from so I can make my environment similar to your.
Thanks a lot for your help.
Bertrand
Original comment by bertrand...@gmail.com
on 11 Jan 2011 at 11:49
Attachments:
Hello Bertrand,
I see that you have provided pyffmpeg.pyd in two new flavours, empty-manifest &
no-manifest. Thank you. I began exploring their effects but am tired and
getting careless, so will leave that until (my) tomorrow.
BTW I'm in Alberta (source of the 'AB' in 'travosAB') at GMT-7
& I'm John Hall in my real life.
Your comment re compiling with MINGW noted, but the situation looks to be quite
complex and almost anything is possible.
Perhaps 'zhujun' can find something relevant via them before I get to it.
I'm now thinking I have a problem with the FFMpeg DLL, as your ctypes test does
not find them. I can't find anywhere to download just that DLL (presumably for
licensing reasons). Do you know of a source, or should I get set up to compile
it myself, as most users apparently do?
Original comment by travo...@gmail.com
on 12 Jan 2011 at 4:53
Hi Bertrand,
please find my results here below:
1: see attached TXT file.
2: numpy is already installed (also tried to start with imported numpy, but no
difference)
3: did binary comparison between the newly created files (nomanifest vs. empty)
between these files there is no difference.
Performed a binary comparison between the already installed pyffmpeg
(pyffmpeg-2.0.win32.zip) and the newly created files: no difference...
So this will not do any good.
4: Got my FFMPEG from: http://ffmpeg.arrozcru.org/autobuilds/
Downloaded from: win32 shared: A mingw32 shared build of FFmpeg.
file: ffmpeg-r26317-swscale-r32676-mingw32-shared.7z
To John: No license issue.. Download your DLLs here.
Thanks again for your support.
Rutger
Original comment by rut...@gmail.com
on 12 Jan 2011 at 10:27
Attachments:
Hi Rutger,
1. Unfortunately, this kind of error message does not really help us...
2. Good start...
3. Indeed...
4. I used, and upgraded the same binary distribution under win32 and it works
fine on my computer.
I have tried to disable PIL on my computer, and it still works fine...
As it work with the latest version on my computer, I believe that there is no
compatibility problem with ffmpeg,
however some DLL seems not to be resolved...
I checked the dependencies of the DLL, and I got the following dependencies :
Classical M$ libraries:
DLL Name: KERNEL32.dll
DLL Name: msvcr90.dll
DLL Name: msvcrt.dll
Usual FFMpeg :
DLL Name: avcodec-52.dll
DLL Name: avformat-52.dll
DLL Name: avutil-50.dll
DLL Name: swscale-0.dll
Python DLL (check that you have it !):
DLL Name: python26.dll
And surprise DLL related to MINGW, that I was not expecting there, maybe
removable via some compiler option:
DLL Name: libgcc_s_dw2-1.dll
This is probably this last dll that causes you troubles...
I attached it so you can try to use it, sorry for the troubles.
I will try to see how to get rid of this dependency..
Bertrand
Original comment by bertrand...@gmail.com
on 12 Jan 2011 at 12:38
Attachments:
Thank you Bertrand,
by adding 'libgcc_s_dw2-1.dll', this issue is solved !
Thanks again.
Rutger
Original comment by rut...@gmail.com
on 12 Jan 2011 at 12:47
Original comment by martin.h...@gmail.com
on 17 Mar 2011 at 11:31
Original issue reported on code.google.com by
zhujun20...@gmail.com
on 3 Jan 2011 at 4:35