mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-20 13:38:05 +02:00
feat: add initial Dart server implementation with API routing, Xtream proxy, static file serving, and streaming support.
This commit is contained in:
1 parent
5be7c0c3ff
commit
d6b42512b6
1 file changed
+8
-4
+8
-4
@@ -497,11 +497,15 @@ Handler _createStreamHandler() {
|
|||||||
final usePassthrough = mode == 'direct';
|
final usePassthrough = mode == 'direct';
|
||||||
|
|
||||||
if (usePassthrough) {
|
if (usePassthrough) {
|
||||||
// PASSTHROUGH MODE: Copy streams without re-encoding (0% CPU)
|
// PASSTHROUGH MODE: Copy video, but transcode audio to AAC
|
||||||
// Only works if source is H.264/AAC compatible with browsers
|
// 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([
|
ffmpegArgs.addAll([
|
||||||
'-c:v', 'copy', // Copy video stream as-is
|
'-c:v', 'copy', // Copy video stream as-is (H.264)
|
||||||
'-c:a', 'copy', // Copy audio stream as-is
|
'-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
|
'-bsf:v', 'h264_mp4toannexb', // Convert to Annex B format for HLS
|
||||||
]);
|
]);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in new issue
Block a user