rbash88 / pyffmpeg

Automatically exported from code.google.com/p/pyffmpeg
0 stars 0 forks source link

Mac OSX #27

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
dlopen("/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-pac
kages/pyffmpeg.so", 2);
Traceback (most recent call last):
  File "fast_keyframes_extraction.py", line 8, in <module>
    from pyffmpeg import *
ImportError: 
dlopen(/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-pack
ages/pyffmpeg.so, 2): Symbol not found: _av_close_input_file
  Referenced from: /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pyffmpeg.so
  Expected in: dynamic lookup

Using Python Version 2.6.5
Cython version 0.13
numpy version 1.5.0
pyffmpeg version 2.0

FFmpeg version SVN-r25083, Copyright (c) 2000-2010 the FFmpeg developers
  built on Sep  9 2010 12:42:43 with gcc 4.2.1 (Apple Inc. build 5664)
  configuration: --disable-static --enable-shared --enable-gpl --enable-nonfree --enable-libmp3lame --enable-libfaac --enable-libx264
  libavutil     50.26. 0 / 50.26. 0
  libavcore      0. 9. 0 /  0. 9. 0
  libavcodec    52.87. 5 / 52.87. 5
  libavformat   52.78. 3 / 52.78. 3
  libavdevice   52. 2. 2 / 52. 2. 2
  libavfilter    1.38. 3 /  1.38. 3
  libswscale     0.11. 0 /  0.11. 0

Full Trace Attached

Original issue reported on code.google.com by sysh...@gmail.com on 9 Sep 2010 at 5:02

Attachments:

GoogleCodeExporter commented 8 years ago
Sorry, I forgot to modify the title before submitting.  

Also, this is being done on OSX 10.6

Original comment by sysh...@gmail.com on 9 Sep 2010 at 5:03

GoogleCodeExporter commented 8 years ago
Sorry for late reply, I was really busy in september, I had a quick look at 
this issue, so far I dont have clue about the reason for which you are missing 
this symbol.
I recenlty installled pyffmpeg on a mac, I did not had any trouble.

I will try to make a new install on my MAC with latest source..

Thanks for letting us know about this issue, let me know if you found out the 
reason why it failed.

Original comment by bertrand...@gmail.com on 6 Oct 2010 at 1:54

GoogleCodeExporter commented 8 years ago
I am also having this issue

>>> import ffmpeg
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named ffmpeg
>>> import pyffmpeg
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: 
dlopen(/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-pack
ages/pyffmpeg.so, 2): Symbol not found: _av_close_input_file
  Referenced from: /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pyffmpeg.so
  Expected in: dynamic lookup

Original comment by moa...@gmail.com on 11 Oct 2010 at 2:26

GoogleCodeExporter commented 8 years ago
Have you built FFMPEG on your own, or are you using a standard distribution 
system such as MacPort or Fink.. I will try to reproduce the problem on my Mac.

Also can you please type 

ldd pyfmmpeg.so

Thanks for your report.

Original comment by bertrand...@gmail.com on 11 Oct 2010 at 12:33

GoogleCodeExporter commented 8 years ago
I tried on Python 2.6, Mac OS X 10.6 with macports, I had no linking problem.

I however encountered a few bugs during the install that I will try to solve, 
so that later install on mac work more smoothly.

Original comment by bertrand...@gmail.com on 11 Oct 2010 at 1:50

GoogleCodeExporter commented 8 years ago
I have my own compiled ffmpeg, it's in the default prefix though.

./configure --enable-libx264 --enable-gpl --disable-doc --disable-avdevice 
--enable-shared --enable-libmp3lame

which ffmpeg
/usr/local/bin/ffmpeg

I'm using Activestate python community edition, however they have numpy as part 
of their $1000 business edition, so I've installed it from the numpy project 
sourceforge package 
<http://sourceforge.net/projects/numpy/files/NumPy/1.5.0/numpy-1.5.0-py2.6-pytho
n.org.dmg/download>

There's no ldd on mac, but I think this is the equivalent:
$ otool -L 
/Users/mat/Sources/pyffmpeg-2.0/build/lib.macosx-10.3-fat-2.6/pyffmpeg.so
/Users/mat/Sources/pyffmpeg-2.0/build/lib.macosx-10.3-fat-2.6/pyffmpeg.so 
(architecture ppc):
    /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current version 315.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.0)
/Users/mat/Sources/pyffmpeg-2.0/build/lib.macosx-10.3-fat-2.6/pyffmpeg.so 
(architecture i386):
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.0)

And I'm curious about what happens with sound when I get it working, as I don't 
think alsa or oss have much effect on osx?

Original comment by moa...@gmail.com on 12 Oct 2010 at 12:50

GoogleCodeExporter commented 8 years ago
Hmm, the output of otool is not providing the information I expected.
I'd like to be sure of the libraries we are bound with.

I want to have this information for avcodec, avformat, avutil and swscale.

Can we be sure that all the dynamic libraries that are used are well coming 
from the
latest version of FFMPEG  and not some ffmpeg lib that came with some other 
packages.

For the sound, we do not plan to use ALSA or OSS on mac :)
The FFMPEGReader will provide you the sound information as NumPy Array,
we have to find the suitable python library for playing it on macintosh after.

Hence, on a macintosh, you will probably not be able to use the examples 
for playing a video file with sound. However, you may visualize the 
spectrograms of
some sounds.

Let me know if you manage to be sure that you are linked fully against the 
correct FFMPEG libraries.

Original comment by bertrand...@gmail.com on 12 Oct 2010 at 8:07

GoogleCodeExporter commented 8 years ago
I tried adding the path to my ffmpeg sources to setup.py

else:
    ffmpegpath = '/opt/ffmpeg'
    for x in [ os.environ["HOME"]+"build/ffmpeg",  '/usr/local/ffmpeg',  '/opt/ffmpeg', os.environ["HOME"]+"/Sources/ffmpeg" ]:
        try:
             os.stat(x)
             ffmpegpath = x
        except:
            pass    

and it seemed to find it correctly.

At the end of building, the following architecture errors occured:
ld: warning: in /usr/local/lib/libavformat.dylib, file was built for 
unsupported file format which is not the architecture being linked (ppc)
ld: warning: in /usr/local/lib/libavcodec.dylib, file was built for unsupported 
file format which is not the architecture being linked (ppc)
ld: warning: in /usr/local/lib/libavutil.dylib, file was built for unsupported 
file format which is not the architecture being linked (ppc)
ld: warning: in /usr/local/lib/libswscale.dylib, file was built for unsupported 
file format which is not the architecture being linked (ppc)
ld: warning: in /usr/local/lib/libavformat.dylib, file was built for 
unsupported file format which is not the architecture being linked (i386)
ld: warning: in /usr/local/lib/libavcodec.dylib, file was built for unsupported 
file format which is not the architecture being linked (i386)
ld: warning: in /usr/local/lib/libavutil.dylib, file was built for unsupported 
file format which is not the architecture being linked (i386)
ld: warning: in /usr/local/lib/libswscale.dylib, file was built for unsupported 
file format which is not the architecture being linked (i386)

I am using 64 bit snowleopard with 64 bit kernel.

Original comment by moa...@gmail.com on 13 Oct 2010 at 12:37

GoogleCodeExporter commented 8 years ago

Original comment by martin.h...@gmail.com on 17 Mar 2011 at 11:32