From 1a7eb0f86373aee5b4cce9e8512fab0ea12fccc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20L=C3=B8vbr=C3=B8tte=20Olsen?= Date: Fri, 27 Mar 2020 08:43:19 +0100 Subject: [PATCH] Update scripts --- client.sh | 10 ++++++---- create_jobs.sh | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/client.sh b/client.sh index b2bfb54..bc750aa 100755 --- a/client.sh +++ b/client.sh @@ -4,8 +4,8 @@ set -euo pipefail IFS=$'\n\t' -base_url="http://localhost:8000" -version="0.1.0" +base_url="$1" +version="0.2.0" while true; do sleep 1 @@ -52,14 +52,16 @@ while true; do speed=`echo $job | jq -r .description.options.speed` - ffmpeg -i "$input" -vf scale=$width:$height -f yuv4mpegpipe - | aomenc - --lag-in-frames=25 --tile-columns=0 --tile-rows=0 --enable-fwd-kf=1 \ + ffmpeg -nostats -i "$input" -vf scale=$width:$height -f yuv4mpegpipe - | aomenc - --lag-in-frames=25 --tile-columns=0 --tile-rows=0 --enable-fwd-kf=1 \ --target-bitrate=$target_bitrate --width="$width" --height="$height" --bit-depth=$color_depth --kf-min-dist=$kf_min_dist --kf-max-dist=$kf_min_dist \ --cpu-used=$speed \ --pass=1 --passes=2 --fpf="$input.$target_bitrate.$width.$height.$color_depth.fpf" --webm -o "$input.$target_bitrate.$width.$height.$color_depth.webm" - ffmpeg -i "$input" -vf scale=$width:$height -f yuv4mpegpipe - | aomenc - --lag-in-frames=25 --tile-columns=0 --tile-rows=0 --enable-fwd-kf=1 \ + ffmpeg -nostats -i "$input" -vf scale=$width:$height -f yuv4mpegpipe - | aomenc - --lag-in-frames=25 --tile-columns=0 --tile-rows=0 --enable-fwd-kf=1 \ --target-bitrate=$target_bitrate --width="$width" --height="$height" --bit-depth=$color_depth --kf-min-dist=$kf_min_dist --kf-max-dist=$kf_min_dist \ --cpu-used=$speed \ --pass=2 --passes=2 --fpf="$input.$target_bitrate.$width.$height.$color_depth.fpf" --webm -o "$input.$target_bitrate.$width.$height.$color_depth.webm" + curl -s -L "$base_url"/edit_status/"$job_id"/completed + done \ No newline at end of file diff --git a/create_jobs.sh b/create_jobs.sh index 0dcf8f9..575f14f 100755 --- a/create_jobs.sh +++ b/create_jobs.sh @@ -4,7 +4,7 @@ set -euo pipefail IFS=$'\n\t' -base_url="http://localhost:8000" +base_url="$2" upload() { for f; do echo $(curl -#Sf -F "files[]=@$f" https://pomf.dodsorf.as/upload\?output\=text); done }