/* 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 */ use jellybase::{cache::async_cache_file, AssetLocationExt}; use jellycommon::AssetLocation; pub async fn transcode( asset: AssetLocation, quality: f32, speed: u8, width: usize, ) -> anyhow::Result { let original_path = asset.path(); let asset = asset.clone(); Ok(async_cache_file( &[ "snip-tc", original_path.as_os_str().to_str().unwrap(), &format!("{width} {quality} {speed}"), ], move |output| async move { Ok(()) }, ) .await?) }