add: Фоллбек совместимость HLS

This commit is contained in:
2025-11-11 22:56:44 +03:00
parent 8cf4210d20
commit 3b54c059f0
6 changed files with 900 additions and 31 deletions

View File

@@ -3,6 +3,11 @@
*/
export type CodecType = 'av1' | 'h264' | 'dual';
/**
* Streaming format type
*/
export type StreamingFormat = 'dash' | 'hls' | 'both';
/**
* Configuration options for DASH conversion
*/
@@ -25,6 +30,9 @@ export interface DashConvertOptions {
/** Video codec to use: 'av1', 'h264', or 'dual' for both (default: 'dual') */
codec?: CodecType;
/** Streaming format to generate: 'dash', 'hls', or 'both' (default: 'both') */
format?: StreamingFormat;
/** Enable NVENC hardware acceleration (auto-detect if undefined) */
useNvenc?: boolean;
@@ -111,8 +119,11 @@ export interface ConversionProgress {
* Result of DASH conversion
*/
export interface DashConvertResult {
/** Path to generated MPD manifest */
manifestPath: string;
/** Path to generated DASH manifest (if format is 'dash' or 'both') */
manifestPath?: string;
/** Path to generated HLS manifest (if format is 'hls' or 'both') */
hlsManifestPath?: string;
/** Paths to generated video segments */
videoPaths: string[];
@@ -137,6 +148,9 @@ export interface DashConvertResult {
/** Codec type used for encoding */
codecType: CodecType;
/** Streaming format generated */
format: StreamingFormat;
}
/**