Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 28th May 2013, 20:03   #1  |  Link
leoenc
Registered User
 
Join Date: Mar 2007
Posts: 192
Can I write this more efficiently?

Hi

Trying to decode a big ProRes source with 10 mono audio tracks, I'm hitting the 2 GB RAM limit by Avisynth. The script is freezing vdub or ffmbc when the RAM fills to about 1.8 GB.

Can I write the following script more RAM friendly?

Code:
v = FFVideoSource("source.mov",cachefile = "source.mov.ffindex")

a1 = FFAudioSource("source.mov", cachefile = "source.mov.ffindex", track=1)
a2 = FFAudioSource("source.mov", cachefile = "source.mov.ffindex", track=2)
a3 = FFAudioSource("source.mov", cachefile = "source.mov.ffindex", track=3)
a4 = FFAudioSource("source.mov", cachefile = "source.mov.ffindex", track=4)
a5 = FFAudioSource("source.mov", cachefile = "source.mov.ffindex", track=5)
a6 = FFAudioSource("source.mov", cachefile = "source.mov.ffindex", track=6)
a7 = FFAudioSource("source.mov", cachefile = "source.mov.ffindex", track=7)
a8 = FFAudioSource("source.mov", cachefile = "source.mov.ffindex", track=8)
a9 = FFAudioSource("source.mov", cachefile = "source.mov.ffindex", track=9)
a10 = FFAudioSource("source.mov", cachefile = "source.mov.ffindex", track=10)

ch1 = GetChannel(a1, 1)
ch2 = GetChannel(a2, 1)
ch3 = GetChannel(a3, 1)
ch4 = GetChannel(a4, 1)
ch5 = GetChannel(a5, 1)
ch6 = GetChannel(a6, 1)
ch7 = GetChannel(a7, 1)
ch8 = GetChannel(a8, 1)
ch9 = GetChannel(a9, 1)
ch10 = GetChannel(a10, 1)

a = MergeChannels(ch1, ch2, ch3, ch4, ch5, ch6, ch7, ch8, ch9, ch10)

AudioDub(v, a)
leoenc is offline   Reply With Quote
Old 28th May 2013, 20:40   #2  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
If it's just a one-off, have you tried extracting them individually to WAV, then using WAV's as input ?
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 28th May 2013, 21:08   #3  |  Link
SamKook
Registered User
 
Join Date: Mar 2011
Posts: 216
Have you tried patching vdub to enable the LAA flag(there are tools for that)? If you have a 64bit OS, you should be able to use up to 4GB after it's done for 32bit process.

It helps prevent crashes for me when I use memory heavy scripts with vdub.
SamKook is offline   Reply With Quote
Old 29th May 2013, 12:18   #4  |  Link
leoenc
Registered User
 
Join Date: Mar 2007
Posts: 192
Thanks but it's for encoding in ffmbc (I use vdub just to test the script), and it's not a one-off so extracting first to WAVs isn't an option.

Using QTinput instead uses only a fraction of the memory but unfortunately it has other problems.
leoenc is offline   Reply With Quote
Old 29th May 2013, 14:32   #5  |  Link
SamKook
Registered User
 
Join Date: Mar 2011
Posts: 216
It might also help with ffmbc(although I'm not familiar with it) if it doesn't have it set by default. That's a flag that can be set on any 32bit exe, but most people don't when compiling because it's not the default option since I think it could potentially cause problems for people with little RAM(it's been a while since I read the reason so I'm not sure).
With todays 64 bit system though, there's no problem with enabling it.
__________________
AMD Ryzen 9 5950X and EVGA RTX 3080 with G.skill 64Gb 3600 (2 16x2 kit) on Asrock X570 Taichi with Samsung 980 Pro 500Gb NVMe SSD running Win10 x64 on LG 34GN850-B 34.0" 3440 x 1440 160 Hz
SamKook is offline   Reply With Quote
Old 29th May 2013, 15:10   #6  |  Link
leoenc
Registered User
 
Join Date: Mar 2007
Posts: 192
@SamKook

It worked!

I patched ffmbc and that did the trick. For anyone interested - simply Google for 4GB patch.

Thanks a lot!
leoenc is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 22:27.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.