1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
/*
This file is part of jellything (https://codeberg.org/metamuffin/jellything)
which is licensed under the GNU Affero General Public License (version 3); see /COPYING.
Copyright (C) 2023 metamuffin <metamuffin.org>
*/
export interface TimeRange { start: number, end: number }
export interface JhlsMetadata {
tracks: JhlsTrack[],
extra_profiles: EncodingProfile[],
duration: number,
}
export interface JhlsTrack {
info: SourceTrack,
segments: TimeRange[],
}
export interface SourceTrack {
kind: SourceTrackKind,
name: string,
codec: string,
language: string,
}
export interface SourceTrackKind {
video?: {
width: number,
height: number,
fps: number,
},
audio?: {
channels: number,
sample_rate: number,
bit_depth: number,
},
subtitles?: boolean, // incorrect but lazy rn
}
export interface EncodingProfile {
video?: {
codec: string,
preset: number,
bitrate: number,
width: number,
},
audio?: {
codec: string,
bitrate: number,
sample_rate?: number,
},
subtitles?: {
codec: string,
},
}
|