greghmerrill
greghmerrill

Reputation: 705

What version of ffmpeg is bundled inside electron?

The prebuilt electron binaries for Windows include the file ffmpeg.dll. How can I determine what version of the underlying ffmpeg library is actually compiled to produce this dll? I need this information to understand what known vulnerabilities (CVE's, etc) might be in a given version of electron via ffmpeg.

As I understand it, the ffmpeg dll itself is taken from https://github.com/electron/nightlies/releases/ when I download my dependencies (I'm using electron-prebuilt-compile). But I'm not getting a clear picture of what the source for that binary is. I think it might be from https://chromium.googlesource.com/chromium/third_party/ffmpeg/ but then I'm not clear on the relationship of that repo with the original ffmpeg repo (e.g. how often are fixes merged from the ffmpeg repo to the chromium third-party repo, etc.)

I tried searching the content of the dll as per cody's suggestion, but no luck:

$ strings ffmpeg.dll  | grep -i ffmp
FFmpeg video codec #1
Huffyuv FFmpeg variant
Not yet implemented in FFmpeg, patches welcome
C:\projects\libchromiumcontent\src\out-x64\static_library\ffmpeg.dll.pdb
ffmpeg.dll


$ strings ffmpeg.dll  | grep -i version
H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2
MPEG-4 part 2 Microsoft variant version 1
MPEG-4 part 2 Microsoft variant version 2
MPEG-4 part 2 Microsoft variant version 3
H.263+ / H.263-1998 / H.263 version 2
On2 VP6 (Flash version)
On2 VP6 (Flash version, with alpha channel)
old standard qpel (autodetected per FOURCC/version)
direct-qpel-blocksize bug (autodetected per FOURCC/version)
edge padding bug (autodetected per FOURCC/version)
strictly conform to a older more strict version of the spec or reference software
minor_version
premiere_version
quicktime_version
Assume this x264 version if no x264 version found in any SEI

Upvotes: 3

Views: 3599

Answers (2)

j.snyder
j.snyder

Reputation: 535

I spent a few days working on this myself, and based on that time, this is what I have come up with.

Electron versions specify a version of Chromium that they are using, and Chromium has a fork of FFMPEG that it builds from source to generate the ffmpeg.dll file that goes to Electron builds for Windows. I traced a rough version of FFMPEG from a version of Electron with the following steps:

Seems the reason the ffmpeg.dll doesn't have a version is because its built by Chromium from source.

Upvotes: 7

cody
cody

Reputation: 11157

Search for it using strings, which is part of GNU binutils or available on Windows as a Sysinternals utility.

It appears that it simply follows the pattern FFmpeg version x.x, as shown below, where I search the avcodec.dll that is part of the 4.1 shared release build for Windows:

$ strings avcodec-58.dll | grep 'FFmpeg version'
FFmpeg version 4.1

Upvotes: 1

Related Questions