Page 1 of 1

Cannot delete .mkv file

Posted: Tue Feb 05, 2008 2:04 pm
by pjs
I compressed a de-crypted dvd using H.264 and AC3 passthrough and the mkv container. I read elswhere on this site that the output file plays better if run through mkvmerge to add cues, so I did this. The result worked fine. As I no longer needed the initial mkv file that Handbrake had produced I tried to delete it. I received an error message saying that the file could not be deleted because it was in use by another program. As far as I could see nothing was using the file so I re-booted the pc and tried again to delete the file, but with the same result. Windows task manager said there were no apps running so I started closing processes and eventually managed to send the file to the recycle bin. Even then I could not get rid of it: when I tried to empty the recycle bin I received another error message saying the file was (still) in use. I eventually got rid of it, but only after closing down most of the running processes on my pc. In case this was some isolated bug I repeated the exercise with the same result. This is a really great piece of software, but I don't want to fill up my hard drive with files I can't remove! Any ideas?

Environment: windows
HB Version: 0.9.1
Started with Preset: normal
Then I changed:
Destination file type to mkv
Audio encoder to AC3
Turbo 1st pass unchecked
Architecture: Intel Core2Duo
Computer Info: 2.93GHz, 4Gb RAM, 100Gb HardDrive Space Left
Operating System: XP (SP2)
Intended Player/Device: Windows Media Centre
Intended viewing environment: HD Projector

Re: Cannot delete .mkv file

Posted: Tue Feb 05, 2008 5:34 pm
by s55
This is nothing to do with HandBrake. Its a windows issue.

Re: Cannot delete .mkv file

Posted: Tue Feb 05, 2008 6:08 pm
by pjs
I initially thought the same. However I ran the same test twice and on both occasions Handbrake created an mkv file that Windows could not delete. Also, on both occasions the subsequent mkvmerge file deleted with no problem.

Re: Cannot delete .mkv file

Posted: Tue Feb 05, 2008 6:17 pm
by s55
You've already ruled handbrake out by rebooting the system. It can't keep a lock on the file if its not open.

Re: Cannot delete .mkv file

Posted: Tue Feb 05, 2008 6:48 pm
by pjs
I don't see how any application (including Handbrake) can lock a file immediately following a re-boot. Nonetheless, the mkv file produced by Handbrake shows exactly this behaviour in my system, whilst the mkv file produced by mkvmerge deletes immediately and with no problem. If there is no solution I'll use the mp4 container with AAC instead. I chose mkv because I wanted AC3 passthrough, and I had a different set of (video) problems when I tried AC3 with AVI.

Re: Cannot delete .mkv file

Posted: Tue Feb 05, 2008 9:56 pm
by Lant
If you want to unlock the file, try using http://ccollomb.free.fr/unlocker/

Re: Cannot delete .mkv file

Posted: Tue Feb 05, 2008 11:12 pm
by pjs
Thanks for that. It looks a useful utility - I'll give it a try.

Re: Cannot delete .mkv file

Posted: Sun Feb 10, 2008 11:42 am
by pjs
I have now tried the unlocker utility http://ccollomb.free.fr/unlocker/ and it does solve the problem.