Handbrake filling up C drive while scanning files

HandBrake for Windows support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
ARandomPerson
Posts: 4
Joined: Sun Sep 22, 2019 6:56 am

Handbrake filling up C drive while scanning files

Post by ARandomPerson »

Description of problem or question:

I have around 900 files which I'm going to convert to HEVC, and I have around 15 gigabytes on my C drive, where Handbrake is installed. Or I DID, before I tried to scan (scan, not render) the files. The simple act of pasting my files into Handbrake ate 10 gigs of my hard drive. I know it's Handbrake because I checked the space before inserting the files, then after a few minutes I checked again and it was far lower. The strange thing is, I then clicked cancel and got all of my hard drive space back. However, I then tried a second time and handbrake closed/crashed before it was done, and after that (despite taking steps like starting Handbrake back up) I couldn't get my space back.


Steps to reproduce the problem (If Applicable):

Scan a large number of large files, and see if your hard drive space decreases by any significant amount.


HandBrake version (e.g., 1.0.0):

1.2.2


Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):

Windows 10 (Whatever the latest update is, I updated a few days ago)


HandBrake Activity Log ***required*** (see How-to get an activity log)

Code: Select all

Since the program crashes before I load all the files I can't get a proper log, however this is the log it produced from scanning the first file of the folder:

HandBrake 1.1.2 (2018090500) - 64bit
OS: Microsoft Windows NT 10.0.18362.0 - 64bit
CPU: Intel(R) Core(TM) i5-8600K CPU @ 3.60GHz
Ram: 16329 MB, 
GPU Information:
  NVIDIA GeForce GTX 1070 Ti - 26.21.14.3160
Screen: 1920x1080
Temp Dir: C:\Users\GGPC\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\GGPC\AppData\Roaming\HandBrake

-------------------------------------------

[19:02:49] hb_init: starting libhb thread

 # Starting Scan ...

[19:02:49] CPU: Intel(R) Core(TM) i5-8600K CPU @ 3.60GHz
[19:02:49]  - Intel microarchitecture Kaby Lake
[19:02:49]  - logical processor count: 6
[19:02:49] Intel Quick Sync Video support: no
[19:02:49] hb_scan: path=thepathgoesherebutitsaweirdfoldername, title_index=0
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image thepathgoesherebutitsaweirdfoldername\War Thunder 2019.03.08 - 21.44.03.34.mp4
src/libbluray/disc/disc.c:424: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:424: error opening file BDMV\BACKUP\index.bdmv
[19:02:49] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.0
libdvdread: Encrypted DVD support unavailable.
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[19:02:49] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'thepathgoesherebutitsaweirdfoldername\War Thunder 2019.03.08 - 21.44.03.34.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2019-03-08 08:59:22
    date            : 2019
  Duration: 00:15:18.71, start: 0.000000, bitrate: 16000 kb/s
    Stream #0:0(und): Video: h264 (High) [avc1 / 0x31637661]
      yuv420p, tv, smpte170m/smpte170m/bt470m
      1920x1080 [PAR 1:1 DAR 16:9], 15798 kb/s, PAR 65536:65536 DAR 16:9
      60 fps, 90k tbn (default)
    Metadata:
      creation_time   : 2019-03-08 08:59:22
      handler_name    : VideoHandle
    Stream #0:1(und): Audio: aac (LC) [mp4a / 0x6134706D]
      48000 Hz, stereo, fltp, 195 kb/s (default)
    Metadata:
      creation_time   : 2019-03-08 08:59:22
      handler_name    : SoundHandle
[19:02:49] scan: decoding previews for title 1
[19:02:49] scan: audio 0x1: aac, rate=48000Hz, bitrate=195356 Unknown (AAC) (2.0 ch)
[19:02:50] scan: 10 previews, 1920x1080, 60.000 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[19:02:50] scan: supported video decoders: avcodec qsv
[19:02:50] libhb: scan thread found 1 valid title(s)

 # Processing Scan Information ...


 # Scan Finished ...
User avatar
s55
HandBrake Team
Posts: 10357
Joined: Sun Dec 24, 2006 1:05 pm

Re: Handbrake filling up C drive while scanning files

Post by s55 »

HandBrake uses the Windows TEMP folder to cache preview data, which, given it's uncompressed can use the levels of storage your talking about quite easily.

Assuming it doesn't crash, or something else on the system gets a file handle to those files (AV software for example), they will be cleared up automatically on changing source.

If there is a crash, the only way to remove them easily is to clear the temp folder in windows. (running Windows disk cleanup should do the trick)


If you want to override the TEMP directory HandBrake uses, there area couple of things you can do:

1. Change your system TEMP / TMP variables to point at another drive.
2. Create a batch file and set either of those variables before launching HandBrake.exe from Program files. (Effectively, making a new shortcut that overrides for just HandBrake)
3. Use the "Portable" version of HandBrake instead. Extract it to a location you have write privileges in and setup the included portable.ini file to tel HandBrake where to store it's assets.
mduell
Veteran User
Posts: 8198
Joined: Sat Apr 21, 2007 8:54 pm

Re: Handbrake filling up C drive while scanning files

Post by mduell »

HandBrake version (e.g., 1.0.0):

1.2.2
Yea nope:

Code: Select all

HandBrake 1.1.2 (2018090500) - 64bit
ARandomPerson
Posts: 4
Joined: Sun Sep 22, 2019 6:56 am

Re: Handbrake filling up C drive while scanning files

Post by ARandomPerson »

mduell wrote: Sun Sep 22, 2019 7:32 pm
HandBrake version (e.g., 1.0.0):

1.2.2
Yea nope:

Code: Select all

HandBrake 1.1.2 (2018090500) - 64bit
Sorry about that, I was indeed running 1.1.2. After this I tried reinstalling 1.2.2 to my D drive, and the problem didn't seem to happen on the D drive, confirming that Temp folder theory mentioned earlier. I did try Windows Disk cleanup, and it said I had 0 bytes in my Temp folder, which seems unlikely. Thanks for your help tho guys.
ARandomPerson
Posts: 4
Joined: Sun Sep 22, 2019 6:56 am

Re: Handbrake filling up C drive while scanning files

Post by ARandomPerson »

Ah there we are, I just tried scanning my temp folder again with the new, Windows 10 themed settings - 40 gigs!

...But most is undeletable. At this point this is more about Windows than Handbrake, I'll try and find a way to delete these Temp files.
ARandomPerson
Posts: 4
Joined: Sun Sep 22, 2019 6:56 am

Re: Handbrake filling up C drive while scanning files

Post by ARandomPerson »

Sorry to constantly update this thread, but: Success. I went to C:\Users\[my name]\AppData\Local\Temp, selected them all, pressed delete, then skipped any that were still open. Do make sure to clear your recycle bin after this, as often the recycle bin will be stored in C:\ and thus will defeat the point of deleting files. Hope this helps someone.
Post Reply