rewrite code that would check if video is 60 fps or higher (including cases like 60000/1001) to make it twice slower (30 fps or 30000/1001 depending on original framerate) for ffmpeg convertion (including VP9 and AV1):
fnamey = fpath3.Filename.."!.yuv"
fnamei = fpath3.Filename.."!.ivf"
fnameo = fpath3.Filename.."!.opus"
fnamew = fpath3.Filename.."!.webm"
fnameww = fpath3.Filename..".webm"
fext3 = fpath3.Extension;
fname3 = fpath3.Filename.."!!"..fext3;
--if (CheckBox.GetChecked("ultrafast_ffmpeg")) then
--fname3 = fpath3.Filename..".og_";
--end
fpathy = String.Concat(fpath4, fnamey);
fpathi = String.Concat(fpath4, fnamei);
fpatho = String.Concat(fpath4, fnameo);
fpathw = String.Concat(fpath4, fnamew);
fpathww = String.Concat(fpath4, fnameww);
fpath8 = fpathww.."!";
fpath5 = String.Concat(fpath4, fname3);
fpath7 = FoundPath;
fpath555 = """..FoundPath..""";
b = "AutoPlay\Scripts\ffprobe.exe -v error -show_entries format=bit_rate -of default=noprint_wrappers=1:nokey=1 -i "..fpath555;
bb = CommandLine.Execute(b, 0);
bbb = String.ToNumber(bb.StdOut);
vidbit = String.ToNumber(webmbit2);
vidbit = vidbit + 250000;
skip_vidbit = 0;
if (CheckBox.GetChecked("skip_vidbit")) then
if (bbb < vidbit) then
skip_vidbit = 1;
end
end
if (skip_vidbit == 0) then
File.Rename(fpath7, fpath5);
fpathop = fpatho;
fpathiv = fpathi;
fpath55 = fpath5;
fpathop = String.Replace(fpathop, """, "", false);
fpathiv = String.Replace(fpathiv, """, "", false);
fpath55 = String.Replace(fpath55, """, "", false);
fpathww = String.Replace(fpathww, """, "", false);
fpath5 = """..fpath5..""";
fpath7 = """..fpath7..""";
fpathy = """..fpathy..""";
fpathi = """..fpathi..""";
fpatho = """..fpatho..""";
fpathw = """..fpathw..""";
fpathwww = """..fpathww..""";
if (File.DoesExist(fpathww)) then
File.Rename(fpathww, fpath8);
vidch2 = 1;
vidch3 = 1;
end
w = "AutoPlay\Scripts\ffprobe.exe -v error -select_streams v:0 -show_entries stream=width -of default=nw=1:nk=1 -i "..fpath5;
ww = CommandLine.Execute(w, 0);
www = String.ToNumber(ww.StdOut);
h = "AutoPlay\Scripts\ffprobe.exe -v error -select_streams v:0 -show_entries stream=height -of default=nw=1:nk=1 -i "..fpath5;
hh = CommandLine.Execute(h, 0);
hhh = String.ToNumber(hh.StdOut);
sh = Math.Mod(hhh, 8);
sw = Math.Mod(www, 8);
shh = Math.Mod(hhh, 2);
sww = Math.Mod(www, 2);
if (s_vidq2 == "0") then
if (vid_qty_p == "") then
q = Input.GetText("vidq2");
else
q = vid_qty_p;
end
qq = String.ToNumber(q);
qqq = (bbb/100)*qq;
qqq = Math.Floor(qqq);
webmbit2 = qqq;
ffwebmbit2 = qqq/1000;
ffwebmbit2 = Math.Floor(ffwebmbit2);
if (CheckBox.GetChecked("nvenc")) then
if (mac_build_chk == 0) then
crf = " -rc cbr";
end
end
else
if (s_vidq2 ~= "2") then
if (vid_qty_c == "") then
crf = Input.GetText("vidq2");
else
crf = vid_qty_c;
end
if (CheckBox.GetChecked("nvenc")) then
if (mac_build_chk == 0) then
crf = " -rc constqp -qp "..crf;
end
else
crf = " -crf "..crf;
end
else
if (CheckBox.GetChecked("nvenc")) then
if (mac_build_chk == 0) then
crf = " -rc cbr";
end
end
end
end
d = "AutoPlay\Scripts\ffprobe.exe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 -i "..fpath5;
dd = CommandLine.Execute(d, 0);
ddd = String.ToNumber(dd.StdOut);
ddd = Math.Floor(ddd);
if (CheckBox.GetChecked("auto_vid_ds")) then
if ((www == 4096) or (www == 3840) or (www == 2560)) then
vidresize = " -vf scale=1920:-2 -sws_flags lanczos+accurate_rnd+full_chroma_int+full_chroma_inp";
end
if (www == 1920) then
vidresize = " -vf scale=1280:-2 -sws_flags lanczos+accurate_rnd+full_chroma_int+full_chroma_inp";
end
if (www == 1280) then
vidresize = " -vf scale=960:-2 -sws_flags lanczos+accurate_rnd+full_chroma_int+full_chroma_inp";
end
end
StatusDlg.SetTitle("Compressing video...");
if ((sw ~= 0) or (sh ~= 0) or (ddd < 4) or (CheckBox.GetChecked("oldCPU2")) or (CheckBox.GetChecked("h264")) or (CheckBox.GetChecked("h265"))) then
if (not (CheckBox.GetChecked("donor"))) then
if (CheckBox.GetChecked("ultrafast_ffmpeg")) then
if (mac_build_chk == 0) then
if (CheckBox.GetChecked("h264")) then
if (not CheckBox.GetChecked("nvenc")) then
result = Shell.Execute("Autoplay\Scripts\ffmpeg_x265.exe", "open", " -y -i "..fpath5..vidresize.." -c:v libx264 -b:v "..ffwebmbit2.."k -movflags +faststart -f mp4 "..ffmpegs2..crf.." -c:a libopus -vbr on -compression_level 10 -b:a 40k "..fpathwww, fpath4, SW_HIDE, false)
else
result = Shell.Execute("Autoplay\Scripts\ffmpeg_x265.exe", "open", " -y -i "..fpath5..vidresize.." -c:v h264_nvenc -b:v "..ffwebmbit2.."k -movflags +faststart -f mp4 "..ffmpegs2..crf.." -c:a libopus -vbr on -compression_level 10 -b:a 40k "..fpathwww, fpath4, SW_HIDE, false)
end
else
if (CheckBox.GetChecked("h265")) then
if (not CheckBox.GetChecked("nvenc")) then
result = Shell.Execute("Autoplay\Scripts\ffmpeg_x265.exe", "open", " -y -i "..fpath5..vidresize.." -c:v libx265 -b:v "..ffwebmbit2.."k -movflags +faststart -f mp4 "..ffmpegs2..crf.." -c:a libopus -vbr on -compression_level 10 -b:a 40k "..fpathwww, fpath4, SW_HIDE, false)
else
result = Shell.Execute("Autoplay\Scripts\ffmpeg_x265.exe", "open", " -y -i "..fpath5..vidresize.." -c:v hevc_nvenc -b:v "..ffwebmbit2.."k -movflags +faststart -f mp4 "..ffmpegs2..crf.." -c:a libopus -vbr on -compression_level 10 -b:a 40k "..fpathwww, fpath4, SW_HIDE, false)
end
else
if ((svt_av1 == 6) and (sww == 0) and (shh == 0)) then
result = Shell.Execute("Autoplay\Scripts\ffmpeg_avif.exe", "open", " -y -i "..fpath5..vidresize.." -c:v libsvtav1 "..crf.." -b:v "..ffwebmbit2.."k "..svt_av1_q.." -c:a libopus -b:a 40k -f webm "..fpathwww, fpath4, SW_HIDE, false)
else
result = Shell.Execute("Autoplay\Scripts\ffmpeg.exe", "open", "-y -i "..fpath5..vidresize.." -c:v libvpx-vp9 -b:v "..ffwebmbit2.."K -g 240 -row-mt 1 -frame-parallel 1 -auto-alt-ref 1 -lag-in-frames 25 -speed "..ffmpegs2..crf.." -c:a libopus -vbr on -compression_level 10 -frame_duration 60 -application audio -b:a 40k -f webm "..fpathwww, fpath4, SW_HIDE, false)
end
end
end
else
if ((svt_av1 == 6) and (sww == 0) and (shh == 0)) then
result = Shell.Execute("Autoplay\Scripts\ffmpeg_avif.exe", "open", " -y -i "..fpath5..vidresize.." -c:v libsvtav1 "..crf.." -b:v "..ffwebmbit2.."k "..svt_av1_q.." -c:a libopus -b:a 40k -f webm "..fpathwww, fpath4, SW_HIDE, false)
else
result = Shell.Execute("Autoplay\Scripts\ffmpeg.exe", "open", "-y -i "..fpath5..vidresize.." -c:v libvpx-vp9 -b:v "..ffwebmbit2.."K -g 240 -row-mt 1 -frame-parallel 1 -auto-alt-ref 1 -lag-in-frames 25 -speed "..ffmpegs2..crf.." -c:a libopus -vbr on -compression_level 10 -frame_duration 60 -application audio -b:a 40k -f webm "..fpathwww, fpath4, SW_HIDE, false)
end
end
else
if (mac_build_chk == 0) then
if (CheckBox.GetChecked("h264")) then
if (not CheckBox.GetChecked("nvenc")) then
result = Shell.Execute("Autoplay\Scripts\ffmpeg_x265.exe", "open", " -y -i "..fpath5..vidresize.." -c:v libx264 -b:v "..ffwebmbit2.."k -movflags +faststart -f mp4 "..ffmpegs2..crf.." -c:a libopus -vbr on -compression_level 10 -b:a 40k "..fpathwww, fpath4, SW_HIDE, true)
else
result = Shell.Execute("Autoplay\Scripts\ffmpeg_x265.exe", "open", " -y -i "..fpath5..vidresize.." -c:v h264_nvenc -b:v "..ffwebmbit2.."k -movflags +faststart -f mp4 "..ffmpegs2..crf.." -c:a libopus -vbr on -compression_level 10 -b:a 40k "..fpathwww, fpath4, SW_HIDE, true)
end
else
if (CheckBox.GetChecked("h265")) then
if (not CheckBox.GetChecked("nvenc")) then
result = Shell.Execute("Autoplay\Scripts\ffmpeg_x265.exe", "open", " -y -i "..fpath5..vidresize.." -c:v libx265 -b:v "..ffwebmbit2.."k -movflags +faststart -f mp4 "..ffmpegs2..crf.." -c:a libopus -vbr on -compression_level 10 -b:a 40k "..fpathwww, fpath4, SW_HIDE, true)
else
result = Shell.Execute("Autoplay\Scripts\ffmpeg_x265.exe", "open", " -y -i "..fpath5..vidresize.." -c:v hevc_nvenc -b:v "..ffwebmbit2.."k -movflags +faststart -f mp4 "..ffmpegs2..crf.." -c:a libopus -vbr on -compression_level 10 -b:a 40k "..fpathwww, fpath4, SW_HIDE, true)
end
else
if ((svt_av1 == 6) and (sww == 0) and (shh == 0)) then
result = Shell.Execute("Autoplay\Scripts\ffmpeg_avif.exe", "open", " -y -i "..fpath5..vidresize.." -c:v libsvtav1 "..crf.." -b:v "..ffwebmbit2.."k "..svt_av1_q.." -c:a libopus -b:a 40k -f webm "..fpathwww, fpath4, SW_HIDE, true)
else
result = Shell.Execute("Autoplay\Scripts\ffmpeg.exe", "open", "-y -i "..fpath5..vidresize.." -c:v libvpx-vp9 -b:v "..ffwebmbit2.."K -g 240 -row-mt 1 -frame-parallel 1 -auto-alt-ref 1 -lag-in-frames 25 -speed "..ffmpegs2..crf.." -c:a libopus -vbr on -compression_level 10 -frame_duration 60 -application audio -b:a 40k -f webm "..fpathwww, fpath4, SW_HIDE, true)
end
end
end
else
if ((svt_av1 == 6) and (sww == 0) and (shh == 0)) then
result = Shell.Execute("Autoplay\Scripts\ffmpeg_avif.exe", "open", " -y -i "..fpath5..vidresize.." -c:v libsvtav1 "..crf.." -b:v "..ffwebmbit2.."k "..svt_av1_q.." -c:a libopus -b:a 40k -f webm "..fpathwww, fpath4, SW_HIDE, true)
else
result = Shell.Execute("Autoplay\Scripts\ffmpeg.exe", "open", "-y -i "..fpath5..vidresize.." -c:v libvpx-vp9 -b:v "..ffwebmbit2.."K -g 240 -row-mt 1 -frame-parallel 1 -auto-alt-ref 1 -lag-in-frames 25 -speed "..ffmpegs2..crf.." -c:a libopus -vbr on -compression_level 10 -frame_duration 60 -application audio -b:a 40k -f webm "..fpathwww, fpath4, SW_HIDE, true)
end
end
end
else
if (g_FolderSize > 55555555) then
donor1 = fpath1;
else
donor1 = fpath0;
end
if (g_FolderSize2 > 33333333) then
donor2 = fpath11;
fpath2222 = String.Replace(FoundPath, donor1, donor2, false);
if (CheckBox.GetChecked("pack2rpa")) then
pack_rpa_chk = String.Find(fpath2222, "!\", 1, false);
if (pack_rpa_chk ~= -1) then
game = String.Find(fpath2222, "\game\", 1, false);
remove = String.Mid(fpath2222, game, pack_rpa_chk + 2 - game);
fpath2222 = String.Replace(fpath2222, remove, "\game\rpakit_out\", false);
end
end
else
donor2 = fpath22;
fpath2222 = String.Replace(FoundPath, donor1, donor2, false);
if (CheckBox.GetChecked("pack2rpa")) then
pack_rpa_chk = String.Find(fpath2222, "!\", 1, false);
if (pack_rpa_chk ~= -1) then
game = String.Find(fpath2222, "\game\", 1, false);
remove = String.Mid(fpath2222, game, pack_rpa_chk + 2 - game);
fpath2222 = String.Replace(fpath2222, remove, "\game\", false);
end
end
end
donor_vid = File.DoesExist(fpath2222);
if ((donor_vid) and (fpath2222 ~= FoundPath)) then
File.Move(fpath2222, fpathww, false, true, false, true, nil);
else
if (CheckBox.GetChecked("ultrafast_ffmpeg")) then
if (mac_build_chk == 0) then
if (CheckBox.GetChecked("h264")) then
if (not CheckBox.GetChecked("nvenc")) then
result = Shell.Execute("Autoplay\Scripts\ffmpeg_x265.exe", "open", " -y -i "..fpath5..vidresize.." -c:v libx264 -b:v "..ffwebmbit2.."k -movflags +faststart -f mp4 "..ffmpegs2..crf.." -c:a libopus -vbr on -compression_level 10 -b:a 40k "..fpathwww, fpath4, SW_HIDE, false)
else
result = Shell.Execute("Autoplay\Scripts\ffmpeg_x265.exe", "open", " -y -i "..fpath5..vidresize.." -c:v h264_nvenc -b:v "..ffwebmbit2.."k -movflags +faststart -f mp4 "..ffmpegs2..crf.." -c:a libopus -vbr on -compression_level 10 -b:a 40k "..fpathwww, fpath4, SW_HIDE, false)
end
else
if (CheckBox.GetChecked("h265")) then
if (not CheckBox.GetChecked("nvenc")) then
result = Shell.Execute("Autoplay\Scripts\ffmpeg_x265.exe", "open", " -y -i "..fpath5..vidresize.." -c:v libx265 -b:v "..ffwebmbit2.."k -movflags +faststart -f mp4 "..ffmpegs2..crf.." -c:a libopus -vbr on -compression_level 10 -b:a 40k "..fpathwww, fpath4, SW_HIDE, false)
else
result = Shell.Execute("Autoplay\Scripts\ffmpeg_x265.exe", "open", " -y -i "..fpath5..vidresize.." -c:v hevc_nvenc -b:v "..ffwebmbit2.."k -movflags +faststart -f mp4 "..ffmpegs2..crf.." -c:a libopus -vbr on -compression_level 10 -b:a 40k "..fpathwww, fpath4, SW_HIDE, false)
end
else
if ((svt_av1 == 6) and (sww == 0) and (shh == 0)) then
result = Shell.Execute("Autoplay\Scripts\ffmpeg_avif.exe", "open", " -y -i "..fpath5..vidresize.." -c:v libsvtav1 "..crf.." -b:v "..ffwebmbit2.."k "..svt_av1_q.." -c:a libopus -b:a 40k -f webm "..fpathwww, fpath4, SW_HIDE, false)
else
result = Shell.Execute("Autoplay\Scripts\ffmpeg.exe", "open", "-y -i "..fpath5..vidresize.." -c:v libvpx-vp9 -b:v "..ffwebmbit2.."K -g 240 -row-mt 1 -frame-parallel 1 -auto-alt-ref 1 -lag-in-frames 25 -speed "..ffmpegs2..crf.." -c:a libopus -vbr on -compression_level 10 -frame_duration 60 -application audio -b:a 40k -f webm "..fpathwww, fpath4, SW_HIDE, false)
end
end
end
else
if ((svt_av1 == 6) and (sww == 0) and (shh == 0)) then
result = Shell.Execute("Autoplay\Scripts\ffmpeg_avif.exe", "open", " -y -i "..fpath5..vidresize.." -c:v libsvtav1 "..crf.." -b:v "..ffwebmbit2.."k "..svt_av1_q.." -c:a libopus -b:a 40k -f webm "..fpathwww, fpath4, SW_HIDE, false)
else
result = Shell.Execute("Autoplay\Scripts\ffmpeg.exe", "open", "-y -i "..fpath5..vidresize.." -c:v libvpx-vp9 -b:v "..ffwebmbit2.."K -g 240 -row-mt 1 -frame-parallel 1 -auto-alt-ref 1 -lag-in-frames 25 -speed "..ffmpegs2..crf.." -c:a libopus -vbr on -compression_level 10 -frame_duration 60 -application audio -b:a 40k -f webm "..fpathwww, fpath4, SW_HIDE, false)
end
end
else
if (mac_build_chk == 0) then
if (CheckBox.GetChecked("h264")) then
if (not CheckBox.GetChecked("nvenc")) then
result = Shell.Execute("Autoplay\Scripts\ffmpeg_x265.exe", "open", " -y -i "..fpath5..vidresize.." -c:v libx264 -b:v "..ffwebmbit2.."k -movflags +faststart -f mp4 "..ffmpegs2..crf.." -c:a libopus -vbr on -compression_level 10 -b:a 40k "..fpathwww, fpath4, SW_HIDE, true)
else
result = Shell.Execute("Autoplay\Scripts\ffmpeg_x265.exe", "open", " -y -i "..fpath5..vidresize.." -c:v h264_nvenc -b:v "..ffwebmbit2.."k -movflags +faststart -f mp4 "..ffmpegs2..crf.." -c:a libopus -vbr on -compression_level 10 -b:a 40k "..fpathwww, fpath4, SW_HIDE, true)
end
else
if (CheckBox.GetChecked("h265")) then
if (not CheckBox.GetChecked("nvenc")) then
result = Shell.Execute("Autoplay\Scripts\ffmpeg_x265.exe", "open", " -y -i "..fpath5..vidresize.." -c:v libx265 -b:v "..ffwebmbit2.."k -movflags +faststart -f mp4 "..ffmpegs2..crf.." -c:a libopus -vbr on -compression_level 10 -b:a 40k "..fpathwww, fpath4, SW_HIDE, true)
else
result = Shell.Execute("Autoplay\Scripts\ffmpeg_x265.exe", "open", " -y -i "..fpath5..vidresize.." -c:v hevc_nvenc -b:v "..ffwebmbit2.."k -movflags +faststart -f mp4 "..ffmpegs2..crf.." -c:a libopus -vbr on -compression_level 10 -b:a 40k "..fpathwww, fpath4, SW_HIDE, true)
end
else
if ((svt_av1 == 6) and (sww == 0) and (shh == 0)) then
result = Shell.Execute("Autoplay\Scripts\ffmpeg_avif.exe", "open", " -y -i "..fpath5..vidresize.." -c:v libsvtav1 "..crf.." -b:v "..ffwebmbit2.."k "..svt_av1_q.." -c:a libopus -b:a 40k -f webm "..fpathwww, fpath4, SW_HIDE, true)
else
result = Shell.Execute("Autoplay\Scripts\ffmpeg.exe", "open", "-y -i "..fpath5..vidresize.." -c:v libvpx-vp9 -b:v "..ffwebmbit2.."K -g 240 -row-mt 1 -frame-parallel 1 -auto-alt-ref 1 -lag-in-frames 25 -speed "..ffmpegs2..crf.." -c:a libopus -vbr on -compression_level 10 -frame_duration 60 -application audio -b:a 40k -f webm "..fpathwww, fpath4, SW_HIDE, true)
end
end
end
else
if ((svt_av1 == 6) and (sww == 0) and (shh == 0)) then
result = Shell.Execute("Autoplay\Scripts\ffmpeg_avif.exe", "open", " -y -i "..fpath5..vidresize.." -c:v libsvtav1 "..crf.." -b:v "..ffwebmbit2.."k "..svt_av1_q.." -c:a libopus -b:a 40k -f webm "..fpathwww, fpath4, SW_HIDE, true)
else
result = Shell.Execute("Autoplay\Scripts\ffmpeg.exe", "open", "-y -i "..fpath5..vidresize.." -c:v libvpx-vp9 -b:v "..ffwebmbit2.."K -g 240 -row-mt 1 -frame-parallel 1 -auto-alt-ref 1 -lag-in-frames 25 -speed "..ffmpegs2..crf.." -c:a libopus -vbr on -compression_level 10 -frame_duration 60 -application audio -b:a 40k -f webm "..fpathwww, fpath4, SW_HIDE, true)
end
end
end
end
end
else
result = Shell.Execute("Autoplay\Scripts\ffmpeg.exe", "open", " -y -i "..fpath5.." -c:v rawvideo -pixel_format yuv420p "..fpathy, fpath4, SW_HIDE, true)
f = "AutoPlay\Scripts\ffprobe.exe -v 0 -of csv=p=0 -select_streams v:0 -show_entries stream=r_frame_rate -i "..fpath5 ff = CommandLine.Execute(f, 0);
ff = CommandLine.Execute(f, 0);
fff = ff.StdOut;
fffs = String.Find(fff, "/", 1, false);
fffl = String.Length(fff);
fff1 = fffs - 1;
fff2 = fffs + 1;
fff3 = fffl - fffs;
fffn = String.Mid(fff, 1, fff1);
fffd = String.Mid(fff, fff2, 4);
if ((fffn == "1000") or (fffn == "0")) then
fffn = "30";
fffd = "1";
end
if ((s_vidq2 ~= "1") and (s_vidq2 ~= "3")) then
result = Shell.Execute("Autoplay\Scripts\SvtVp9EncApp.exe", "open", " -y -i "..fpathy.." -w "..www.." -h "..hhh.." -fps-num "..fffn.." -fps-denom "..fffd.." -rc 1 -tbr "..webmbit2.." -enc-mode 5 -b "..fpathi, fpath4, SW_HIDE, true)
else
crf = Input.GetText("vidq2");
result = Shell.Execute("Autoplay\Scripts\SvtVp9EncApp.exe", "open", " -y -i "..fpathy.." -w "..www.." -h "..hhh.." -fps-num "..fffn.." -fps-denom "..fffd.." -rc 0 -tune 0 -q "..crf.." -enc-mode 5 -b "..fpathi, fpath4, SW_HIDE, true)
end
result = Shell.Execute("Autoplay\Scripts\ffmpeg.exe", "open", " -y -i "..fpathi.." -codec copy "..fpathw, fpath4, SW_HIDE, true)
result = Shell.Execute("Autoplay\Scripts\ffmpeg.exe", "open", " -y -i "..fpath5.." -map 0:a -b:a 40k "..fpatho, fpath4, SW_HIDE, true)
ch8 = File.DoesExist(fpathop);
ch9 = File.DoesExist(fpathiv);
if ((ch9) and (File.GetSize(fpathiv) ~= 0)) then
if ((ch8) and (File.GetSize(fpathop) ~= 0)) then
result = Shell.Execute("Autoplay\Scripts\ffmpeg.exe", "open", " -y -i "..fpathw.." -y -i "..fpatho.." -c copy -map 0:v -map 1:a "..fpathwww, fpath4, SW_HIDE, true)
else
result = Shell.Execute("Autoplay\Scripts\ffmpeg.exe", "open", " -y -i "..fpathw.." -c copy -map 0:v "..fpathwww, fpath4, SW_HIDE, true)
end
else
File.Rename(fpath55, FoundPath);
vidch = 1;
end
fpath5 = String.Replace(fpath5, """, "", false);
fpathy = String.Replace(fpathy, """, "", false);
fpathi = String.Replace(fpathi, """, "", false);
fpatho = String.Replace(fpatho, """, "", false);
fpathw = String.Replace(fpathw, """, "", false);
File.Delete(fpathy, false, false, false, nil);
File.Delete(fpathi, false, false, false, nil);
File.Delete(fpatho, false, false, false, nil);
File.Delete(fpathw, false, false, false, nil);
end
if (not (CheckBox.GetChecked("ultrafast_ffmpeg"))) then
if (File.DoesExist(fpathww)) then
if (not (CheckBox.GetChecked("chk_vid_size"))) then
File.Delete(fpath55, false, false, false, nil);
File.Rename(fpathww, FoundPath);
else
webmo_size = File.GetSize(fpathww);
webm_size = File.GetSize(fpath55);
if ((webmo_size > webm_size) or (webmo_size == 0)) then
File.Delete(fpathww, false, false, false, nil);
File.Rename(fpath55, FoundPath);
vid_skip = vid_skip + 1;
else
File.Delete(fpath55, false, false, false, nil);
File.Rename(fpathww, FoundPath);
end
end;
if (vidch == 0) then
if (fext3 == ".mp4") then
mp4c = mp4c + 1;
if (CheckBox.GetChecked("showprog2")) then
INIFile.SetValue(_SourceFolder.."\progress.ini", "Main", "mp4c", mp4c);
end
end
if (fext3 == ".mpg") then
mpgc = mpgc + 1;
if (CheckBox.GetChecked("showprog2")) then
INIFile.SetValue(_SourceFolder.."\progress.ini", "Main", "mpgc", mpgc);
end
end
if (fext3 == ".avi") then
avic = avic + 1;
if (CheckBox.GetChecked("showprog2")) then
INIFile.SetValue(_SourceFolder.."\progress.ini", "Main", "avic", avic);
end
end
if (fext3 == ".mkv") then
mkvc = mkvc + 1;
if (CheckBox.GetChecked("showprog2")) then
INIFile.SetValue(_SourceFolder.."\progress.ini", "Main", "mkvc", mkvc);
end
end
if (fext3 == ".ogv") then
ogvc = ogvc + 1;
if (CheckBox.GetChecked("showprog2")) then
INIFile.SetValue(_SourceFolder.."\progress.ini", "Main", "ogvc", ogvc);
end
end
if (fext3 == ".mov") then
movc = movc + 1;
if (CheckBox.GetChecked("showprog2")) then
INIFile.SetValue(_SourceFolder.."\progress.ini", "Main", "movc", movc);
end
end
if (fext3 == ".mpeg") then
mpegc = mpegc + 1;
if (CheckBox.GetChecked("showprog2")) then
INIFile.SetValue(_SourceFolder.."\progress.ini", "Main", "mpegc", mpegc);
end
end
end
else
File.Rename(fpath55, FoundPath);
end
if (vidch2 == 1) then
File.Rename(fpath8, fpathww);
end
else
if (vidch == 0) then
if (fext3 == ".mp4") then
mp4c = mp4c + 1;
if (CheckBox.GetChecked("showprog2")) then
INIFile.SetValue(_SourceFolder.."\progress.ini", "Main", "mp4c", mp4c);
end
end
if (fext3 == ".mpg") then
mpgc = mpgc + 1;
if (CheckBox.GetChecked("showprog2")) then
INIFile.SetValue(_SourceFolder.."\progress.ini", "Main", "mpgc", mpgc);
end
end
if (fext3 == ".avi") then
avic = avic + 1;
if (CheckBox.GetChecked("showprog2")) then
INIFile.SetValue(_SourceFolder.."\progress.ini", "Main", "avic", avic);
end
end
if (fext3 == ".mkv") then
mkvc = mkvc + 1;
if (CheckBox.GetChecked("showprog2")) then
INIFile.SetValue(_SourceFolder.."\progress.ini", "Main", "mkvc", mkvc);
end
end
if (fext3 == ".ogv") then
ogvc = ogvc + 1;
if (CheckBox.GetChecked("showprog2")) then
INIFile.SetValue(_SourceFolder.."\progress.ini", "Main", "ogvc", ogvc);
end
end
if (fext3 == ".mov") then
movc = movc + 1;
if (CheckBox.GetChecked("showprog2")) then
INIFile.SetValue(_SourceFolder.."\progress.ini", "Main", "movc", movc);
end
end
if (fext3 == ".mpeg") then
mpegc = mpegc + 1;
if (CheckBox.GetChecked("showprog2")) then
INIFile.SetValue(_SourceFolder.."\progress.ini", "Main", "mpegc", mpegc);
end
end
end
end
end
end