Page 1 of 1
Possible not to lock files?
Posted: 14 Nov 2014 10:44
by metal450
With Windows Media Player, I am able to rename files in Explorer while it's playing; with VLC, I am not (Explorer says the action cannot be completed because the file is open). I'm not sure how WMP is even able to continue allow the files to be manipulated while they're open in this way - but it's *EXTREMELY* handy, for while I'm organizing my videos (i.e. I open one, and can form the filename as I view it, revising as needed). With VLC, I have to open the file, determine the name, close it, type the name, reopen the file to continue viewing.
Is it at all possible to make VLC behave like WMP in this regard...?
(I'm on Windows 7, using WMP 12)
Re: Possible not to lock files?
Posted: 17 Dec 2014 11:16
by metal450
...Really, nobody has *any* idea how WMP might be able to allow renaming of videos while they play but VLC can't?
Here's a screengrab as evidence of what I mean:
http://screencast.com/t/apIEArrzU
Re: Possible not to lock files?
Posted: 12 Mar 2015 20:13
by dj86ns
Hi. I am too interested in implementing that Windows Media Player feature in VLC. Have you found out how WMP keeps file unlocked while playing it? I am searching for that answer on the internet for days now without success.
Re: Possible not to lock files?
Posted: 07 Nov 2015 06:01
by metal450
I am too interested in implementing that Windows Media Player feature in VLC. Have you found out how WMP keeps file unlocked while playing it? I am searching for that answer on the internet for days now without success.
If you do figure it out, please let me know. Since it's been a full year & nobody's responded here, I'm not really holding my breath for an answer from the VLC folks anymore
Re: Possible not to lock files?
Posted: 07 Nov 2015 17:20
by Jito463
While I don't know what the answer is for certain, my educated guess would be that WMP probably loads the file into memory, then leaves the original file alone afterwards. That's the only way I can see that this would be possible.
Re: Possible not to lock files?
Posted: 07 Nov 2015 19:08
by metal450
While I don't know what the answer is for certain, my educated guess would be that WMP probably loads the file into memory, then leaves the original file alone afterwards. That's the only way I can see that this would be possible.
I really don't think that's it; it couldn't possibly load the entire video file into memory all at once prior to playing, as that would take an enormous amount of both time and memory. If you open a ~10gig file (even from, say, a remote network share over wifi), it begins playing nearly instantly (and remains renamable throughout). "Loading the file into memory" would mean that it would've had to download all 10gigs of data over the network and into memory in that ~0.5sec. And would mean that a system with less than 10gigs memory shouldn't be able to play the file, which is obviously not the case.
Re: Possible not to lock files?
Posted: 07 Nov 2015 19:56
by Jito463
Perhaps it loads it in segments, sort of a buffering function.
Re: Possible not to lock files?
Posted: 07 Nov 2015 19:59
by metal450
Right, of course. But again - that doesn't explain how you can immediately rename (or even delete) the source file, and it will still play through to the very end.
Re: Possible not to lock files?
Posted: 07 Nov 2015 20:14
by Jito463
Well, if you delete it and it still plays, then the only possibility is my first suggestion, that it loads the entire file into memory. I can't speak to your hypothetical, just using logical reasoning and deduction. It has to get the data from somewhere. Sorry that I don't have a definitive answer, just hypothesizing.
Re: Possible not to lock files?
Posted: 07 Nov 2015 20:32
by metal450
Well, if you delete it and it still plays, then the only possibility is my first suggestion, that it loads the entire file into memory.
That really isn't the only possibility, because again, it can't possibly be downloading 10 gigs of data over a wifi connection in a fraction of a second (to a system that has less than 10gigs of RAM, with paging turned off). And yet, I can open a 10 gig file on a shared network server in WMP, it begins playing nearly instantly, and I can 'delete' it without affecting my ability to seek to the end. Thus, something more complicated *has* to be going on under the hood than just "loading it all into memory"...
Re: Possible not to lock files?
Posted: 07 Nov 2015 20:36
by Jito463
Actually, I did just consider one other possibility. WMP may be tracking the file based on it's physical location on the HDD, not on the name/directory structure. Even if you delete it, the file is still there until it's overwritten by other data. And if you rename it, the file is still in the same physical location on the disk. Ergo, no matter where you move it to, or what you rename it to or even if you delete it, the file would still be accessible.
Re: Possible not to lock files?
Posted: 08 Nov 2015 11:46
by metal450
WMP may be tracking the file based on it's physical location on the HDD, not on the name/directory structure. Even if you delete it, the file is still there until it's overwritten by other data. And if you rename it, the file is still in the same physical location on the disk.
It works on network drives too though.
Re: Possible not to lock files?
Posted: 09 Nov 2015 16:59
by Jito463
Even as a network share, it still has to access the physical drive to get the data. I'm curious to know if the same would hold true, if the network shared OS wasn't an MS one (e.g. Linux or MacOS).
Re: Possible not to lock files?
Posted: 09 Nov 2015 18:13
by metal450
It isn't Microsoft - it's a Synology NAS.
Re: Possible not to lock files?
Posted: 23 Mar 2017 02:48
by aitte
This is still an issue - e.g. I am downloading a movie using Opera browser (.opdownload) and watching the movie with VLC. When the download finishes, Opera tries to rename the file (remove the temporary .opdownload extension), but the file is locked by VLC, so it fails and Opera starts the download all over again.
Any idea how to make VLC not to lock the file?
Re: Possible not to lock files?
Posted: 25 Mar 2017 12:14
by RĂ©mi Denis-Courmont
The only way to change the behaviour of the VLC process is to change the source code and recompile.
Re: Possible not to lock files?
Posted: 12 Feb 2018 21:37
by metal450
Since this hasn't gotten much attention since I posted it >3 years ago, I posted this as a suggestion on the Trac (
https://trac.videolan.org/vlc/ticket/19700#ticket). Fingers crossed!