libtorrent_flutter
2.0.0, released 3 months ago by playtorrio.xyz
Native libtorrent 2.0 bindings with built-in HTTP streaming server for torrent video playback.
What it does
Wraps the C++ libtorrent engine via FFI to download torrents, monitor progress, and provide an HTTP streaming server for instant video playback via local URLs. Supports Windows, Linux, macOS, iOS, and Android.
AI-written summary of version 2.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to stream video or media files directly from magnet links or torrent files in a Flutter application.
- You require high-performance torrent downloads on mobile or desktop without relying on external native wrappers.
Skip it when
- You need a pure Dart torrent implementation without native binaries or complex C++ dependencies.
- Your target environment operates entirely offline without downloading prebuilt native binaries on the first build.
Strengths
- Powered by libtorrent 2.1.1 C++ engine for high download speeds and efficient peer discovery.
- Built-in HTTP streaming server with range-request support for media players.
- Cross-platform support across Android, iOS, Windows, Linux, and macOS.
Weaknesses
- First build requires downloading 10–80 MB of prebuilt native binaries.
- Android requires foreground services to maintain downloads while the app is in the background.
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 1
Requires INTERNET permission on Android, network client entitlements on macOS, and optional foreground service setup for background Android streaming.
import 'package:libtorrent_flutter/libtorrent_flutter.dart';
await LibtorrentFlutter.init();
final engine = LibtorrentFlutter.instance;
final id = engine.addMagnet('magnet:?xt=urn:btih:...');
Alternatives
Packages that do the same job and could replace libtorrent_flutter.
- video_player_android
Android implementation of the video_player plugin
88Compare - video_player_avfoundation
iOS and macOS implementation of the video_player plugin
86Compare - native_video_player
A Flutter widget to play videos on iOS and Android using a native implementation.
67Compare - fc_native_video_thumbnail
Generate video thumbnails using native platform APIs
80Compare
Works with
Packages commonly used together with libtorrent_flutter: ones it builds on, ones built on it, and its own family.