diff --git a/download.sh b/download.sh index 181dc0b..972fb49 100755 --- a/download.sh +++ b/download.sh @@ -72,9 +72,11 @@ for m3u8_manifest_url in ${m3u8_manifest_urls}; do outfile="$(printf '%s' "${OUTFILE_PATTERN}" | sed "s/INDEX/${idx}/g")" - printf '\033[32m%s\033[m\n' "Download video ${idx} of ${total}" - ffmpeg -loglevel 24 -headers "authorization: Bearer ${BASE64_BEARER_TOKEN}" -i "${m3u8_highest_res_url}" -c copy "${outfile}" - printf '\033[33m%s\033[m\n' "Done" + printf '\033[32m%s\033[m\n' "Download '${outfile}' (${idx}/${total})" + + ffmpeg -hide_banner -loglevel error -headers "authorization: Bearer ${BASE64_BEARER_TOKEN}" -i "${m3u8_highest_res_url}" -progress - -c copy "${outfile}" | grep --line-buffered 'out_time=' | sed -u -e 's/out_time=//g' | xargs -I{} printf '{}\r' + + printf '\n\033[33m%s\033[m\n' "Done" idx=$(( idx + 1 )) done