Repository navigation
Building from Source
This guide walks you through building TrueStream from source for Android, Windows, and Linux. You'll find the prerequisites, setup steps, build commands, and testing instructions you need to compile the app yourself.
Before you start, make sure you have the following installed on your machine.
| Dependency | Version | Notes |
|---|---|---|
| Flutter SDK | Stable (3.x) | Install via flutter upgrade or your package manager |
| Dart | Bundled with Flutter | Ships with the Flutter SDK |
| Python | 3.11+ | Required for the engine and Chaquopy on Android |
| Android SDK | 34+ | Required for Android builds |
| Java | 17 | Required for Android builds |
| CMake | 3.31+ | Required for Android Chaquopy builds |
FFmpeg and aria2c are not bundled in the source build. They're downloaded automatically on the app's first launch, with SHA-256 verification before extraction. You can also point to custom binary paths in Settings.
Start by cloning the repository and installing dependencies.
git clone https://github.com/OnlyXianzo/TrueStream.git
cd TrueStreamflutter pub getIf you're doing local development or running Python tests, set up a virtual environment and install the engine in editable mode.
python3 -m venv .venv
source .venv/bin/activate
pip install -r engine/requirements.txt
pip install -e engine/On Windows, use .venv\Scripts\activate and pip as appropriate.
Chaquopy bundles Python 3.11 and the engine directly into the APK. yt-dlp and curl_cffi are installed via pip during the Gradle build.
# Release APK
flutter build apk --release
# Debug APK
flutter build apk --debugThe output lives at build/app/outputs/flutter-apk/app-release.apk.
-
minSdkis set to 24, required by Chaquopy. - ABI filters target
arm64-v8aandx86_64. - For signing, place a
key.propertiesfile inandroid/with yourstoreFile,storePassword,keyPassword, andkeyAlias.
The Python engine is not embedded in the desktop binary. You need to copy it alongside the release bundle, or rely on the built-in bootstrapper that downloads it on first launch.
flutter build windows --release
# Copy the Python engine into the bundle
xcopy /E /I engine\truestream_engine build\windows\x64\runner\Release\truestream_engineThe output goes to build/windows/x64/runner/Release/.
The Linux build follows the same approach as Windows.
# Install Linux build dependencies
sudo apt-get install -y ninja-build libgtk-3-dev liblzma-dev
flutter build linux --release
# Copy the Python engine into the bundle
cp -r engine/truestream_engine build/linux/x64/release/bundle/The output goes to build/linux/x64/release/bundle/.
flutter testThis runs widget and unit tests located under test/.
pytest engine/tests/ -vThis runs 91+ unit tests covering config, errors, format selection, options building, paths, playlists, and other engine modules.
dart analyzeThis must pass with zero errors before you commit.
Two workflows are available in .github/workflows/.
The verification workflow triggers on every push and pull request to main. It runs:
flutter analyzeflutter testpytest engine/tests/ -v
The build workflow is a manual trigger (workflow_dispatch). It builds all three platforms:
- Android — APK uploaded as an artifact.
- Windows — release bundle with the engine copied alongside.
- Linux — release bundle with the engine copied alongside.
To trigger it, go to GitHub, then Actions > Build and Release > Run workflow.
- Android minSdk: 24, required by Chaquopy. Devices must run Android 7.0 or later.
-
Python bundling on Android: The Chaquopy Gradle plugin compiles
engine/into the APK. yt-dlp and curl_cffi are installed via thepipblock inbuild.gradle.kts. -
Python bundling on desktop: The engine is not bundled. You must copy the
truestream_enginedirectory alongside the binary, or the bootstrapper downloads it on first launch. - Binary bootstrapper: FFmpeg and aria2c are downloaded at runtime, SHA-256 verified, and extracted. You can also configure custom paths in Settings.
- FFmpeg: Required for media processing like merging and remuxing. Roughly 25-35 MB.
- aria2c: Download accelerator for faster concurrent chunked downloads. Roughly 3-5 MB.
- iOS and Web: Not currently supported as target platforms.