Need a way for HB to not run out of RAM

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
bradsm87
Posts: 14
Joined: Wed Dec 23, 2009 7:39 am

Need a way for HB to not run out of RAM

Post by bradsm87 »

I'm using the latest nightly build and it's great for letterboxed 2.35:1 1080p content that I then crop the black off and it's GREAT but the Windows 2GB process limit doesn't enable me to encode a full screen 1080p movie as I get the good old "HandbrakeCLI.exe stopped working" and go to the log and see "out of memory". I have 4GB of RAM running Windows 7 32-bit with ALL the crap turned off. There is always heaps of RAM available when encoding and handbrake sits on about 1.7GB. Obviously RAM usage goes up and down a bit and as soon as it goes up too high, it's all over.

I can get the encodes done using rc-lookahead=50 (prefer 80), reduce trellis to 1 (preferred 2), subme to 9 (prefer 10), reference frames to 5 instead of 6 and b-frames to 10 instead of 12.

There is a lot of HD getting around now and I really wish I had a Mac fast enough to encode because I'd be right then.

Is there any news on a 64-bit Handbrake for Windows? If not, is there another way around this memory limit or a way to make handbrake use less RAM?

Cheers

User avatar
Rodeo
HandBrake Team
Posts: 12511
Joined: Tue Mar 03, 2009 8:55 pm

Re: Need a way for HB to not run out of RAM

Post by Rodeo »

Are you using the nightlies?

Edit: I fail at reading, you're indeed using the nightly.

RonJohn
Regular User
Posts: 54
Joined: Thu Jul 08, 2010 12:27 pm

Re: Need a way for HB to not run out of RAM

Post by RonJohn »

bradsm87 wrote:I have 4GB of RAM running Windows 7 32-bit with ALL the crap turned off. There is always heaps of RAM available when encoding and handbrake sits on about 1.7GB. Obviously RAM usage goes up and down a bit and as soon as it goes up too high, it's all over.
It would be interesting to boot using a 64-bit Ubuntu Live DVD. If HB is on the DVD, then Bob's Your Uncle!!!

http://www.ubuntu.com/desktop/get-ubunt ... wnload#dvd
http://mirror.mcs.anl.gov/pub/ubuntu-is ... 4/release/

bradsm87
Posts: 14
Joined: Wed Dec 23, 2009 7:39 am

Re: Need a way for HB to not run out of RAM

Post by bradsm87 »

That's a good idea and would work.

I'd have to change my sata controller to IDE mode as I don't think the live cd would boot in AHCI mode. I'd also be unplugging all my RAID drives as I don't trust them with ANYTHING.

Obviously I'd prefer a Windows solution but live cd is an option. Cheers.

RonJohn
Regular User
Posts: 54
Joined: Thu Jul 08, 2010 12:27 pm

Re: Need a way for HB to not run out of RAM

Post by RonJohn »

bradsm87 wrote:That's a good idea and would work.

I'd have to change my sata controller to IDE mode as I don't think the live cd would boot in AHCI mode.
:roll: AHCI has been in the Linux kernel for *ages*...
bradsm87 wrote:I'd also be unplugging all my RAID drives as I don't trust them with ANYTHING.
If they are "Windows RAID" then you almost certainly have a point.

Note, though, that Live CDs (and, by extension, DVDs) are completely non-destructive, so if it can't recognize your RAID set, it won't even try to mount your RAID set...

Thus, it wouldn't hurt to try, but I can understand and respect your fear.

bradsm87
Posts: 14
Joined: Wed Dec 23, 2009 7:39 am

Re: Need a way for HB to not run out of RAM

Post by bradsm87 »

Sweet will download a live cd next time i need to encode.

It's Intel RAID which I have seen recognised as individual AHCI drives using the wrong driver which is scary :?

bradsm87
Posts: 14
Joined: Wed Dec 23, 2009 7:39 am

Re: Need a way for HB to not run out of RAM

Post by bradsm87 »

Next prob is I just downloaded a Live CD then went to the HB nightly page but they only do nightlies for fedora. Looks like i'll have to DL a fedora live cd.

User avatar
Rodeo
HandBrake Team
Posts: 12511
Joined: Tue Mar 03, 2009 8:55 pm

Re: Need a way for HB to not run out of RAM

Post by Rodeo »


User avatar
s55
HandBrake Team
Posts: 9773
Joined: Sun Dec 24, 2006 1:05 pm

Re: Need a way for HB to not run out of RAM

Post by s55 »

I suppose an activity log is too much to ask for?

bradsm87
Posts: 14
Joined: Wed Dec 23, 2009 7:39 am

Re: Need a way for HB to not run out of RAM

Post by bradsm87 »

I saw the Ubuntu builds about 10 seconds after I posted lol.

I'm not near the computer that I encode with at the moment but take my word, it says out of memory at the end of the log. I checked in Task Manager and it's pretty much right when HandbrakeCLI.exe hits 1.5gb that it crashes. It's like it can't use all the memory available to it.

Also you can set Windows to use up to 3GB RAM per process by entering "BCDedit /set increaseuserva 3072" but the process needs to support it. I'd love to see handbrake fix whatever stops it at 1.5GB as well as supporting the increased 3GB limit.

Cheers,

Brad

User avatar
s55
HandBrake Team
Posts: 9773
Joined: Sun Dec 24, 2006 1:05 pm

Re: Need a way for HB to not run out of RAM

Post by s55 »

I'm not near the computer that I encode with at the moment but take my word, it says out of memory at the end of the log.
I believe you. The log is still useful. The nightlies did a lot to reduce the memory problems we had with 0.9.4. The Log may give a clue as where the problem lies. I wouldn't expect as much ram usage as your seeing, so it's possibility a leak somewhere.

bradsm87
Posts: 14
Joined: Wed Dec 23, 2009 7:39 am

Re: Need a way for HB to not run out of RAM

Post by bradsm87 »

### CLI Query: -i "E:\HD Movies\The Intention of Lying (Blu-ray).mkv" -t 1 -c 1 -o "D:\The Intention of Lying.mkv" -f mkv -w 1920 -l 1036 --crop 22:22:0:0 --modulus 4 -e x264 -q 16.5 -a 1 -E dts -6 auto -R Auto -B auto -D 0.0 -x b-adapt=2:rc-lookahead=80:ref=6:bframes=12:direct=auto:me=umh:subq=9:merange=64:analyse=all:deblock=-1,-1 -v 1
### User Query: False
#########################################
[16:30:17] hb_init: checking cpu count
[16:30:17] hb_init: starting libhb thread
HandBrake svn3428 (2010070501) - MinGW i386 - http://handbrake.fr
8 CPUs detected
Opening E:\HD Movies\The Intention of Lying (Blu-ray).mkv...
[16:30:17] hb_scan: path=E:\HD Movies\The Intention of Lying (Blu-ray).mkv, title_index=1
[16:30:17] scan: trying to open with libdvdread
libdvdnav: Using dvdnav version 4.1.3
libdvdread: Encrypted DVD support unavailable.
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[16:30:17] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska, from 'E:\HD Movies\The Intention of Lying (Blu-ray).mkv':
Duration: 01:39:42.97, start: 0.000000, bitrate: N/A
Stream #0.0(eng): Video: vc1, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 23.98 tbr, 1k tbn, 23.98 tbc
Stream #0.1(eng): Audio: dca, 48000 Hz, 6 channels, s16
[16:30:17] Channels reported by ffmpeg (6) != computed layout channels (2).
[16:30:17] scan: decoding previews for title 1
[16:30:17] scan: audio 0x1: DCA, rate=48000Hz, bitrate=1536000 English (DTS) (5.1 ch)
Scanning title 1...
Scanning title 1...
Scanning title 1...
Scanning title 1...
Scanning title 1...
[16:30:18] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 22/24/0/0, aspect 16:9, PAR 1:1
[16:30:18] scan: title (0) job->width:1936, job->height:1040
[16:30:18] libhb: scan thread found 1 valid title(s)
+ title 1:
+ stream: E:\HD Movies\The Intention of Lying (Blu-ray).mkv
+ angle(s) 0
+ duration: 01:39:42
+ size: 1920x1080, pixel aspect: 1/1, display aspect: 1.78, 23.976 fps
+ autocrop: 22/24/0/0
+ chapters:
+ 1: cells 0->0, 0 blocks, duration 01:39:42
+ audio tracks:
+ 1, English (DTS) (5.1 ch) (iso639-2: eng), 48000Hz, 1536000bps
+ subtitle tracks:
Invalid sample rate 0, using input rate 48000
[16:30:18] 1 job(s) to process
[16:30:18] starting job
[16:30:18] sync: expecting 143471 video frames
[16:30:18] job configuration:
[16:30:18] * source
[16:30:18] + E:\HD Movies\The Intention of Lying (Blu-ray).mkv
[16:30:18] + title 1, chapter(s) 1 to 1
[16:30:18] + container: matroska
[16:30:18] * destination
[16:30:18] + D:\The Intention of Lying.mkv
[16:30:18] + container: Matroska (.mkv)
[16:30:18] * video track
[16:30:18] + decoder: vc1
[16:30:18] + frame rate: same as source (around 23.976 fps)
[16:30:18] + dimensions: 1920 * 1080 -> 1920 * 1036, crop 22/22/0/0
[16:30:18] + encoder: x264
[16:30:18] + options: b-adapt=2:rc-lookahead=80:ref=6:bframes=12:direct=auto:me=umh:subq=9:merange=64:analyse=all:deblock=-1,-1
[16:30:18] + quality: 16.50 (RF)
[16:30:18] * audio track 0
[16:30:18] + decoder: English (DTS) (5.1 ch) (track 1, id 1)
[16:30:18] + bitrate: 1536 kbps, samplerate: 48000 Hz
[16:30:18] + DCA passthrough
[16:30:18] encx264: min-keyint: 24, keyint: 240
[16:30:18] encx264: Encoding at constant RF 16.500000
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
[16:30:18] reader: first SCR 0 id 0 DTS 0
x264 [info]: profile High, level 5.0
[18:03:56] out of memory
[18:03:57] out of memory

Post Reply