seek logo path

This commit is contained in:
jb-alvarado 2022-10-14 11:59:58 +02:00
parent a15c4576a2
commit 13aac537bb
2 changed files with 13 additions and 4 deletions

View File

@ -13,7 +13,10 @@ jobs:
- run: rustup update stable
- run: rustup component add rustfmt
- run: rustup component add clippy
- run: cargo test --all-features
- run: |
if [ "$RUNNER_OS" == "Linux" ]; then
cargo test --all-features
fi
- run: cargo fmt --all -- --check
- run: cargo clippy --all-features --all-targets -- --deny warnings
- run: cargo build --all-features

View File

@ -1,16 +1,22 @@
use std::{
fs,
sync::{Arc, Mutex},
};
use ffplayout::{input::playlist::gen_source, utils::prepare_output_cmd};
use ffplayout_lib::{
filter::v_drawtext,
utils::{Media, OutputMode::*, PlayoutConfig},
vec_strings,
};
use std::sync::{Arc, Mutex};
#[test]
fn video_audio_input() {
let mut config = PlayoutConfig::new(Some("../assets/ffplayout.yml".to_string()));
config.out.mode = Stream;
config.processing.logo = "./assets/logo.png".to_string();
let logo_path = fs::canonicalize("./assets/logo.png").unwrap();
println!("{logo_path:?}");
config.processing.logo = logo_path.to_string_lossy().to_string();
let media_obj = Media::new(0, "./assets/with_audio.mp4", true);
let media = gen_source(&config, media_obj, &Arc::new(Mutex::new(vec![])));
@ -18,7 +24,7 @@ fn video_audio_input() {
let test_filter_cmd = Some(
vec_strings![
"-filter_complex",
"[0:v:0]scale=1024:576,null[v];movie=./assets/logo.png:loop=0,setpts=N/(FRAME_RATE*TB),format=rgba,colorchannelmixer=aa=0.7[l];[v][l]overlay=W-w-12:12:shortest=1[vout0];[0:a:0]anull[aout0]",
"[0:v:0]scale=1024:576,null[v];movie=/home/runner/work/ffplayout/assets/logo.png:loop=0,setpts=N/(FRAME_RATE*TB),format=rgba,colorchannelmixer=aa=0.7[l];[v][l]overlay=W-w-12:12:shortest=1[vout0];[0:a:0]anull[aout0]",
"-map",
"[vout0]",
"-map",