2026-01-06 05:44:21 +05:30
# Installation
## Homebrew
The easiest way to install CCExtractor for Mac and Linux is through Homebrew:
```bash
brew install ccextractor
```
Note: If you don't have Homebrew installed, see [brew.sh](https://brew.sh/)
for installation instructions.
---
2017-12-14 02:31:10 +05:30
# Compiling CCExtractor
You may compile CCExtractor across all major platforms using `CMakeLists.txt` stored under `ccextractor/src/` directory. Autoconf and custom build scripts are also available. See platform specific instructions in the below sections.
Downloads for precompiled binaries and source code can be found [on our website](https://www.ccextractor.org?id=public:general:downloads).
Clone the latest repository from Github
2023-03-08 09:27:19 +05:30
```bash
2017-12-14 02:31:10 +05:30
git clone https://github.com/CCExtractor/ccextractor.git
```
2025-11-03 23:47:42 +05:30
### Hardsubx (Burned-in Subtitles) and FFmpeg Versions
CCExtractor's hardsubx feature extracts burned-in subtitles from videos using OCR. It requires FFmpeg libraries. The build system automatically selects appropriate FFmpeg versions for each platform:
- **Linux**: FFmpeg 6.x (default)
- **Windows**: FFmpeg 6.x (default)
- **macOS**: FFmpeg 8.x (default)
You can override the default by setting the `FFMPEG_VERSION` environment variable to `ffmpeg6`, `ffmpeg7`, or `ffmpeg8` before building. This flexibility ensures compatibility with different FFmpeg installations across platforms.
2024-07-17 08:47:57 +05:30
## Docker
You can now use docker image to build latest source of CCExtractor without any environmental hustle. Follow these [instructions](https://github.com/CCExtractor/ccextractor/tree/master/docker/README.md) for building docker image & usage of it.
2017-12-14 02:31:10 +05:30
## Linux
1. Make sure all the dependencies are met.
2019-06-11 17:29:46 -05:00
Debian:
2019-09-28 07:46:39 +05:30
```bash
2023-12-11 18:56:06 +05:30
sudo apt-get install -y libgpac-dev libglew-dev libglfw3-dev cmake gcc libcurl4-gnutls-dev tesseract-ocr libtesseract-dev libleptonica-dev clang libclang-dev
2017-12-14 02:31:10 +05:30
```
2019-06-11 17:29:46 -05:00
2024-03-24 18:34:20 +01:00
RHEL/Fedora:
2019-09-28 07:46:39 +05:30
```bash
2024-03-24 18:34:20 +01:00
yum install -y glew-devel glfw-devel cmake gcc libcurl-devel tesseract-devel leptonica-devel clang gpac-devel
2019-06-11 17:29:46 -05:00
```
2023-03-08 09:27:19 +05:30
Arch:
```bash
2024-04-05 12:07:39 +08:00
sudo paru -S glew glfw curl tesseract leptonica cmake gcc clang gpac
2023-03-08 09:27:19 +05:30
```
2025-12-09 20:38:55 +05:30
or
```bash
sudo pacman -S glew glfw curl tesseract leptonica cmake gcc clang gpac
```
2023-03-08 09:27:19 +05:30
Rust 1.54 or above is also required. [Install Rust](https://www.rust-lang.org/tools/install). Check specific compilation methods below, on how to compile without rust.
2019-06-11 17:29:46 -05:00
2023-12-11 18:56:06 +05:30
**Note:** On Ubuntu Version 23.10 (Mantic) and later, `libgpac-dev` isn't available, you should build gpac from source by following the easy build instructions [here](https://github.com/gpac/gpac/wiki/GPAC-Build-Guide-for-Linux)
2021-12-13 21:59:53 +05:30
**Note:** On Ubuntu Version 18.04 (Bionic) and later, `libtesseract-dev` is installed rather than `tesseract-ocr-dev`, which does not exist anymore.
2017-12-14 02:31:10 +05:30
**Note:** On Ubuntu Version 14.04 (Trusty) and earlier, you should build leptonica and tesseract from source
2. Compiling
2019-12-30 14:03:47 +00:00
### Using the build script
2023-03-08 09:27:19 +05:30
2021-02-16 12:56:20 +05:30
By default build script does not include debugging information hence, you cannot debug the executable produced (i.e. `./ccextractor`) on a debugger. To include debugging information, use the `builddebug` script.
2017-12-14 02:31:10 +05:30
2019-09-28 07:46:39 +05:30
```bash
2023-03-08 09:27:19 +05:30
# navigate to linux directory and call the build script
2017-12-14 02:31:10 +05:30
cd ccextractor/linux
2021-02-16 12:56:20 +05:30
# compile without debug flags
2017-12-14 02:31:10 +05:30
./build
2021-02-16 12:56:20 +05:30
# compile with debug info
2024-01-15 08:50:36 +00:00
./build -debug # same as ./builddebug
2023-03-12 21:08:06 +05:30
2025-11-03 23:47:42 +05:30
# compile with hardsubx (burned-in subtitle extraction)
# Hardsubx requires FFmpeg libraries. Different FFmpeg versions are used by default:
# - Linux: FFmpeg 6.x (automatic)
# - Windows: FFmpeg 6.x (automatic)
# - macOS: FFmpeg 8.x (automatic)
./build -hardsubx # uses platform-specific FFmpeg version
2023-03-20 15:06:39 +01:00
2025-11-03 23:47:42 +05:30
# To override the default FFmpeg version, set FFMPEG_VERSION:
FFMPEG_VERSION=ffmpeg8 ./build -hardsubx # force FFmpeg 8 on any platform
FFMPEG_VERSION=ffmpeg6 ./build -hardsubx # force FFmpeg 6 on any platform
FFMPEG_VERSION=ffmpeg7 ./build -hardsubx # force FFmpeg 7 on any platform
# [Optional] For custom FFmpeg installations, set these environment variables:
FFMPEG_INCLUDE_DIR=/usr/include
FFMPEG_PKG_CONFIG_PATH=/usr/lib/pkgconfig
2023-03-12 21:08:06 +05:30
2021-02-16 12:56:20 +05:30
2017-12-14 02:31:10 +05:30
# test your build
./ccextractor
```
2019-12-30 14:03:47 +00:00
### Standard linux compilation through Autoconf scripts
2017-12-14 02:31:10 +05:30
2019-09-28 07:46:39 +05:30
```bash
2023-03-08 09:27:19 +05:30
sudo apt-get install autoconf # dependency to generate configuration script
2017-12-14 02:31:10 +05:30
cd ccextractor/linux
./autogen.sh
2025-12-09 20:38:55 +05:30
./configure
2017-12-14 02:31:10 +05:30
make
# test your build
./ccextractor
2018-03-09 03:03:52 +05:30
# make build systemwide
sudo make install
2017-12-14 02:31:10 +05:30
```
2019-12-30 14:03:47 +00:00
### Using CMake
2017-12-14 02:31:10 +05:30
2019-09-28 07:46:39 +05:30
```bash
2023-03-08 09:27:19 +05:30
# create and navigate to directory where you want to store built files
2017-12-14 02:31:10 +05:30
cd ccextractor/
mkdir build
cd build
2023-03-08 09:27:19 +05:30
# generate makefile using cmake and then compile
2021-11-09 17:30:21 -08:00
cmake ../src/ # options here
2017-12-14 02:31:10 +05:30
make
# test your build
./ccextractor
2018-03-09 03:03:52 +05:30
# make build systemwide
sudo make install
2017-12-14 02:31:10 +05:30
```
2021-11-09 17:30:21 -08:00
`cmake` also accepts the options:
`-DWITH_OCR=ON` to enable OCR
2025-11-03 23:47:42 +05:30
`-DWITH_HARDSUBX=ON` to enable burned-in subtitles (requires FFmpeg)
2023-03-20 15:06:39 +01:00
2025-11-03 23:47:42 +05:30
For hardsubx with specific FFmpeg versions:
Set `FFMPEG_VERSION=ffmpeg6` for FFmpeg 6.x (default on Linux and Windows)
Set `FFMPEG_VERSION=ffmpeg7` for FFmpeg 7.x
Set `FFMPEG_VERSION=ffmpeg8` for FFmpeg 8.x
(Defaults: Linux=FFmpeg 6, Windows=FFmpeg 6, macOS=FFmpeg 8)
([OPTIONAL] For custom FFmpeg installations, set these environment variables)
2023-03-20 15:06:39 +01:00
FFMPEG_INCLUDE_DIR=/usr/include
FFMPEG_PKG_CONFIG_PATH=/usr/lib/pkgconfig
2017-12-14 02:31:10 +05:30
2022-03-07 17:50:11 +05:30
### Compiling with GUI
2017-12-14 02:31:10 +05:30
2022-03-07 17:50:11 +05:30
The GUI for CCExtractor has been moved to a separate repository ([https://github.com/CCExtractor/ccextractorfluttergui](https://github.com/CCExtractor/ccextractorfluttergui)).
2017-12-14 02:31:10 +05:30
## macOS
2021-11-09 17:30:21 -08:00
1. Make sure all the dependencies are met. Decide if you want OCR; if so, you'll need to install tesseract and leptonica.
Dependencies can be installed via Homebrew as:
2017-12-14 02:31:10 +05:30
2019-09-28 07:46:39 +05:30
```bash
2017-12-14 02:31:10 +05:30
brew install pkg-config
brew install autoconf automake libtool
2025-04-11 11:14:08 +05:30
brew install cmake gpac
2021-11-09 17:30:21 -08:00
# optional if you want OCR:
2017-12-14 02:31:10 +05:30
brew install tesseract
brew install leptonica
2025-11-03 23:47:42 +05:30
# optional if you want hardsubx (burned-in subtitle extraction):
brew install ffmpeg
2017-12-14 02:31:10 +05:30
```
2021-11-09 17:30:21 -08:00
If configuring OCR, use pkg-config to verify tesseract and leptonica dependencies, e.g.
2017-12-14 02:31:10 +05:30
2019-09-28 07:46:39 +05:30
```bash
2017-12-14 02:31:10 +05:30
pkg-config --exists --print-errors tesseract
pkg-config --exists --print-errors lept
2019-09-28 07:46:39 +05:30
```
2017-12-14 02:31:10 +05:30
2019-12-30 14:03:47 +00:00
### Compiling
2017-12-14 02:31:10 +05:30
2019-12-30 14:03:47 +00:00
#### Using build.command script:
2017-12-14 02:31:10 +05:30
2019-09-28 07:46:39 +05:30
```bash
2017-12-14 02:31:10 +05:30
cd ccextractor/mac
2025-11-03 23:47:42 +05:30
./build.command # basic build
./build.command -ocr # build with OCR support
./build.command -hardsubx # build with hardsubx (uses FFmpeg 8 by default on macOS)
# Override FFmpeg version if needed:
FFMPEG_VERSION=ffmpeg7 ./build.command -hardsubx
2017-12-14 02:31:10 +05:30
# test your build
./ccextractor
```
2019-12-30 14:03:47 +00:00
#### Using CMake
2017-12-14 02:31:10 +05:30
2019-09-28 07:46:39 +05:30
```bash
2023-03-08 09:27:19 +05:30
# create and navigate to directory where you want to store built files
2017-12-14 02:31:10 +05:30
cd ccextractor/
mkdir build
cd build
2023-03-08 09:27:19 +05:30
# generate makefile using cmake and then compile
2021-11-09 17:30:21 -08:00
cmake ../src/ # options here
2017-12-14 02:31:10 +05:30
make
# test your build
./ccextractor
```
2021-11-09 17:30:21 -08:00
`cmake` also accepts the options:
`-DWITH_OCR=ON` to enable OCR
`-DWITH_HARDSUBX=ON` to enable burned-in subtitles
2019-12-30 14:03:47 +00:00
#### Standard compilation through Autoconf scripts:
2017-12-14 02:31:10 +05:30
2019-09-28 07:46:39 +05:30
```bash
2017-12-14 02:31:10 +05:30
cd ccextractor/mac
./autogen.sh
2025-12-09 20:38:55 +05:30
./configure
2017-12-14 02:31:10 +05:30
make
# test your build
./ccextractor
```
2019-12-30 14:03:47 +00:00
#### Compiling with GUI:
2017-12-14 02:31:10 +05:30
2022-03-07 17:50:11 +05:30
The GUI for CCExtractor has been moved to a separate repository ([https://github.com/CCExtractor/ccextractorfluttergui](https://github.com/CCExtractor/ccextractorfluttergui)).
2017-12-14 02:31:10 +05:30
## Windows
2023-08-18 01:33:03 +05:30
Dependencies are clang and rust. To enable OCR, rust x86_64-pc-windows-msvc or i686-pc-windows-msvc target should be installed
GPAC is also required, you can install it through chocolatey:
```
choco install gpac
```
2021-11-14 23:33:39 +05:30
2023-03-14 03:47:30 +05:30
Other dependencies are required through vcpkg, so you can follow below steps:
1. Download vcpkg (prefer version `2023.02.24` as it is supported)
2. Integrate vcpkg into your system, run the below command in the downloaded vcpkg folder:
2023-03-21 22:23:55 +05:30
```
vcpkg integrate install
```
2023-03-14 03:47:30 +05:30
3. Set Environment Variable for Vcpkg triplet, you can choose between x86 or x64 based on your system.
2023-03-21 22:23:55 +05:30
```
2023-05-22 18:38:52 +05:30
setx VCPKG_DEFAULT_TRIPLET "x64-windows-static"
setx RUSTFLAGS "-Ctarget-feature=+crt-static"
2023-03-21 22:23:55 +05:30
```
4. Install dependencies from vcpkg
2023-05-22 18:38:52 +05:30
In this step we are using `x64-windows-static` triplet, but you will have to use the triplet you set in Step 3
2023-03-21 22:23:55 +05:30
if building Debug-Full, Release-Full (HardSubx)
```
2023-05-22 18:38:52 +05:30
vcpkg install ffmpeg leptonica tesseract --triplet x64-windows-static
2023-03-21 22:23:55 +05:30
```
2025-11-03 23:47:42 +05:30
Note: Windows builds use FFmpeg 6 by default. To override:
```
set FFMPEG_VERSION=ffmpeg8
msbuild ccextractor.sln /p:Configuration=Debug-Full /p:Platform=x64
```
2023-03-21 22:23:55 +05:30
otherwise if you have Debug, Release
```
2023-05-22 18:38:52 +05:30
vcpkg install libpng --triplet x64-windows-static
2023-03-21 22:23:55 +05:30
```
2023-03-14 03:47:30 +05:30
2018-10-29 05:26:44 +02:00
Note: Following screenshots and steps are based on Visual Studio 2017, but they should be more or less same for other versions.
2017-12-14 02:31:10 +05:30
2023-05-29 20:34:15 +02:00
1.Open `windows/` directory to locate `ccextractor.vcxproj` and `ccextractor.sln` (red arrow).
2018-10-29 05:26:44 +02:00

2.Accept the security prompt (if any), to proceed with compilation.

3.Using Visual Studio (2015 or above), open ccextractor.sln. This will build both CCExtractor and its GUI. To build them separately, open the respective .vcxproj file.
4.In Solution Explorer, you'll see two projects with the VS version and Windows release version in parenthesis. Change them to parameters which are true for you by clicking right mouse button on project and selecting properties.


5.Right click and select `build` to compile the project and generate executable file.

6.Find the executable file in `Debug` or `Release` folder, based on selected configuration.

2017-12-14 02:31:10 +05:30
Configurations options are: `(Debug|Release)-Full`
Configurations options include dependent libraries which are used for OCR.
2019-12-30 14:03:47 +00:00
### Using CMake
2017-12-14 02:31:10 +05:30
You may also generate `.sln` files for Visual Studio and build using build tools, or open `.sln` files using Visual Studio.
2019-09-28 07:46:39 +05:30
```bash
2017-12-14 02:31:10 +05:30
cmake ../src/ -G "Visual Studio 14 2015"
cmake --build . --config Release --ccextractor
```
2021-11-14 23:33:39 +05:30
### Using MSBuild
Run the following command in `windows/` directory
```bash
msbuild ccextractor.sln /p:Configuration=Release /p:Platform=x64
```
Different configuration options are,
| Configuration | Platform | Rust target required |
| ------------- |:-------------:| -----:|
| Release | x64 | default |
| Debug | x64 | default |
| Release-Full(OCR) | Win32 | i686-pc-windows-msvc |
| Debug-Full(OCR) | Win32 | i686-pc-windows-msvc |
2017-12-14 02:31:10 +05:30
## Building Installation Packages
### Arch Linux
Go to the package_creators folder using `cd` and run the `./arch.sh`
### Redhat Package Manager (rpm) based Linux Distributions
Go to the package_creators folder using `cd` and run the `./rpm.sh`