intonormal / pyffmpeg

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

include_dirs for newer ffmpeg #6

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Newer ffmpeg seems to have .h files split into several directories

What steps will reproduce the problem?
1. install ffmpeg-0.4.9_p20080326
2. try to compile the extension
3. you'll notice following errors

pyffmpeg/pyffmpeg.c:14:25: error: mathematics.h: No such file or directory
pyffmpeg/pyffmpeg.c:15:20: error: avutil.h: No such file or directory
pyffmpeg/pyffmpeg.c:16:21: error: avcodec.h: No such file or directory
pyffmpeg/pyffmpeg.c:17:22: error: avformat.h: No such file or directory
pyffmpeg/pyffmpeg.c:18:18: error: avio.h: No such file or directory

Please provide any additional information below.

Can be fixed by adding additional include dirs into setup.py

            Extension("pyffmpeg", ["pyffmpeg/pyffmpeg.pyx"],
                include_dirs=["/usr/include/ffmpeg",
"/usr/include/libavutil", "/usr/include/libavcodec",
"/usr/include/libavformat"],
                libraries = ["avformat","avcodec"])
            ],

Original issue reported on code.google.com by r...@foobar.cz on 16 Jul 2008 at 7:01

GoogleCodeExporter commented 8 years ago
Well, I realized that to tweak include_dirs is not the last thing needed to 
force it
behave. For those who are interested I made a patch against version 0.2.0 that
compiles against ffmpeg with enabled libswscale (--enable-swscale). Hope it 
helps. ;-)

http://labs.logic.cz/patches/pyffmpeg-0.2.0.patch

Thank you for pyffmpeg! :-)

Original comment by r...@foobar.cz on 16 Jul 2008 at 11:27

GoogleCodeExporter commented 8 years ago

Original comment by bertrand...@gmail.com on 8 Jan 2010 at 3:30