/* 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 */ 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, }, }