Better progress

This commit is contained in:
tosu 2023-03-02 21:37:20 +01:00
parent d6f95176f6
commit b249277fb5
1 changed files with 5 additions and 3 deletions

View File

@ -72,9 +72,11 @@ for m3u8_manifest_url in ${m3u8_manifest_urls}; do
outfile="$(printf '%s' "${OUTFILE_PATTERN}" | sed "s/INDEX/${idx}/g")" outfile="$(printf '%s' "${OUTFILE_PATTERN}" | sed "s/INDEX/${idx}/g")"
printf '\033[32m%s\033[m\n' "Download video ${idx} of ${total}" printf '\033[32m%s\033[m\n' "Download '${outfile}' (${idx}/${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" 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 )) idx=$(( idx + 1 ))
done done