aboutsummaryrefslogtreecommitdiff
path: root/transcoder/src/lib.rs
blob: 0b39b51443e01ffa64e96d5dbac6a97f08860b69 (plain)
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
/*
    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) 2026 metamuffin <metamuffin.org>
*/
#![feature(exit_status_error)]

use serde::{Deserialize, Serialize};
use std::sync::Mutex;

pub mod fragment;
pub mod image;
pub mod subtitles;
pub mod thumbnail;

#[rustfmt::skip]
#[derive(Debug, Deserialize, Serialize, Default)]
pub struct Config {
    #[serde(default)] pub enable_rkmpp: bool,
    #[serde(default)] pub enable_rkrga: bool,
    #[serde(default)] pub use_svtav1: bool,
    #[serde(default)] pub use_rav1e: bool,
    pub svtav1_preset: Option<u8>, // 0..=13, high is fast
    pub rav1e_preset: Option<u8>,  // 0..=10
    pub aom_preset: Option<u8>,    // 0..=8, high is fast
    pub x264_preset: Option<String>,
}

static LOCAL_VIDEO_TRANSCODING_TASKS: Mutex<()> = Mutex::new(());