byte_me is a highly cohesive, high-performance download engine tailored for Dart and Flutter applications. It is purpose-built to handle complex downloading scenarios—such as encrypted HLS (HTTP Live Streaming) playlists—with zero external dependencies (no FFmpeg required).
- Concurrent Downloading: Automatically pools HTTP connections and handles multi-part downloads using
dart:io. - HLS Native Support: Parses M3U8 playlists, resolves segment URIs, and handles AES-128 decryption.
- Background Isolates: Offloads heavily CPU-bound tasks—like decryption and remuxing—to isolates to keep your Flutter UI 100% jank-free.
- Genuine Remuxing: Provides an in-house MPEG-TS demuxer that extracts raw H.264 video and AAC audio frames, multiplexing them directly into a standard Matroska (
.mkv) container. - Subtitle Injection: Seamlessly interleaves external
.srtsubtitle files directly into the generated MKV video file.
Initialize the engine:
import 'package:byte_me/byte_me.dart';
final downloader = ByteMe(maxConcurrentDownloads: 3);final job = downloader.download(
id: 'job-1',
url: Uri.parse('https://example.com/file.zip'),
savePath: '/downloads/file.zip',
);
job.progressStream.listen((progress) {
print('Progress: ${progress.percent}%');
});final job = downloader.downloadHls(
id: 'hls-1',
url: Uri.parse('https://example.com/playlist.m3u8'),
savePath: '/downloads/video.mkv',
remuxer: MkvRemuxer(
subtitles: [
SubtitleTrack(
file: File('/downloads/english.srt'),
language: 'eng',
title: 'English',
),
],
),
);
job.statusStream.listen((status) {
if (status == DownloadStatus.completed) {
print('MKV video successfully saved and remuxed!');
}
});Full developer documentation (powered by VitePress) is available in the docs/ folder.
To run the documentation locally:
cd docs
pnpm install
pnpm docs:dev