Motion - Ffmpeg Frame Rate Patch

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.

Discussion and Comments


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
Topic revision: r5 - 13 Aug 2005, KennethLavrsen
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.