From 5113a05dbf3e50ab377ffb3323cf2faa1740ed47 Mon Sep 17 00:00:00 2001 From: Pavel Kirilin <win10@list.ru> Date: Sun, 20 Sep 2020 01:38:54 +0400 Subject: [PATCH] Updated loader. Signed-off-by: Pavel Kirilin <win10@list.ru> --- assets/scripts/playerctl_loader.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/scripts/playerctl_loader.sh b/assets/scripts/playerctl_loader.sh index 9148a02..ab51ed9 100644 --- a/assets/scripts/playerctl_loader.sh +++ b/assets/scripts/playerctl_loader.sh @@ -22,6 +22,7 @@ function player(){ function cleanup_and_exit() { if [[ "$job_started" = "1" ]];then rm -fv "current.mp3" "bg.png" "cover.jpg" "cover.png" + find . -name '*.webm' -exec basename {} \; | xargs -I {} echo "file '{}'" > concat ffmpeg -f concat -i concat -c copy "compiled-$((compiled_index + 1)).webm" rm -fv "concat" popd || exit @@ -67,7 +68,7 @@ function render_on_gpu(){ ffmpeg -loop 1 -init_hw_device cuda=cuda:0 \ -hwaccel nvdec \ -vsync 1 -async 1 \ - -r 5 -i "$background" -i "$sound" -r 25 -i "${target_adv}" \ + -r 3 -i "$background" -i "$sound" -r 25 -i "${target_adv}" \ -filter_complex "[0:v]scale=w=1280:h=720:force_original_aspect_ratio=2,crop=1280:720[img]; \ [2:v]setpts=10*PTS[adv]; \ [adv]loop[ladv]; \ @@ -147,7 +148,6 @@ while [[ "$(player status)" = "Playing" ]];do echo "Cuda was found. Hardware acceleration enabled." render_on_gpu "bg.png" "current.mp3" "${index}" "${target_adv}" fi - echo "file '${index}.webm'" >> concat index=$((index + 1)) if [[ "$(player next)" = "ERROR" ]];then -- GitLab