Possible not to lock files?

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
metal450
Blank Cone
Blank Cone
Posts: 23
Joined: 14 Nov 2014 08:20

Possible not to lock files?

Postby metal450 » 14 Nov 2014 10:44

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)

metal450
Blank Cone
Blank Cone
Posts: 23
Joined: 14 Nov 2014 08:20

Re: Possible not to lock files?

Postby metal450 » 17 Dec 2014 11:16

...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

dj86ns
New Cone
New Cone
Posts: 1
Joined: 12 Mar 2015 20:06

Re: Possible not to lock files?

Postby dj86ns » 12 Mar 2015 20:13

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. :(

metal450
Blank Cone
Blank Cone
Posts: 23
Joined: 14 Nov 2014 08:20

Re: Possible not to lock files?

Postby metal450 » 07 Nov 2015 06:01

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 :(

Jito463
Blank Cone
Blank Cone
Posts: 15
Joined: 24 Jul 2010 02:09

Re: Possible not to lock files?

Postby Jito463 » 07 Nov 2015 17:20

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.

metal450
Blank Cone
Blank Cone
Posts: 23
Joined: 14 Nov 2014 08:20

Re: Possible not to lock files?

Postby metal450 » 07 Nov 2015 19:08

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.

Jito463
Blank Cone
Blank Cone
Posts: 15
Joined: 24 Jul 2010 02:09

Re: Possible not to lock files?

Postby Jito463 » 07 Nov 2015 19:56

Perhaps it loads it in segments, sort of a buffering function.

metal450
Blank Cone
Blank Cone
Posts: 23
Joined: 14 Nov 2014 08:20

Re: Possible not to lock files?

Postby metal450 » 07 Nov 2015 19:59

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.

Jito463
Blank Cone
Blank Cone
Posts: 15
Joined: 24 Jul 2010 02:09

Re: Possible not to lock files?

Postby Jito463 » 07 Nov 2015 20:14

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.

metal450
Blank Cone
Blank Cone
Posts: 23
Joined: 14 Nov 2014 08:20

Re: Possible not to lock files?

Postby metal450 » 07 Nov 2015 20:32

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"...

Jito463
Blank Cone
Blank Cone
Posts: 15
Joined: 24 Jul 2010 02:09

Re: Possible not to lock files?

Postby Jito463 » 07 Nov 2015 20:36

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.

metal450
Blank Cone
Blank Cone
Posts: 23
Joined: 14 Nov 2014 08:20

Re: Possible not to lock files?

Postby metal450 » 08 Nov 2015 11:46

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.

Jito463
Blank Cone
Blank Cone
Posts: 15
Joined: 24 Jul 2010 02:09

Re: Possible not to lock files?

Postby Jito463 » 09 Nov 2015 16:59

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).

metal450
Blank Cone
Blank Cone
Posts: 23
Joined: 14 Nov 2014 08:20

Re: Possible not to lock files?

Postby metal450 » 09 Nov 2015 18:13

It isn't Microsoft - it's a Synology NAS.

aitte
Cone that earned his stripes
Cone that earned his stripes
Posts: 310
Joined: 28 Feb 2012 00:26

Re: Possible not to lock files?

Postby aitte » 23 Mar 2017 02:48

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?

Rémi Denis-Courmont
Developer
Developer
Posts: 15135
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Possible not to lock files?

Postby Rémi Denis-Courmont » 25 Mar 2017 12:14

The only way to change the behaviour of the VLC process is to change the source code and recompile.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

metal450
Blank Cone
Blank Cone
Posts: 23
Joined: 14 Nov 2014 08:20

Re: Possible not to lock files?

Postby metal450 » 12 Feb 2018 21:37

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! :)


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: BellUomo and 30 guests