Re: [cgkit-user] using cgkit wrappers to ffmpeg
Brought to you by:
mbaas
|
From: Matthias B. <mat...@gm...> - 2013-01-09 23:11:38
|
Hi Jonathan,
On 08.01.13 11:08, Jonathan Peirce wrote:
> So... I've built libavformat, libavcodec, ffmpeg etc. and these seem to
> be found/imported successfully by cgkit.ffmpeg but when I try to load my
> movie file I'm getting an erroneous error message about the file not
> being found:
>
> >>> from ffmpeg import findlib, avformat #I've dragged your ffmpeg to a
> separate loc
> >>> print os.path.isfile('jwpIntro.mov')
> True
> >>> ff = avformat.av_open_input_file('jwpIntro.mov')
> Traceback (most recent call last):
> File "/Users/jwp/Desktop/cgKit_ffmpeg.py", line 7, in <module>
> ff = avformat.av_open_input_file('jwpIntro.mov')
> File "/Users/jwp/code/ffmpeg/avformat.py", line 142, in
> av_open_input_file
> raise AVFormatError(ret)
> ffmpeg.avformat.AVFormatError: No such file or directory
>
> I'm a bit stumped about how to debug this further. Any idea what would
> cause the message?
First of all, those ffmpeg wrappers are quite experimental at this stage
and for the next release I have actually removed them from the docs and
the changelog.
The wrappers were built against a particular version of ffmpeg (I
believe it was 0.7 which I got from MacPorts) and currently, they won't
work with 1.0, for example.
So, the first thing to check is the version of ffmpeg you have
installed. You can actually use the bindings to query the version. Every
module has a function such as avcodec_version() which will return the
version as reported by the dynamic library. In ffmpeg.cppdefs you will
find the version numbers of the ffmpeg libs that the wrappers were built
against (LIBAVCODEC_VERSION_MAJOR|MINOR|MACRO, etc.).
I don't actually know what the policy of the ffmpeg guys is concerning
version numbers, but I guess once the major version number gets
increased there is probably some API change which will break any wrappers.
The wrappers probably need to be regenerated for the version you are
using and depending on the API changes, the mediafile module (which is
supposed to provide high-level access to audio/video files) needs to be
updated as well.
Cheers,
- Matthias -
|