From 3708e329c660374807d175854e2fcceb115042f3 Mon Sep 17 00:00:00 2001 From: Pavel Kirilin <win10@list.ru> Date: Tue, 19 May 2020 20:14:11 +0400 Subject: [PATCH] Removed concatenating. Signed-off-by: Pavel Kirilin <win10@list.ru> --- assets/scripts/playerctl_loader.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/assets/scripts/playerctl_loader.sh b/assets/scripts/playerctl_loader.sh index 963bda4..3a9b340 100644 --- a/assets/scripts/playerctl_loader.sh +++ b/assets/scripts/playerctl_loader.sh @@ -18,9 +18,8 @@ playlist_title="playlist" function cleanup_and_exit() { rm -fv "current.mp3" "bg.png" "cover.jpg" "cover.png" - ffmpeg -f concat -safe 0 -i concat -c copy "${playlist_title}.mp4" - rm -fv concat popd + mv "$workdir" "$playlist_title" } trap "cleanup_and_exit" EXIT @@ -48,14 +47,16 @@ while [[ "$(playerctl status)" = "Playing" ]];do rm -fv "cover.jpg" "cover.png" - ffmpeg -r 1 -loop 1 -framerate 1 -i "bg.png" -i "current.mp3" \ + ffmpeg -r 1 -loop 1 -i "bg.png" -i "current.mp3" \ -map 0:v -map 1:a \ - -c:v libxvid -pix_fmt yuv420p \ + -c:v libx264 -crf 23 -g 60 \ -c:a aac \ -vf "scale=-1:720,pad=ceil(iw/2)*2:ceil(ih/2)*2" \ + -maxrate 2M -bufsize 2M \ + -preset ultrafast -pix_fmt yuv420p \ + -framerate 30 -probesize 42M \ + -movflags faststart \ -shortest -y -strict -2 "${index}.mp4" - - echo "file '${index}.mp4'" >> concat index=$((index + 1)) if ! (playerctl next);then -- GitLab