I have an External HDD with a lot of MKV Movies on it. Many of these have Chapters Markings embedded in the MKV file. Others don't have any chapters. Is it possible to search for the MKV Files WITHOUT Chapters? That would be very helpful. I am a newbie to scripts. Hopefully you have any suggestions. So it's to write a script that runs all video files through mediainfo and parse the output to find those that don't have any chapter markers. I had a script for xyplorer, but because of stability problems i switched to Directory Opus Pro
We can probably add a column and search type for that in Opus 13, as that is using MediaInfo now. (We've added a bunch of other columns, but that wasn't one I'd thought of.)
In the shorter term, or if you don't want to use the 13 public beta, I bet ExifTool and @Lxp's ExifTool Custom Columns script can get the data. In the Find/Advanced panel, you could then add a Script Column comparison to the filter.
These may also come in handy, if you want to go the script route:
PrintMeta (Write metadata to text files) is another script by @Lxp which can output all the metadata ExifTool (or MediaInfo) can output for a file, which can be a quick way to find the right keyword for the data you need, and verify the data is what you expect.
AFAIK using MediaInfo.exe the total chapters is the difference between these 2 values: %Chapters_Pos_Begin% and %Chapters_Pos_End% (using the actual MediaInfo library like DOpus I think is more direct and allows to obtain other info like chapters names). @bartpet I wrote a script some time ago that allows me to search by chapter number, among other things. If you're interested, I could send it to you via DM (since I only tested it myself, I don't know if it's ready for release).
Thanks for your reply lxp and errante. this is the script i used in xyplorer. This script worked very good, but somehow caused big stability problems in xyplorer. I'm new to scripting, i can see that you both know a lot about script-writing, so below you find the XYplorer script using MediaInfo CLI, perhaps it's helpful. Thanks you in advance for any input, greetings Bart:
// Find all video file(s) that do NOT have chapter marks
$mediaInfoCLI = "C:\Users\bartp\OneDrive\Bureaublad\Portable Apps\MediaInfo CLI\MediaInfo.exe";
end (exists($mediaInfoCLI) != 1), quote($mediaInfoCLI) . " not found, aborted!";
$videosFiles = quicksearch("{:Video}", , , "s"); // "/types=mkv;mp4;..."
$cntVideoFiles = gettoken($videosFiles, "count", <crlf>);
end (!$videosFiles), "No video file(s) found, aborted!";
showstatus 0;
$log = "";
while ($i++ < $cntVideoFiles) {
$videoFile = gettoken($videosFiles, $i, <crlf>);
status "Processing [" . $i . "/" . $cntVideoFiles . "]: " . quote(gpc($videoFile, "file")), , "progress";
$result = runret(lax("$mediaInfoCLI" "$videoFile"), , 65001);
if (regexmatches($result, "^\d{2}:\d{2}:\d{2}")) { continue; }
$log .= $videoFile . <crlf>;
}
end (!$log), "No video file(s) without chapter marks found!";
paperfolder("Videos without chapter marks.txt", $log);
Thanks lxp. Sorry for being unclear. I didn't write the script i posted myself. I got it on the XYplorer forum by someone like you who's an expert on scripting. I am absolutely ignorant when it comes to scripts. I know how to insert input and output, and that's how far i go at this moment. All i know is, the script works in XYplorer and doesn't work (yet) in Opus13. If you could adjust the script for Opus, you're very welcome. And if you have any websites for me where i could learn to write scripts, that would be great. Thanks
The approach I suggested and the XYplorer script will have the same results. Using values like @errante proposed could yield something different. Just try it out.
Opus uses JScript, so any site that teaches JavaScript will be useful. But when it comes to scripts for Opus, look no further, you have already found the right place.
I am very sorry for my impatiance and rudeness. Due to some unfortunate incidents (in my family), I lost the crucial rule: Being nice to another, certainly to people who help me in there free time. I am truly sorry and very glad that i didn't deinstall the DO app, because as I always said: It's a great app. I want to learn the scripting languages, but i don't have a lot of time for that because of my work.
Greetings
Bartpet (NL)