Replaced all vp9 with av1

This commit is contained in:
Muaz Ahmad 2023-10-16 13:39:28 +05:00
parent d33742b96f
commit bd7814a88e
3 changed files with 3 additions and 3 deletions

View file

@ -8,7 +8,7 @@ use crate::encode::codecs;
pub fn spawn(metadata: Arc<util::Metadata>, v_target: util::VideoCodec, a_target: util::AudioCodec) -> Result<(impl Encoder, impl Encoder), Box<dyn Error>> {
let v = match v_target {
util::VideoCodec::VP9 => codecs::video::new_vp9(metadata.clone())?,
util::VideoCodec::AV1 => codecs::video::new_av1(metadata.clone())?,
_ => return Err(Box::new(util::EncoderError::CodecNotSupported))
};
let a = match a_target {

View file

@ -12,7 +12,7 @@ use std::time::Duration;
fn init() -> Result<[mpsc::Receiver<Box<dyn std::error::Error + Send + Sync>>; 4], Box<dyn std::error::Error>>{
let (v_out, a_out, metadata, demux_err_recv) = demux::spawn()?;
let (raw_v_out, raw_a_out, decode_err_recv) = decode::spawn(v_out, a_out, metadata.clone())?;
let (enc_v_out, enc_a_out, encode_err_recv) = encode::spawn(raw_v_out, raw_a_out, metadata.clone(), util::VideoCodec::VP9, util::AudioCodec::OPUS)?;
let (enc_v_out, enc_a_out, encode_err_recv) = encode::spawn(raw_v_out, raw_a_out, metadata.clone(), util::VideoCodec::AV1, util::AudioCodec::OPUS)?;
let muxer_err_recv = muxer::spawn(enc_v_out, enc_a_out, metadata.clone())?;
return Ok([demux_err_recv, decode_err_recv, encode_err_recv, muxer_err_recv]);
}

View file

@ -16,7 +16,7 @@ pub struct VideoMetadata {
#[derive(Copy, Clone)]
pub enum VideoCodec {
H264,
VP9,
AV1,
}
#[derive(Default)]