FFMpeg Frame Rate Patch
Introduction
As of build 4754 of FFMpeg, the fields
frame_rate
and
frame_rate_base
have been removed from
struct AVCodecContext
. They have been replaced by a field
time_base
, from which the frame rate is calculated as
1 / time_base
.
Description of Patch
The patch introduces conditional code (based on the FFMpeg version) that handles both the old API (with
frame_rate
and
frame_rate_base
) and the new API (with
time_base
).
Note: I haven't had time to test the patch properly, only to the extent that it allows Motion to be compiled against the new FFMpeg API. Please test it and report any bugs.
Installation of Patch
zcat motion_3.2.2_snap3_ffmpeg_framerate_1.patch.gz | patch -p1
in the Motion source directory.
Change History of Patch
- Version 1: Adapted Motion to handle changes in the FFMpeg API as of build 4754.
This patch is included in motion-3.2.2_snap4
--
KennethLavrsen - 27 Jun 2005
I have compiled motion snap 4 against the latest ffmpeg and it now works with mpeg 4 movie creation !!!
--
MortenHansen - 30 Jun 2005