opt: edl file (#2455)

This commit is contained in:
My-Responsitories
2026-07-21 09:02:09 +00:00
committed by GitHub
parent 3a5636ecee
commit dae8df840a
3 changed files with 63 additions and 34 deletions

View File

@@ -1,5 +1,5 @@
import 'dart:async' show StreamSubscription, Timer;
import 'dart:convert' show ascii;
import 'dart:convert' show ascii, utf8;
import 'dart:io' show Platform;
import 'dart:math' show max, min;
import 'dart:ui' as ui;
@@ -816,8 +816,15 @@ class PlPlayerController with BlockConfigMixin {
if (onlyPlayAudio.value) {
video = audio;
} else {
extras['audio-files'] =
'"${Platform.isWindows ? audio.replaceAll(';', r'\;') : audio.replaceAll(':', r'\:')}"';
// dely_open need provide length
video =
('edl://'
'!no_clip;!no_chapters;'
// '!delay_open,media_type=video;'
'%${isFileSource ? utf8.encode(video).length : video.length}%$video;'
'!new_stream;!no_clip;!no_chapters;'
// '!delay_open,media_type=audio;'
'%${isFileSource ? utf8.encode(audio).length : audio.length}%$audio');
}
if (enableAudioNormalization) {
final String audioNormalization;