fix paths

This commit is contained in:
jb-alvarado 2024-02-02 12:58:27 +01:00
parent 93090c0a8a
commit 87a05eeb84
2 changed files with 31 additions and 31 deletions

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -16,7 +16,7 @@ fn video_audio_input() {
let logo_path = fs::canonicalize("./assets/logo.png").unwrap();
config.processing.logo = logo_path.to_string_lossy().to_string();
let media_obj = Media::new(0, "./assets/with_audio.mp4", true);
let media_obj = Media::new(0, "./assets/media_mix/with_audio.mp4", true);
let media = gen_source(&config, media_obj, &playout_stat, &player_control, 1);
let test_filter_cmd =
@ -29,7 +29,7 @@ fn video_audio_input() {
assert_eq!(
media.cmd,
Some(vec_strings!["-i", "./assets/with_audio.mp4"])
Some(vec_strings!["-i", "./assets/media_mix/with_audio.mp4"])
);
assert_eq!(media.filter.clone().unwrap().cmd(), test_filter_cmd);
assert_eq!(media.filter.unwrap().map(), test_filter_map);
@ -44,7 +44,7 @@ fn video_audio_custom_filter1_input() {
config.processing.add_logo = false;
config.processing.custom_filter = "[0:v]gblur=2[c_v_out];[0:a]volume=0.2[c_a_out]".to_string();
let media_obj = Media::new(0, "./assets/with_audio.mp4", true);
let media_obj = Media::new(0, "./assets/media_mix/with_audio.mp4", true);
let media = gen_source(&config, media_obj, &playout_stat, &player_control, 1);
let test_filter_cmd = vec_strings![
@ -56,7 +56,7 @@ fn video_audio_custom_filter1_input() {
assert_eq!(
media.cmd,
Some(vec_strings!["-i", "./assets/with_audio.mp4"])
Some(vec_strings!["-i", "./assets/media_mix/with_audio.mp4"])
);
assert_eq!(media.filter.clone().unwrap().cmd(), test_filter_cmd);
assert_eq!(media.filter.unwrap().map(), test_filter_map);
@ -73,7 +73,7 @@ fn video_audio_custom_filter2_input() {
"[0:v]null[v];movie=logo.png[l];[v][l]overlay[c_v_out];[0:a]volume=0.2[c_a_out]"
.to_string();
let media_obj = Media::new(0, "./assets/with_audio.mp4", true);
let media_obj = Media::new(0, "./assets/media_mix/with_audio.mp4", true);
let media = gen_source(&config, media_obj, &playout_stat, &player_control, 1);
let test_filter_cmd = vec_strings![
@ -85,7 +85,7 @@ fn video_audio_custom_filter2_input() {
assert_eq!(
media.cmd,
Some(vec_strings!["-i", "./assets/with_audio.mp4"])
Some(vec_strings!["-i", "./assets/media_mix/with_audio.mp4"])
);
assert_eq!(media.filter.clone().unwrap().cmd(), test_filter_cmd);
assert_eq!(media.filter.unwrap().map(), test_filter_map);
@ -101,7 +101,7 @@ fn video_audio_custom_filter3_input() {
config.processing.custom_filter =
"[v_in];movie=logo.png[l];[v_in][l]overlay[c_v_out];[0:a]volume=0.2[c_a_out]".to_string();
let media_obj = Media::new(0, "./assets/with_audio.mp4", true);
let media_obj = Media::new(0, "./assets/media_mix/with_audio.mp4", true);
let media = gen_source(&config, media_obj, &playout_stat, &player_control, 1);
let test_filter_cmd = vec_strings![
@ -113,7 +113,7 @@ fn video_audio_custom_filter3_input() {
assert_eq!(
media.cmd,
Some(vec_strings!["-i", "./assets/with_audio.mp4"])
Some(vec_strings!["-i", "./assets/media_mix/with_audio.mp4"])
);
assert_eq!(media.filter.clone().unwrap().cmd(), test_filter_cmd);
assert_eq!(media.filter.unwrap().map(), test_filter_map);
@ -128,7 +128,7 @@ fn dual_audio_aevalsrc_input() {
config.processing.audio_tracks = 2;
config.processing.add_logo = false;
let media_obj = Media::new(0, "./assets/with_audio.mp4", true);
let media_obj = Media::new(0, "./assets/media_mix/with_audio.mp4", true);
let media = gen_source(&config, media_obj, &playout_stat, &player_control, 1);
let test_filter_cmd =
@ -141,7 +141,7 @@ fn dual_audio_aevalsrc_input() {
assert_eq!(
media.cmd,
Some(vec_strings!["-i", "./assets/with_audio.mp4"])
Some(vec_strings!["-i", "./assets/media_mix/with_audio.mp4"])
);
assert_eq!(media.filter.clone().unwrap().cmd(), test_filter_cmd);
assert_eq!(media.filter.unwrap().map(), test_filter_map);
@ -156,7 +156,7 @@ fn dual_audio_input() {
config.processing.audio_tracks = 2;
config.processing.add_logo = false;
let media_obj = Media::new(0, "./assets/dual_audio.mp4", true);
let media_obj = Media::new(0, "./assets/media_mix/dual_audio.mp4", true);
let media = gen_source(&config, media_obj, &playout_stat, &player_control, 1);
let test_filter_cmd = vec_strings![
@ -168,7 +168,7 @@ fn dual_audio_input() {
assert_eq!(
media.cmd,
Some(vec_strings!["-i", "./assets/dual_audio.mp4"])
Some(vec_strings!["-i", "./assets/media_mix/dual_audio.mp4"])
);
assert_eq!(media.filter.clone().unwrap().cmd(), test_filter_cmd);
assert_eq!(media.filter.unwrap().map(), test_filter_map);
@ -183,8 +183,8 @@ fn video_separate_audio_input() {
config.processing.audio_tracks = 1;
config.processing.add_logo = false;
let mut media_obj = Media::new(0, "./assets/no_audio.mp4", true);
media_obj.audio = "./assets/audio.mp3".to_string();
let mut media_obj = Media::new(0, "./assets/media_mix/no_audio.mp4", true);
media_obj.audio = "./assets/media_mix/audio.mp3".to_string();
let media = gen_source(&config, media_obj, &playout_stat, &player_control, 1);
let test_filter_cmd = vec_strings![
@ -198,11 +198,11 @@ fn video_separate_audio_input() {
media.cmd,
Some(vec_strings![
"-i",
"./assets/no_audio.mp4",
"./assets/media_mix/no_audio.mp4",
"-stream_loop",
"-1",
"-i",
"./assets/audio.mp3",
"./assets/media_mix/audio.mp3",
"-t",
"30"
])
@ -1350,7 +1350,7 @@ fn video_audio_hls() {
"/usr/share/ffplayout/public/live/stream.m3u8"
]);
let media_obj = Media::new(0, "./assets/with_audio.mp4", true);
let media_obj = Media::new(0, "./assets/media_mix/with_audio.mp4", true);
let media = gen_source(&config, media_obj, &playout_stat, &player_control, 1);
let enc_prefix = vec_strings![
@ -1360,7 +1360,7 @@ fn video_audio_hls() {
"level+error",
"-re",
"-i",
"./assets/with_audio.mp4"
"./assets/media_mix/with_audio.mp4"
];
let enc_cmd = prepare_output_cmd(&config, enc_prefix, &media.filter);
@ -1372,7 +1372,7 @@ fn video_audio_hls() {
"level+error",
"-re",
"-i",
"./assets/with_audio.mp4",
"./assets/media_mix/with_audio.mp4",
"-filter_complex",
"[0:v:0]scale=1024:576[vout0];[0:a:0]anull[aout0]",
"-map",
@ -1441,7 +1441,7 @@ fn video_audio_sub_meta_hls() {
"/usr/share/ffplayout/public/live/stream.m3u8"
]);
let media_obj = Media::new(0, "./assets/with_audio.mp4", true);
let media_obj = Media::new(0, "./assets/media_mix/with_audio.mp4", true);
let media = gen_source(&config, media_obj, &playout_stat, &player_control, 1);
let enc_prefix = vec_strings![
@ -1451,7 +1451,7 @@ fn video_audio_sub_meta_hls() {
"level+error",
"-re",
"-i",
"./assets/with_audio.mp4"
"./assets/media_mix/with_audio.mp4"
];
let enc_cmd = prepare_output_cmd(&config, enc_prefix, &media.filter);
@ -1463,7 +1463,7 @@ fn video_audio_sub_meta_hls() {
"level+error",
"-re",
"-i",
"./assets/with_audio.mp4",
"./assets/media_mix/with_audio.mp4",
"-filter_complex",
"[0:v:0]scale=1024:576[vout0];[0:a:0]anull[aout0]",
"-map",
@ -1533,7 +1533,7 @@ fn video_multi_audio_hls() {
"/usr/share/ffplayout/public/live/stream.m3u8"
]);
let media_obj = Media::new(0, "./assets/dual_audio.mp4", true);
let media_obj = Media::new(0, "./assets/media_mix/dual_audio.mp4", true);
let media = gen_source(&config, media_obj, &playout_stat, &player_control, 1);
let enc_prefix = vec_strings![
@ -1543,7 +1543,7 @@ fn video_multi_audio_hls() {
"level+error",
"-re",
"-i",
"./assets/dual_audio.mp4"
"./assets/media_mix/dual_audio.mp4"
];
let enc_cmd = prepare_output_cmd(&config, enc_prefix, &media.filter);
@ -1555,7 +1555,7 @@ fn video_multi_audio_hls() {
"level+error",
"-re",
"-i",
"./assets/dual_audio.mp4",
"./assets/media_mix/dual_audio.mp4",
"-filter_complex",
"[0:v:0]scale=1024:576[vout0];[0:a:0]anull[aout0];[0:a:1]anull[aout1]",
"-map",
@ -1640,7 +1640,7 @@ fn multi_video_audio_hls() {
"/usr/share/ffplayout/public/live/stream_%v.m3u8"
]);
let media_obj = Media::new(0, "./assets/with_audio.mp4", true);
let media_obj = Media::new(0, "./assets/media_mix/with_audio.mp4", true);
let media = gen_source(&config, media_obj, &playout_stat, &player_control, 1);
let enc_prefix = vec_strings![
@ -1650,7 +1650,7 @@ fn multi_video_audio_hls() {
"level+error",
"-re",
"-i",
"./assets/with_audio.mp4"
"./assets/media_mix/with_audio.mp4"
];
let enc_cmd = prepare_output_cmd(&config, enc_prefix, &media.filter);
@ -1662,7 +1662,7 @@ fn multi_video_audio_hls() {
"level+error",
"-re",
"-i",
"./assets/with_audio.mp4",
"./assets/media_mix/with_audio.mp4",
"-filter_complex",
"[0:v:0]scale=1024:576,split=2[v1_out][v2];[v2]scale=w=512:h=288[v2_out];[0:a]asplit=2[a1][a2]",
"-map",
@ -1758,7 +1758,7 @@ fn multi_video_multi_audio_hls() {
"/usr/share/ffplayout/public/live/stream_%v.m3u8"
]);
let media_obj = Media::new(0, "./assets/dual_audio.mp4", true);
let media_obj = Media::new(0, "./assets/media_mix/dual_audio.mp4", true);
let media = gen_source(&config, media_obj, &playout_stat, &player_control, 1);
let enc_prefix = vec_strings![
@ -1768,7 +1768,7 @@ fn multi_video_multi_audio_hls() {
"level+error",
"-re",
"-i",
"./assets/dual_audio.mp4"
"./assets/media_mix/dual_audio.mp4"
];
let enc_cmd = prepare_output_cmd(&config, enc_prefix, &media.filter);
@ -1780,7 +1780,7 @@ fn multi_video_multi_audio_hls() {
"level+error",
"-re",
"-i",
"./assets/dual_audio.mp4",
"./assets/media_mix/dual_audio.mp4",
"-filter_complex",
"[0:v:0]scale=1024:576,split=2[v1_out][v2];[v2]scale=w=512:h=288[v2_out];[0:a:0]anull,asplit=2[a_0_1][a_0_2];[0:a:1]anull,asplit=2[a_1_1][a_1_2]",
"-map",