VideoHelp Forum
+ Reply to Thread
Results 1 to 13 of 13
Thread
  1. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Hey guys,

    I have been reading through posts and trying to find a solution for a problem that i have but i couldn't so I registered and am posting a new topic hoping for some help please

    ok so i have this video that i want to overlay on another video in Avisynth, i did this and everything turned out PERFECT:

    a = AviSource("C:\kinky_REXPORTED.avi")
    b = AviSource("C:\privatelogo_ani_640x480.avi")
    c = b.ConvertToRGB32()
    c = c.FadeIn(0)
    c = c.FadeOut(10)
    Overlay(a, c, mode="blend", mask=showalpha(c))

    The video is beeing overlayed and the fadeIn fadeOut works good too, the thing is, how can i choose when the overlay happens, cos the overlay is happening at the beginning of the video, but i would like it to show like at minute 10 or something like that.

    So how can i choose when the overlay happens? is there a function that i can add for example to the Overlay(a, c, mode="blend", mask=showalpha(c)) where i can put the time or the frame?

    i really need this to work i would appreciate any help.

    Thanks
    Quote Quote  
  2. Member Safesurfer's Avatar
    Join Date
    Mar 2004
    Location
    United States
    Search Comp PM
    "Just another sheep boy, duck call, swan
    song, idiot son of donkey kong - Julian Cope"
    Quote Quote  
  3. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    OOOHHH MAN THANK YOU SOOO MUCH!!!!
    i just used the script in that post and changed some stuff and VOILA! it works perfect !
    thanks a lot

    i have another question, ok so now i can choose when the overlay happens, how about if i wanna put more than one video to overlay over the other in different times during the movie, let's say i wanna use like 20 different clips during a movie of 1h and 30 minutes, do i have to overlay one then export the movie then overlay the other and then export again and so on? or i can put them all in one in the first script?

    cos i tried this script but its only showing me the last one, and not all of them by the order i gave them:

    a1=AVISource("E:\TITLE02.avi")
    a2=AviSource("C:\nametag640x360.avi")
    a4=AviSource("C:\nametag_lucy640x360.avi")
    a5=AviSource("C:\nametag_trisha640x360.avi")
    a3=a2.ConvertToRGB32()
    a6=a4.ConvertToRGB32()
    a7=a5.ConvertToRGB32()
    a1.Trim(0,1376) ++ Overlay(a1.Trim(1377,1553),a3,mask=a3.ShowAlpha(). FadeIO(7)) ++ a1.Trim(1554,0)
    a1.Trim(0,2376) ++ Overlay(a1.Trim(2377,2553),a6,mask=a6.ShowAlpha(). FadeIO(7)) ++ a1.Trim(2554,0)
    a1.Trim(0,3376) ++ Overlay(a1.Trim(3377,3553),a7,mask=a7.ShowAlpha(). FadeIO(7)) ++ a1.Trim(3554,0)

    any idea?

    thanks again
    Quote Quote  
  4. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    i changed it to this and now its showing me only the first!!! i really dunno how to do that

    a1=AVISource("E:\fire.avi")
    a2=AviSource("C:\nametag640x360.avi")
    a4=AviSource("C:\nametag_lucy640x360.avi")
    a5=AviSource("C:\nametag_trisha640x360.avi")
    a3=a2.ConvertToRGB32()
    a6=a4.ConvertToRGB32()
    a7=a5.ConvertToRGB32()
    b1=a1.Trim(0,1376) ++ Overlay(a1.Trim(1377,1553),a3,mask=a3.ShowAlpha(). FadeIO(7)) ++ a1.Trim(1554,0)
    b2=a1.Trim(0,2376) ++ Overlay(a1.Trim(2377,2553),a6,mask=a6.ShowAlpha(). FadeIO(7)) ++ a1.Trim(2554,0)
    b3=a1.Trim(0,3376) ++ Overlay(a1.Trim(3377,3553),a7,mask=a7.ShowAlpha(). FadeIO(7)) ++ a1.Trim(3554,0)
    e=b1++b2++b3
    e

    soooo confused
    Quote Quote  
  5. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    a1 = a1.Trim(0,1376) ++ Overlay(a1.Trim(1377,1553),a3,mask=a3.ShowAlpha(). FadeIO(7)) ++ a1.Trim(1554,0)
    a1 = a1.Trim(0,2376) ++ Overlay(a1.Trim(2377,2553),a6,mask=a6.ShowAlpha(). FadeIO(7)) ++ a1.Trim(2554,0)
    a1 = a1.Trim(0,3376) ++ Overlay(a1.Trim(3377,3553),a7,mask=a7.ShowAlpha(). FadeIO(7)) ++ a1.Trim(3554,0)
    return a1
    Quote Quote  
  6. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    OHHH thanks a lot man, i tried this and it worked too

    a1=AVISource("E:\DVDZzz\HARD Private\new\Nueva carpeta\Nueva carpeta\XXX40PAL_SCN\lickmyfire.avi")
    c1=AVISource("C:\Users\marwan.labban\Desktop\mobil eTV Tags\nametag640x360.avi")
    a2=AviSource("C:\Users\marwan.labban\Desktop\mobil eTV Tags\privatelogo_ani_640x360.avi")
    a4=AviSource("C:\Users\marwan.labban\Desktop\mobil eTV Tags\nametag_lucybelle640x360.avi")
    a5=AviSource("C:\Users\marwan.labban\Desktop\mobil eTV Tags\nametag_trisha640x360.avi")
    a3=a2.ConvertToRGB32()
    a6=a4.ConvertToRGB32()
    a7=a5.ConvertToRGB32()
    c2=c1.ConvertToRGB32()
    b1=a1.Trim(0,1) ++ Overlay(a1.Trim(0,200),a3,mask=a3.ShowAlpha().Fade IO(7)) ++ a1.Trim(201,0)
    b2=b1.Trim(0,1600) ++ Overlay(b1.Trim(1601,2000),a6,mask=a6.ShowAlpha(). FadeIO(7)) ++ b1.Trim(2001,0)
    b3=b2.Trim(0,1000) ++ Overlay(b2.Trim(1001,1300),a7,mask=a7.ShowAlpha(). FadeIO(7)) ++ b2.Trim(1301,0)
    b4=b3.Trim(0,376) ++ Overlay(b3.Trim(377,553),c2,mask=c2.ShowAlpha().Fa deIO(7)) ++ b3.Trim(554,0)
    b4

    thanks for the help
    Quote Quote  
  7. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by WAKA
    thanks for the help
    De nada, hombre.
    I think you've got the idea now, but you could make it simpler if you want, and do the whole thing in one statement.

    a1.Trim(0,1) ++ Overlay(a1.Trim(0,200),a3,mask=a3.ShowAlpha().Fade IO(7)) ++ a1.Trim(201,376) \
    ++ Overlay(a1.Trim(377,553),c2,mask=c2.ShowAlpha().Fa deIO(7)) ++ a1.Trim(554,1000) \
    ++ Overlay(a1.Trim(1001,1300),a7,mask=a7.ShowAlpha(). FadeIO(7)) ++ a1.Trim(1301,1600) \
    ++ Overlay(a1.Trim(1601,2000),a6,mask=a6.ShowAlpha(). FadeIO(7)) ++ a1.Trim(2001,0)

    Although, I agree your method makes it easier to add and remove individual overlays.

    Incidentally, is there a reason for putting a1.Trim(0, 1) at the start?
    Quote Quote  
  8. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Hey Gavino, yes it is much simpler and easier, am just new to editing video with a script so am learning but i will definitely use your script

    The a1.Trim(0, 1) at the start is cos i have a small intro video at the beginning, but i want it to be overlayed, although i would like it to be from the start (frame 0) but i cant cos i tried a1.Trim(0, 0) but it doesn't show so i left it at (0,1) and then i used the virtualDub to remove the first frame.

    I really like avisynth, it will save me a lot of time

    Thanks again for the help
    Quote Quote  
  9. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by WAKA
    The a1.Trim(0, 1) at the start is cos i have a small intro video at the beginning, but i want it to be overlayed, although i would like it to be from the start (frame 0) but i cant cos i tried a1.Trim(0, 0) but it doesn't show so i left it at (0,1) and then i used the virtualDub to remove the first frame.
    In that case, just leave out the a1.Trim(0, 1), and start with
    Overlay(a1.Trim(0,200),a3,mask=a3.ShowAlpha().Fade IO(7)) ++ etc
    Quote Quote  
  10. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    thanks man, well i fixed all the script and named everythin in a nice way but now it isnt showing anythin, i dont think i have errors in the script

    m1 = AVISource("E:\DVDZzz\HARD Private\new\Nueva carpeta\Nueva carpeta\XXX40PAL_SCN\lickmyfire.avi")
    m2 = AviSource("C:\Users\marwan.labban\Desktop\mobileTV Tags\privatelogo_ani_640x360.avi")
    n1 = AviSource("C:\Users\marwan.labban\Desktop\mobileTV Tags\nametag_eufratbianca640x360.avi")
    n2 = AviSource("C:\Users\marwan.labban\Desktop\mobileTV Tags\nametag_kathylola640x360.avi")
    n3 = AviSource("C:\Users\marwan.labban\Desktop\mobileTV Tags\nametag_michellezoe640x360.avi")
    n4 = AviSource("C:\Users\marwan.labban\Desktop\mobileTV Tags\nametag_cindyrenata640x360.avi")
    n5 = AviSource("C:\Users\marwan.labban\Desktop\mobileTV Tags\nametag_anita_natali_defrancesca640x360.avi")
    o1 = m2.ConvertToRGB32()
    o2 = n1.ConvertToRGB32()
    o3 = n2.ConvertToRGB32()
    o4 = n3.ConvertToRGB32()
    o5 = n4.ConvertToRGB32()
    o6 = n5.ConvertToRGB32()
    Overlay(m1.Trim(0,100),o1,mask=o1.ShowAlpha().Fade IO(7)) ++ m1.Trim(101,0) \
    ++ Overlay(m1.Trim(200,300),o2,mask=o2.ShowAlpha().Fa deIO(7)) ++ m1.Trim(301,0) \
    ++ Overlay(m1.Trim(401,500),o3,mask=o3.ShowAlpha().Fa deIO(7)) ++ m1.Trim(501,0) \
    ++ Overlay(m1.Trim(601,700),o4,mask=o4.ShowAlpha().Fa deIO(7)) ++ m1.Trim(701,0) \
    ++ Overlay(m1.Trim(801,900),o5,mask=o5.ShowAlpha().Fa deIO(7)) ++ m1.Trim(901,0) \
    ++ Overlay(m1.Trim(1001,1100),o6,mask=o6.ShowAlpha(). FadeIO(7)) ++ m1.Trim(1101,0)
    return m1

    if I delete the last line, then it will show me the last one again and if i keep it i dont see anythin!! weird
    Quote Quote  
  11. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Sorry! if i delete the last line (return m1) then it will show me the the first overlay (which is the o1) only, and if i have the last line then none of them apear

    thanks again for the help
    Quote Quote  
  12. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by WAKA
    Overlay(m1.Trim(0,100),o1,mask=o1.ShowAlpha().Fade IO(7)) ++ m1.Trim(101,0) \
    ++ Overlay(m1.Trim(200,300),o2,mask=o2.ShowAlpha().Fa deIO(7)) ++ m1.Trim(301,0) \
    ++ Overlay(m1.Trim(401,500),o3,mask=o3.ShowAlpha().Fa deIO(7)) ++ m1.Trim(501,0) \
    ++ Overlay(m1.Trim(601,700),o4,mask=o4.ShowAlpha().Fa deIO(7)) ++ m1.Trim(701,0) \
    ++ Overlay(m1.Trim(801,900),o5,mask=o5.ShowAlpha().Fa deIO(7)) ++ m1.Trim(901,0) \
    ++ Overlay(m1.Trim(1001,1100),o6,mask=o6.ShowAlpha(). FadeIO(7)) ++ m1.Trim(1101,0)
    return m1
    Those zeroes should be 199, 400, 600, 800 and 1000.
    Zero as the 2nd param in Trim means 'include up to the end of the clip'.
    So only the last one (1101, 0) is correct. For the others, you need to stop at the frame before the next overlay.
    And, yes, delete the last line since you want to return the result of splicing all the overlays.
    Quote Quote  
  13. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    A-MAZING!!!!
    Everything works perfectly! Amazing software and thanks to you my work is gonna be much easier!
    Thanks a lot for the help, I really apreciate it, YOU ROCK!!!!
    Quote Quote  



Similar Threads

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