# Replacing the FFmpeg libraries

The application loads FFmpeg through separate dynamic libraries. A recipient
may rebuild FFmpeg 8.1.2 from the included source archive with compatible
options and replace the files in `Contents/Frameworks/FFmpeg/lib`.

After replacing the libraries, ad-hoc sign the changed nested code and then the
application bundle. From the directory containing the application:

```sh
codesign --force --sign - "Application.app/Contents/Frameworks/FFmpeg/bin/ffmpeg"
codesign --force --sign - "Application.app/Contents/Frameworks/FFmpeg/bin/ffprobe"
find "Application.app/Contents/Frameworks/FFmpeg/lib" -type f -name '*.dylib' \
  -exec codesign --force --sign - {} \;
codesign --force --deep --sign - "Application.app"
```

Apple notarization will no longer apply after modification. This does not
restrict the LGPL right to modify, reverse engineer for debugging those
modifications, or replace the FFmpeg libraries.
