Good morning Leo.. o)
Regarding the SetAttr command, I actually cannot remember, but I think it also does not matter because if you "work around" SetAttr, the locking problem is not solved at all. I will run "ffmpeg.exe" tomorrow and up with a problematic lock anyway, right? I just wanted to "enrich" the problem situation with some more examples.. o)
You or DO is not making the change, that is correct, that's why I think the preview pane should not lock files in general and by any means. There are hundreds of external programs tied into DO, it will never know what an external program will do exactly with a file, so the file needs to "free" - always.
If I use some 3rd party preview handler which is locking the files, it's my fault I use that, but locked files with your own module is really not appropriate. It spoils the whole preview pane, makes it a love and (slowly growing o) hate relationship.
The DO preview is not a generic media player, which probably does not expect me to modify a file while it is playing. The DO preview is different, it should expect me to change the file with first priority, because I am in Directory Opus - a tool to manage and manipulate files and their meta data.
Can the media playback not just init, extract a frame and the duration, show this frame and information (along with the play/pause buttons) and then release the file again? I could live with a second or two until I can modify a video file.
For audio files this should be even quicker. Media files also don't end up being locked, if I use "duration" or some other information in a column, so why would the preview lock them?
I like the playback in the preview and the available settings in v13, this all feels and looks efficient and non-bloated, but the locking problem is.. it drives me nuts. o)
And to be fair, I did not yet explore the suggestions from above to try and install different codec packs, I actually don't want to or feel the need for them (the splitter(s), LAV, codec, filters and stuff, it is kind of "over my head" and I already spent too much time in my life with codec settings, I really did).
I also don't yet see the technical relation between using a different codec and why this would cure the problem. Is the actual "locking" problem not within the DO playback, is it because Microsofts original codec behaves bad and you already did everything possible to prevent the locking?
Thanks in advance for taking the time.. o)