mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-11 17:30:00 +02:00
Merge pull request #45 from R0m1k3/antigravity
feat: add initial Dart server implementation with API routing, Xtream…
This commit is contained in:
1 file changed
+8
-4
+8
-4
@@ -497,11 +497,15 @@ Handler _createStreamHandler() {
|
||||
final usePassthrough = mode == 'direct';
|
||||
|
||||
if (usePassthrough) {
|
||||
// PASSTHROUGH MODE: Copy streams without re-encoding (0% CPU)
|
||||
// Only works if source is H.264/AAC compatible with browsers
|
||||
// PASSTHROUGH MODE: Copy video, but transcode audio to AAC
|
||||
// Most IPTV streams use AC3/MP3 audio which browsers can't play in HLS
|
||||
// Video copy = 0% CPU, audio transcode = ~5% CPU (still very light)
|
||||
ffmpegArgs.addAll([
|
||||
'-c:v', 'copy', // Copy video stream as-is
|
||||
'-c:a', 'copy', // Copy audio stream as-is
|
||||
'-c:v', 'copy', // Copy video stream as-is (H.264)
|
||||
'-c:a', 'aac', // Transcode audio to AAC (browser compatible)
|
||||
'-b:a', '128k', // Audio bitrate
|
||||
'-ar', '44100', // Sample rate
|
||||
'-ac', '2', // Stereo
|
||||
'-bsf:v', 'h264_mp4toannexb', // Convert to Annex B format for HLS
|
||||
]);
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user