VideoHelp Forum
+ Reply to Thread
Results 1 to 9 of 9
Thread
  1. Member
    Join Date
    Apr 2007
    Location
    Canada
    Search Comp PM
    Hello,
    I try to make a huge slideshow of around 1000 photos and videos to burn on a DVD.
    I use the great tool "DVD Slideshow GUI" to create the slideshow, then I export it to an AVS file.
    The AVS file is quite big (1268 Ko). When I try to open it (via VirtualDubMod or Quenc), then I have an avisynth error about insufficient memory.
    I could make 3 or 4 slideshows and avs files, encoding them then joining the mpeg files.
    But is there another way to bypass insufficient memory with Avisynth ?
    Is it possible to split an avs file ?
    Thank you for your help!
    Quote Quote  
  2. Member Soopafresh's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    That's a lot of pics, but you can try adding the following to the top of your AVS script:

    SetMemoryMax(512)


    or whatever # is 1/2 the amount of your installed RAM
    Quote Quote  
  3. Member
    Join Date
    Apr 2007
    Location
    Canada
    Search Comp PM
    Hello Soopafresh,
    Thank you for your response.
    I tried SetMemoryMax, but the same error occured...
    I opened the task manager and I have seen that there is a bigger and bigger exchange file that is created when the avs file is loaded in VirtualDubMod. At one time, the exception is raised.
    I have set the exchange file to the maximum allowed by Windows (4096 Mo), but the error raised at around 1.9 Go of the exchange file.
    So I have a problem of virtual memory, even if it is set to max.
    Any other hint/workaround ?
    Thank you!
    Quote Quote  
  4. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Post an extract from the beginning of your AVS file.
    That may suggest the problem and hopefully solution.
    Quote Quote  
  5. Member
    Join Date
    Apr 2007
    Location
    Canada
    Search Comp PM
    Here it is
    If you want, I have attached the avs file that is generated (1Mo)

    SetMemoryMax(256)
    # Script gererated by DVD slideshow GUI
    loadplugin("C:\Program Files\DVD slideshow GUI\Transitions\TransAll.dll")
    loadplugin("C:\Program Files\DVD slideshow GUI\bin\vsfilter.dll" )
    loadplugin("C:\Program Files\DVD slideshow GUI\bin\zoom.dll")

    # Definitions:
    SafeH = 400
    SafeW = 720
    overimg=blankclip()
    SafeAviH = multifour(400) # resizing avis within width and height
    SafeAviW = multifour(720)

    # Import of background image - the proportions of this will be the proportions of the final film.
    bname = "background_golden.jpg"
    SafebH = 400 # resizing background within width and height
    SafebW = 720
    rate = 30
    bname = LanczosResize(imagesource(bname,1,1,rate),SafeBW,s afeBH)
    a = bname
    at = bname
    b = bname
    bt = bname

    # Import of audiotrack to be faded out with last still
    audiotrack = DirectShowSource("D:\Mp3\music.mp3", fps=30).eqaudio()
    am = bname
    am = loop(am,int(30*(audiotrack.AudioLengthF/audiotrack.AudioRate)))
    music = AudioDub(am,audiotrack)
    imgout=ImageSource("D:\Martinique\Martinique_avs_t emp_files\Martinique_avs%06d.ebmp", 0,1065, rate)
    SafeH = 400
    SafeW = 720

    # The filename and location of the exported ssa file with subtitle values for each text.
    ssa = ""
    writefilestart(blankclip(),"C:\Program Files\DVD slideshow GUI\DVDsGUItemp"+".ssa","ssa",append = false)
    ssafile = "C:\Program Files\DVD slideshow GUI\DVDsGUItemp_subtitles.ssa"
    ssa = ssa + "[Script Info]"+ chr(10)
    ssa = ssa + "ScriptType: v4.00+"+ chr(10)
    ssa = ssa + "Collisions: Normal"+ chr(10)
    ssa = ssa + "PlayResX: 384"+ chr(10)
    ssa = ssa + "PlayResY: 180"+ chr(10)
    ssa = ssa + "Timer: 100.0000"+ chr(10)
    ssa = ssa + chr(10)
    ssa = ssa + "[V4+ Styles]"
    writefilestart(BlankClip(),"C:\Program Files\DVD slideshow GUI\DVDsGUItemp"+".ssa","ssa",append = true)
    ssa = ""
    ssa = ssa + "Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, "
    ssa = ssa + "Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding"
    writefilestart(BlankClip(),"C:\Program Files\DVD slideshow GUI\DVDsGUItemp"+".ssa","ssa",append = true)
    ssa = ""
    ssa = ssa + "Style: Default,Times New Roman,20,&H00FFFFFF,&H0000FFFF,&H00000000,&H000000 00,0,0,0,0,50,50,0,0.00,1,2,0,2,20,20,20,1"
    writefilestart(BlankClip(),"C:\Program Files\DVD slideshow GUI\DVDsGUItemp"+".ssa","ssa",append = true)
    ssa = ""+ chr(10)
    ssa = ssa + "[Events]"+ chr(10)
    ssa = ssa + "Format: Layer, Start, End, Style, Actor, MarginL, MarginR, MarginV, Effect, Text"+ chr(10)
    writefilestart(BlankClip(),"C:\Program Files\DVD slideshow GUI\DVDsGUItemp"+".ssa","ssa",append = true)
    ssa = ""

    # PROGRAM
    inpoint = 1

    a = DirectShowSource("D:\Martinique\NTSC/20011231190026.avi").converttoyv12().AddBorders(10 , 10, 10, 10, $FFFFFF).eqaudio()
    awav = DirectShowSource("D:\Martinique\NTSC/20011231190026.avi", fps = 30).eqaudio()
    aviname = SafeSize(LanczosResize(a,Width(a)*1,height(a)*1),S afeAviW.multifour,safeAviH.multifour,rate)
    backname = loop(bname,a.framecount)
    a = converttoyv12(AddBack(aviname,backname,1).Has169() )
    at = trim(a, a.framecount-1, a.framecount)
    at = loop(at,25)
    awav = awav.HasAudio() ? awav : audiodub(a,BlankClip(length=a.framecount, fps = rate, audio_rate=48000, stereo = true))
    a = audiodub(a,awav).eqaudio()
    at = audiodub(at,BlankClip(length=at.framecount, fps = rate, audio_rate=48000, stereo = true))
    inpoint = a.framecount+at.framecount
    outpoint = a.framecount+at.framecount

    b = DirectShowSource("D:\Martinique\NTSC/20011231190026_jobcontrol.avi").converttoyv12().eq audio().AddBorders(10, 10, 10, 10, $FFFFFF)
    bwav = DirectShowSource("D:\Martinique\NTSC/20011231190026_jobcontrol.avi", fps = 30)
    aviname = SafeSize(LanczosResize(b,Width(b)*1,height(b)*1),S afeAviW,safeAviH,rate)
    backname = loop(bname,b.framecount)
    b = converttoyv12(AddBack(aviname,backname,1).Has169() )
    bt = trim(b, 0, -1)
    bt = loop(bt,25)
    bt = audiodub(bt,BlankClip(length=bt.framecount, fps = rate, audio_rate=48000, stereo = true))
    bt = audiodub(bt,BlankClip(length=bt.framecount, fps = rate, audio_rate=48000, stereo = true))
    bwav = bwav.HasAudio() ? bwav : audiodub(b,BlankClip(length=b.framecount, fps = rate, audio_rate=48000, stereo = true))
    b = audiodub(b,bwav).eqaudio()
    c = converttoyv12(Dissolve(at,bt,25))
    c = audiodub(c,BlankClip(length=c.framecount, fps = rate, audio_rate=48000, stereo = true))
    d = a + c



    d = pointchk(inpoint, outpoint) ? d : d.trim(0,inpoint)+audiodub(d.trim(inpoint,outpoint ),fadeout2(audiodub(d.trim(inpoint,outpoint),music .trim(inpoint,outpoint).fadein2(at.framecount)),at .framecount))
    a = DirectShowSource("D:\Martinique\NTSC/20011231190026_jobcontrol.avi").converttoyv12().eq audio().AddBorders(10, 10, 10, 10, $FFFFFF)
    alength = a.framecount
    awav = DirectShowSource("D:\Martinique\NTSC/20011231190026_jobcontrol.avi", fps = 30).eqaudio()
    aviname = SafeSize(LanczosResize(a,Width(a)*1,height(a)*1),S afeAviW,safeAviH,rate)
    backname = loop(bname,a.framecount)
    a = converttoyv12(AddBack(aviname,backname,1).Has169() )
    at = trim(a, a.framecount-1, a.framecount)
    awav = awav.HasAudio() ? awav : audiodub(a,BlankClip(length=a.framecount, fps = rate, audio_rate=48000, stereo = true))
    a = audiodub(a,awav).eqaudio()
    a = trim(a,0,alength)
    at = loop(at,25)
    at = audiodub(at,BlankClip(length=at.framecount, fps = rate, audio_rate=48000, stereo = true))
    inpoint = d.framecount+a.framecount


    martinique_avs_directshowsource.avs
    Quote Quote  
  6. Member Soopafresh's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    EDIT: I just tried this app on 250 images - It used 560MB. I'm assuming you have 512MB of total RAM in your machine? Fuggedaboutit....
    Quote Quote  
  7. There has been talk of improving the memory handeling of avisynth. I hope they will succed with that. Until that happens I'll suggest that you export as mpg in smaller parts and then use something like MediaJoin, to join the files into one.
    Quote Quote  
  8. I had this problem too with high resolution photos.

    Before running my avs script, I just resize all my photos with a height of 600 pixels and all was fine, 500 is ok for ntsc

    It seems that avisynth is converting a jpeg to bmp in memory so a 6 megapixles photo takes a lot of memory.
    Quote Quote  
  9. Member
    Join Date
    Oct 2011
    Location
    argentina
    Search Comp PM
    Faced same problem, solution was adding at script begin:

    SetMemoryMax(192)

    Avisynth get 1/4 of total mem leaving little for processing, limiting it frees for the rest of the filters, etc, specially if using x32 windows were max usage mem per process is 2gb.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!