Skip to content

Commit faa8444

Browse files
authored
Merge branch 'master' into feat/ssa-ass-precise-positioning
2 parents 4ec50cf + 2028754 commit faa8444

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+2432
-274
lines changed

.github/workflows/build_windows.yml

Lines changed: 65 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name: Build CCExtractor on Windows
33
env:
44
RUSTFLAGS: -Ctarget-feature=+crt-static
55
VCPKG_DEFAULT_TRIPLET: x64-windows-static
6-
VCPKG_DEFAULT_BINARY_CACHE: C:\vcpkg\.cache
76
VCPKG_COMMIT: ab2977be50c702126336e5088f4836060733c899
87

98
on:
@@ -25,104 +24,112 @@ on:
2524
- "src/rust/**"
2625

2726
jobs:
28-
build_release:
27+
build:
2928
runs-on: windows-2022
3029
steps:
3130
- name: Check out repository
3231
uses: actions/checkout@v6
32+
3333
- name: Setup MSBuild.exe
3434
uses: microsoft/[email protected]
3535
with:
3636
msbuild-architecture: x64
37+
38+
# Install GPAC (fast, ~30s, not worth caching complexity)
3739
- name: Install gpac
38-
run: choco install gpac --version 2.4.0
40+
run: choco install gpac --version 2.4.0 --no-progress
41+
42+
# Use lukka/run-vcpkg for better caching
3943
- name: Setup vcpkg
40-
run: mkdir C:\vcpkg\.cache
41-
- name: Cache vcpkg
42-
id: cache
44+
uses: lukka/run-vcpkg@v11
45+
id: runvcpkg
46+
with:
47+
vcpkgGitCommitId: ${{ env.VCPKG_COMMIT }}
48+
vcpkgDirectory: ${{ github.workspace }}/vcpkg
49+
vcpkgJsonGlob: 'windows/vcpkg.json'
50+
51+
# Cache vcpkg installed packages separately for faster restores
52+
- name: Cache vcpkg installed packages
53+
id: vcpkg-installed-cache
4354
uses: actions/cache@v5
4455
with:
45-
path: |
46-
C:\vcpkg\.cache
47-
key: vcpkg-${{ runner.os }}-${{ env.VCPKG_COMMIT }}
48-
- name: Build vcpkg
49-
run: |
50-
git clone https://github.com/microsoft/vcpkg
51-
./vcpkg/bootstrap-vcpkg.bat
52-
- name: Install dependencies
56+
path: ${{ github.workspace }}/vcpkg/installed
57+
key: vcpkg-installed-${{ runner.os }}-${{ env.VCPKG_COMMIT }}-${{ hashFiles('windows/vcpkg.json') }}
58+
restore-keys: |
59+
vcpkg-installed-${{ runner.os }}-${{ env.VCPKG_COMMIT }}-
60+
61+
- name: Install vcpkg dependencies
62+
if: steps.vcpkg-installed-cache.outputs.cache-hit != 'true'
5363
run: ${{ github.workspace }}/vcpkg/vcpkg.exe install --x-install-root ${{ github.workspace }}/vcpkg/installed/
5464
working-directory: windows
55-
- uses: actions-rs/toolchain@v1
65+
66+
# Cache Rust/Cargo artifacts
67+
- name: Cache Cargo registry
68+
uses: actions/cache@v5
69+
with:
70+
path: |
71+
~/.cargo/registry
72+
~/.cargo/git
73+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
74+
restore-keys: |
75+
${{ runner.os }}-cargo-registry-
76+
77+
# Cache Cargo build artifacts - rust.bat sets CARGO_TARGET_DIR to windows/
78+
# which results in artifacts at windows/x86_64-pc-windows-msvc/
79+
- name: Cache Cargo build artifacts
80+
uses: actions/cache@v5
5681
with:
57-
toolchain: stable
58-
override: true
82+
path: ${{ github.workspace }}/windows/x86_64-pc-windows-msvc
83+
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('src/rust/**/*.rs') }}
84+
restore-keys: |
85+
${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}-
86+
${{ runner.os }}-cargo-build-
87+
88+
- name: Setup Rust toolchain
89+
uses: dtolnay/rust-toolchain@stable
90+
5991
- name: Install Win 10 SDK
6092
uses: ilammy/msvc-dev-cmd@v1
61-
- name: build Release-Full
93+
94+
# Build Release-Full
95+
- name: Build Release-Full
6296
env:
6397
LIBCLANG_PATH: "C:\\Program Files\\LLVM\\lib"
6498
LLVM_CONFIG_PATH: "C:\\Program Files\\LLVM\\bin\\llvm-config"
65-
CARGO_TARGET_DIR: "..\\..\\windows"
6699
BINDGEN_EXTRA_CLANG_ARGS: -fmsc-version=0
67100
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
68101
run: msbuild ccextractor.sln /p:Configuration=Release-Full /p:Platform=x64
69102
working-directory: ./windows
70-
- name: Display version information
103+
104+
- name: Display Release version information
71105
run: ./ccextractorwinfull.exe --version
72106
working-directory: ./windows/x64/Release-Full
73-
- uses: actions/upload-artifact@v6
107+
108+
- name: Upload Release artifact
109+
uses: actions/upload-artifact@v6
74110
with:
75111
name: CCExtractor Windows Release build
76112
path: |
77113
./windows/x64/Release-Full/ccextractorwinfull.exe
78114
./windows/x64/Release-Full/*.dll
79-
build_debug:
80-
runs-on: windows-2022
81-
steps:
82-
- name: Check out repository
83-
uses: actions/checkout@v6
84-
- name: Setup MSBuild.exe
85-
uses: microsoft/[email protected]
86-
with:
87-
msbuild-architecture: x64
88-
- name: Install gpac
89-
run: choco install gpac --version 2.4.0
90-
- name: Setup vcpkg
91-
run: mkdir C:\vcpkg\.cache
92-
- name: Cache vcpkg
93-
id: cache
94-
uses: actions/cache@v5
95-
with:
96-
path: |
97-
C:\vcpkg\.cache
98-
key: vcpkg-${{ runner.os }}-${{ env.VCPKG_COMMIT }}
99-
- name: Build vcpkg
100-
run: |
101-
git clone https://github.com/microsoft/vcpkg
102-
./vcpkg/bootstrap-vcpkg.bat
103-
- name: Install dependencies
104-
run: ${{ github.workspace }}/vcpkg/vcpkg.exe install --x-install-root ${{ github.workspace }}/vcpkg/installed/
105-
working-directory: windows
106-
- uses: actions-rs/toolchain@v1
107-
with:
108-
toolchain: stable
109-
override: true
110-
- name: Install Win 10 SDK
111-
uses: ilammy/msvc-dev-cmd@v1
112-
- name: build Debug-Full
115+
116+
# Build Debug-Full (reuses cached Cargo artifacts)
117+
- name: Build Debug-Full
113118
env:
114119
LIBCLANG_PATH: "C:\\Program Files\\LLVM\\lib"
115120
LLVM_CONFIG_PATH: "C:\\Program Files\\LLVM\\bin\\llvm-config"
116-
CARGO_TARGET_DIR: "..\\..\\windows"
117121
BINDGEN_EXTRA_CLANG_ARGS: -fmsc-version=0
118122
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
119123
run: msbuild ccextractor.sln /p:Configuration=Debug-Full /p:Platform=x64
120124
working-directory: ./windows
121-
- name: Display version information
125+
126+
- name: Display Debug version information
122127
continue-on-error: true
123128
run: ./ccextractorwinfull.exe --version
124129
working-directory: ./windows/x64/Debug-Full
125-
- uses: actions/upload-artifact@v6
130+
131+
- name: Upload Debug artifact
132+
uses: actions/upload-artifact@v6
126133
with:
127134
name: CCExtractor Windows Debug build
128135
path: |

.github/workflows/homebrew.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Bump Homebrew Formula
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
homebrew:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Update Homebrew formula
12+
uses: dawidd6/action-homebrew-bump-formula@v7
13+
with:
14+
token: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
15+
formula: ccextractor

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ bazel*
145145
#Intellij IDEs
146146
.idea/
147147

148+
# Plans (local only)
149+
plans/
150+
148151
# Rust build and MakeFiles (and CMake files)
149152
src/rust/CMakeFiles/
150153
src/rust/CMakeCache.txt

OpenBSD/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ MAINTAINER = Marc Espie <[email protected]>
44
CATEGORIES = multimedia
55
COMMENT = closed caption subtitles extractor
66
HOMEPAGE = https://ccextractor.org
7-
V = 0.96.3
7+
V = 0.96.5
88
DISTFILES = ccextractor.${V:S/.//}-src.zip
99
MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=ccextractor/}
1010
DISTNAME = ccextractor-$V

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ The core functionality is written in C. Other languages used include C++ and Pyt
2828

2929
Downloads for precompiled binaries and source code can be found [on our website](https://ccextractor.org/public/general/downloads/).
3030

31+
3132
### Windows Package Managers
3233

3334
**WinGet:**
@@ -61,6 +62,34 @@ You can also find the list of parameters and their brief description by running
6162

6263
You can find sample files on [our website](https://ccextractor.org/public/general/tvsamples/) to test the software.
6364

65+
### Building from Source
66+
67+
- [Building on Windows using WSL](docs/build-wsl.md)
68+
69+
#### Linux (Autotools) build notes
70+
71+
CCExtractor also supports an autotools-based build system under the `linux/`
72+
directory.
73+
74+
Important notes:
75+
- The autotools workflow lives inside `linux/`. The `configure` script is
76+
generated there and should be run from that directory.
77+
- Typical build steps are:
78+
```
79+
cd linux
80+
./autogen.sh
81+
./configure
82+
make
83+
```
84+
- Rust support is enabled automatically if `cargo` and `rustc` are available
85+
on the system. In that case, Rust components are built and linked during
86+
`make`.
87+
- If you encounter unexpected build or linking issues, a clean rebuild
88+
(`make clean` or a fresh clone) is recommended, especially when Rust is
89+
involved.
90+
91+
This build flow has been tested on Linux and WSL.
92+
6493
## Compiling CCExtractor
6594

6695
To learn more about how to compile and build CCExtractor for your platform check the [compilation guide](https://github.com/CCExtractor/ccextractor/blob/master/docs/COMPILATION.MD).

docs/CHANGES.TXT

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
- Extract multiple teletext pages simultaneously with separate output files
6262
- Use --tpage multiple times (e.g., --tpage 100 --tpage 200)
6363
- Output files are named with page suffix (e.g., output_p100.srt, output_p200.srt)
64+
- Fix: SPUPNG subtitle offset calculation to center based on actual image dimensions
6465

6566
- New: Added --list-tracks (-L) option to list all tracks in media files without processing
6667
New: Chinese, Korean, Japanese support - proper encoding and OCR.

docs/COMPILATION.MD

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# Installation
2+
3+
## Homebrew
4+
The easiest way to install CCExtractor for Mac and Linux is through Homebrew:
5+
6+
```bash
7+
brew install ccextractor
8+
```
9+
Note: If you don't have Homebrew installed, see [brew.sh](https://brew.sh/)
10+
for installation instructions.
11+
12+
---
13+
114
# Compiling CCExtractor
215

316
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.

0 commit comments

Comments
 (0)