Since no one has come up with solution to create custom thumbnails for video files, I thought alternative ways to handle the issue. I have movie file and image file, with same name but of course different extension, ie. movie.avi and movie.jpg. I set filter to show only jpg-files, so I see only thumbnails I have created myself.
So the question: Is there any way to script a button that grabs selected filename (movie.jpg), and then finds if there are any other files with the same name but different extension, and if found, launch it. In this case, it will be that actual movie file (movie.avi) instead of just launching selected jpg? That'll be great alternative until we have custom movie thumbnail option in DO.
If the movies always have the same extension (.avi) then it should be fairly easy to do.
If they have various different extensions (.avi, .mpg, . mp4, etc.) then it's do-able, but I think would require either some (fairly simple) VBScript or similar, or instead creating lots of different filetypes/events for each format. (Scripting is probably cleaner and easier to extend for more file extensions.)
e.g. You could create a ".moviethumb" or .mth or something extension and rename the thumbnails to that. Opus will still show them as images as it can recognise JPG and PNG images regardless of their extensions. You could then set the double-click action on those files to run a VBScript (or language of choice) which takes the filename and then looks for things with the same name and different extensions.
But if the extension is always .avi then you don't even need the VBScript as Opus has built-in ways of saying "same name with a different extension" (you just have to know the extension in advance).
I started googling around and I have created my first vbscript. Script just list files in given path and stops when it finds same filename but different extension, and then lauch it. Script expects 3-chars long filename extension (so .jpeg won't work).
I created a button, rather than new filetypes as you suggested, which was nice idea though! Maybe trying that later.
Button function:
openmovie.vbs {sourcepath} {file}
openmovie.vbs:
Sub Run(ByVal sRun)
Dim shell
Set shell = CreateObject("WScript.Shell")
shell.Run Chr(34) & sRun & Chr(34), 1, false
Set shell = Nothing
End Sub
On Error Resume Next
Dim fso, folder, files, NewsFile, sFolder, sFile
Set fso = CreateObject("Scripting.FileSystemObject")
sFolder = Wscript.Arguments.Item(0)
sFile = Wscript.Arguments.Item(1)
Set folder = fso.GetFolder(sFolder)
Set files = folder.Files
For each folderIdx In files
If Left(folderIdx.Name, Len(folderIdx.Name) - 4) = Left(sFile, Len(sFile) - 4) And Right(folderIdx.Name, 4) <> Right(sFile, 4) Then
Run sFolder&folderIdx.Name
Wscript.Quit
End If
Next
Anyway, script works like a charm, now I am able to start movie by just selecting corresponding jpg-file and clicking button (or maybe hot-key).
So thanks for tips leo
If you are in a big directory, listing all the files in it might be slow (although probably not if Opus just read the dir, which would cause the filesystem to cache it), so it might be quicker to check for the existence of the possible filenames using a list of extensions... But only if you find the script slow, of course. It might work perfectly already, in which case it doesn't matter.