@Highend
Hello, I discovered this script and wanted to give it a try... to check films before uploading them to the NAS and avoid any nasty surprises.
Even though the script wasn't for me, could you have a look and see if you can find any errors?
I don't really trust ChatGPT when it comes to XY and its scripts.
Code: Select all
[in#0] Error opening input: Invalid argument
Error opening input file .
Error opening input files: Invalid argument

- XYplorer_VcMJsJrMey.jpg (125.51 KiB) Viewed 1921 times
This is the adjusted script:
Code: Select all
$ffmpeg = "c:\Youtube\ffmpeg.exe";
$logPath = "c:\Youtube\Log\";
$base = gpc(<cc_item>, "base");
$logFile = trim($logPath, "\", "R") . "\" . $base . ".log";
$batchFile = "%TEMP%\~xy_ffmpeg.bat";
$batchContent = lax("$ffmpeg" -v error -i "<cc_item>" -f null - 2>"$logFile");
writefile($batchFile, $batchContent, , "utf8");
run "$batchFile", "%TEMP%", 2, 0;
$content = "";
if (exists($logFile) == 1) {
$content = readfile($logFile, , , 65001);
$content = regexreplace($content, "^.*?Application provided invalid, non monotonically increasing dts to muxer in stream.*?(\r?\n|$)");
}
return $content;
Being ignorant, I thought that perhaps it was because I wasn't saving the log data in the folder:
and that the script was then colliding with this line:
Code: Select all
$batchFile = ‘%TEMP%\~xy_ffmpeg.bat’;
?