Skip to content

Commit 5280eb6

Browse files
authored
build: ffmpeg 8 support (AcademySoftwareFoundation#4870)
* Try a build against ffmpeg 8 -- seems to work out of the box, so document that we support that version in INSTALL.md. * Augment FindFFmpeg.cmake to correctly identify 7.1 and 8.0 by the very non-intuitive versioning scheme of ffmpeg's headers. * Add a FFMPEG_EXTRA_LIBRARIES variable to FindFFmpeg.cmake to allow us to easily inject extra library dependencies (coincidentally, I need this at work to force it to use static libraries). Signed-off-by: Larry Gritz <[email protected]>
1 parent b979bac commit 5280eb6

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

INSTALL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ NEW or CHANGED MINIMUM dependencies since the last major release are **bold**.
4949
* If you want support for camera "RAW" formats:
5050
* LibRaw >= 0.20 (tested though 0.21.4 and master)
5151
* If you want support for a wide variety of video formats:
52-
* ffmpeg >= 4.0 (tested through 7.1)
52+
* ffmpeg >= 4.0 (tested through 8.0)
5353
* If you want support for jpeg 2000 images:
5454
* OpenJpeg >= 2.0 (tested through 2.5.3; we recommend 2.4 or higher
5555
for multithreading support)

src/cmake/modules/FindFFmpeg.cmake

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,11 @@ if (FFMPEG_INCLUDES)
7373
REGEX "^#define LIBAVCODEC_VERSION_MICRO .*$")
7474
string (REGEX MATCHALL "[0-9]+[.0-9]+" LIBAVCODEC_VERSION_MICRO "${TMP}")
7575
set (LIBAVCODEC_VERSION "${LIBAVCODEC_VERSION_MAJOR}.${LIBAVCODEC_VERSION_MINOR}.${LIBAVCODEC_VERSION_MICRO}")
76-
if (LIBAVCODEC_VERSION VERSION_GREATER_EQUAL 61.3.100)
76+
if (LIBAVCODEC_VERSION VERSION_GREATER_EQUAL 62.11.100)
77+
set (FFMPEG_VERSION 8.0)
78+
elseif (LIBAVCODEC_VERSION VERSION_GREATER_EQUAL 61.19.101)
79+
set (FFMPEG_VERSION 7.1)
80+
elseif (LIBAVCODEC_VERSION VERSION_GREATER_EQUAL 61.3.100)
7781
set (FFMPEG_VERSION 7.0)
7882
elseif (LIBAVCODEC_VERSION VERSION_GREATER_EQUAL 60.31.102)
7983
set (FFMPEG_VERSION 6.1)
@@ -130,6 +134,7 @@ if (FFmpeg_FOUND)
130134
${FFMPEG_LIBAVFORMAT}
131135
${FFMPEG_LIBAVUTIL}
132136
${FFMPEG_LIBSWSCALE}
137+
${FFMPEG_EXTRA_LIBRARIES}
133138
)
134139
endif ()
135140

0 commit comments

Comments
 (0)