This commit is contained in:
coolnsx
2023-08-10 12:41:11 +05:30
parent c7e738dc42
commit 297bc90938

3
screen
View File

@@ -29,8 +29,7 @@ compress() {
i=19 i=19
while :; do while :; do
ffmpeg -loglevel error -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -i "$tmp_file" -vf 'format=nv12,hwupload' -c:v h264_vaapi -qp "$i" "$process_file" -y -progress - | while read -r line; ffmpeg -loglevel error -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -i "$tmp_file" -vf 'format=nv12,hwupload' -c:v h264_vaapi -qp "$i" "$process_file" -y -progress - | while read -r line; do
do
complete=$(printf "%s\n" "$line" | sed -nE 's|out_time=(.*)|\1|p') complete=$(printf "%s\n" "$line" | sed -nE 's|out_time=(.*)|\1|p')
[ -n "$complete" ] && info "ffmpeg" "700" "Compressing File under 25 MB Using Quality Preset : $i.." "$complete out of $duration ($(du -m "$process_file" | cut -f1) MB)" [ -n "$complete" ] && info "ffmpeg" "700" "Compressing File under 25 MB Using Quality Preset : $i.." "$complete out of $duration ($(du -m "$process_file" | cut -f1) MB)"
[ "$(du -m "$process_file" | cut -f1)" -gt 25 ] && killall -s KILL ffmpeg && break [ "$(du -m "$process_file" | cut -f1)" -gt 25 ] && killall -s KILL ffmpeg && break