feat(transcoding): add FFmpeg HLS transcoding support

- Introduced `TranscodeManager` for managing on-demand transcoding of local video files.
- Added configuration options for transcoding in `Config` and `LocalFilesConfig`.
- Implemented new API routes for managing transcoding settings, stats, and cache.
- Updated `LocalFilesProvider` to support transcoding capabilities.
- Created frontend components for managing transcode settings and displaying stats.
- Added database migration for transcode settings.
- Enhanced existing routes and DTOs to accommodate new transcoding features.
This commit is contained in:
2026-03-15 00:34:23 +01:00
parent ead65e6be2
commit 1102e385f3
23 changed files with 865 additions and 31 deletions

View File

@@ -12,6 +12,8 @@ import type {
SeriesResponse,
LibraryItemResponse,
MediaFilter,
TranscodeSettings,
TranscodeStats,
} from "@/lib/types";
const API_BASE =
@@ -155,6 +157,24 @@ export const api = {
request<{ items_found: number }>("/files/rescan", { method: "POST", token }),
},
transcode: {
getSettings: (token: string) =>
request<TranscodeSettings>("/files/transcode-settings", { token }),
updateSettings: (data: TranscodeSettings, token: string) =>
request<TranscodeSettings>("/files/transcode-settings", {
method: "PUT",
body: JSON.stringify(data),
token,
}),
getStats: (token: string) =>
request<TranscodeStats>("/files/transcode-stats", { token }),
clearCache: (token: string) =>
request<void>("/files/transcode-cache", { method: "DELETE", token }),
},
schedule: {
generate: (channelId: string, token: string) =>
request<ScheduleResponse>(`/channels/${channelId}/schedule`, {