funnymanva / ffmpeg-with-ac4

FFMpeg build script that adds AC4 decoder patches
MIT License
12 stars 1 forks source link

Build FFmpeg 6.1 with AC4 Audio Support (static or Docker image)

This is based on the original project here. Those files were updated with newer packages, FFmpeg 6.1 and the AC4 decoding patches.

build-ffmpeg

The FFmpeg build script provides an easy way to build a static FFmpeg on macOS and Linux with optional non-free and GPL codecs (--enable-gpl-and-non-free, see https://ffmpeg.org/legal.html) included.

How-To build FFmpeg on MacOS

Youtube: How-To build and install FFmpeg on macOS

Disclaimer And Data Privacy Notice

This script will download different packages with different licenses from various sources, which may track your usage. These sources are out of control by the developers of this script. Also, this script can create a non-free and unredistributable binary. By downloading and using this script, you are fully aware of this.

Use this script at your own risk.

Common installation (macOS, Linux)

$ git clone https://git.home.oriley.net/apps/ffmpeg.git
$ cd ffmpeg-build-script
$ ./build-ffmpeg --build

Supported Codecs

HardwareAccel

Apple M1 (Apple Silicon) Support

The script also builds FFmpeg on a new MacBook with an Apple Silicon M1 processor.

LV2 Plugin Support

If Python is available, the script will build a ffmpeg binary with lv2 plugin support.

Requirements

macOS

Linux

# Debian and Ubuntu
$ sudo apt install build-essential curl tcl

# Fedora
$ sudo dnf install @development-tools curl tcl

Build in Docker (Linux)

With Docker, FFmpeg can be built reliably without altering the host system.

Default

If you're running an operating system other than the one above, a completely static build may work. To build a full statically linked binary inside Docker, just run the following command:

$ docker build --tag=ffmpeg:default --output type=local,dest=build -f Dockerfile .

Run with Docker (macOS, Linux)

You can also run the FFmpeg directly inside a Docker container.

Default - Without CUDA (macOS, Linux)

A dockerized FFmpeg build can be executed with the following command:

$ sudo docker build --tag=ffmpeg .
$ sudo docker run ffmpeg -i https://files.coconut.co.s3.amazonaws.com/test.mp4 -f webm -c:v libvpx -c:a libvorbis - > test.mp4

Common build (macOS, Linux)

If you want to enable Vaapi, please refer to these and install the driver.

$ ./build-ffmpeg --build

Vaapi installation

You will need the libva driver, so please install it below.

# Debian and Ubuntu
$ sudo apt install libva-dev vainfo

# Fedora and CentOS
$ sudo dnf install libva-devel libva-intel-driver libva-utils

Usage

Usage: build-ffmpeg [OPTIONS]
Options:
  -h, --help                     Display usage information
      --version                  Display version information
  -b, --build                    Starts the build process
      --enable-gpl-and-non-free  Enable non-free codecs  - https://ffmpeg.org/legal.html
  -c, --cleanup                  Remove all working dirs
      --full-static              Complete static build of ffmpeg (eg. glibc, pthreads etc...) **only Linux**
                                 Note: Because of the NSS (Name Service Switch), glibc does not recommend static links.

Notes of static link

Original Project