mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-20 13:38:05 +02:00
feat: implement live HLS streaming with FFmpeg transcoding, GPU acceleration, and HLS segment serving.
This commit is contained in:
1 parent
0b5aa3f9e4
commit
c9a212ec4f
2 files changed
+16
-7
No files matched your search
@@ -176,12 +176,15 @@ Handler createLiveStreamHandler(
|
|||||||
'-hls_time', '2', // Small segments for low latency
|
'-hls_time', '2', // Small segments for low latency
|
||||||
'-hls_list_size', '5', // 10 seconds of history
|
'-hls_list_size', '5', // 10 seconds of history
|
||||||
'-hls_flags', 'delete_segments+independent_segments',
|
'-hls_flags', 'delete_segments+independent_segments',
|
||||||
'-hls_segment_type', 'mpegts',
|
'-hls_segment_filename', 'seg_%03d.ts',
|
||||||
'-hls_segment_filename', '${streamDir.path}/seg_%03d.ts',
|
'playlist.m3u8',
|
||||||
'${streamDir.path}/playlist.m3u8',
|
|
||||||
];
|
];
|
||||||
|
|
||||||
final process = await Process.start(_getFFmpegPath(), ffmpegArgs);
|
final process = await Process.start(
|
||||||
|
_getFFmpegPath(),
|
||||||
|
ffmpegArgs,
|
||||||
|
workingDirectory: streamDir.path,
|
||||||
|
);
|
||||||
_liveProcesses[streamId] = process;
|
_liveProcesses[streamId] = process;
|
||||||
|
|
||||||
process.stderr
|
process.stderr
|
||||||
@@ -205,6 +208,7 @@ Handler createLiveStreamHandler(
|
|||||||
'Content-Type': 'application/vnd.apple.mpegurl',
|
'Content-Type': 'application/vnd.apple.mpegurl',
|
||||||
'Access-Control-Allow-Origin': '*',
|
'Access-Control-Allow-Origin': '*',
|
||||||
'Cache-Control': 'no-cache',
|
'Cache-Control': 'no-cache',
|
||||||
|
'X-Content-Type-Options': 'nosniff',
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -432,14 +436,18 @@ Handler createVodStreamHandler(
|
|||||||
'-hls_segment_type',
|
'-hls_segment_type',
|
||||||
'mpegts',
|
'mpegts',
|
||||||
'-hls_segment_filename',
|
'-hls_segment_filename',
|
||||||
'${streamDir.path}/segment_%03d.ts',
|
'segment_%03d.ts',
|
||||||
'-start_number',
|
'-start_number',
|
||||||
'0',
|
'0',
|
||||||
'${streamDir.path}/playlist.m3u8',
|
'playlist.m3u8',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
final ffmpegPath = _getFFmpegPath();
|
final ffmpegPath = _getFFmpegPath();
|
||||||
Process.start(ffmpegPath, ffmpegArgs).then((process) {
|
Process.start(
|
||||||
|
ffmpegPath,
|
||||||
|
ffmpegArgs,
|
||||||
|
workingDirectory: streamDir.path,
|
||||||
|
).then((process) {
|
||||||
_vodProcesses[streamId] = process;
|
_vodProcesses[streamId] = process;
|
||||||
|
|
||||||
process.stderr.transform(utf8.decoder).listen((data) {
|
process.stderr.transform(utf8.decoder).listen((data) {
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ Refonte du Guide TV pour inclure les catégories et corriger l'EPG.
|
|||||||
- [x] Alignement UI Mobile (Tri, EPG, URLs)
|
- [x] Alignement UI Mobile (Tri, EPG, URLs)
|
||||||
- [x] Correction Connectivité Mobile (Auto-origin + Manuel Override)
|
- [x] Correction Connectivité Mobile (Auto-origin + Manuel Override)
|
||||||
- [x] Compatibilité Streaming iOS (HLS Live + Proxy Streaming)
|
- [x] Compatibilité Streaming iOS (HLS Live + Proxy Streaming)
|
||||||
|
- [x] Correction Chemins HLS Relatifs (Bug chemins absolus FFmpeg)
|
||||||
|
|
||||||
## Progress Log
|
## Progress Log
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user