VideoHelp Forum




+ Reply to Thread
Results 1 to 27 of 27
  1. Member
    Join Date
    Sep 2009
    Location
    United State
    Search Comp PM
    hello guys
    is there any way that i can put any video on the silver section in this pictures?

    Quote Quote  
  2. You can use overlay() in avisynth
    Quote Quote  
  3. Member
    Join Date
    Sep 2009
    Location
    United State
    Search Comp PM
    Originally Posted by poisondeathray View Post
    You can use overlay() in avisynth
    can you please give me example how i can use overlay()?
    Quote Quote  
  4. see this:
    http://avisynth.org/mediawiki/Overlay

    Code:
    pip=colorbars(width=720, height=540)
    
    background=ImageSource("vg0f9v.jpg.png")
    
    overlay(background, pip, x=24, y=92)
    Replace the first line with your video

    e.g
    pip=AVISource("video.avi").Spline36Resize(720,540)


    You may have to resize it differently, or add letterbox or pillarbox depending on the source video's aspect ratio . You might have to adjust the length of the background or insert video

    Click image for larger version

Name:	overlay.jpg
Views:	1268
Size:	172.3 KB
ID:	17182
    Quote Quote  
  5. Member
    Join Date
    Sep 2009
    Location
    United State
    Search Comp PM
    thank you very much
    Quote Quote  
  6. Member
    Join Date
    Sep 2009
    Location
    United State
    Search Comp PM
    Originally Posted by poisondeathray View Post
    see this:
    http://avisynth.org/mediawiki/Overlay

    Code:
    pip=colorbars(width=720, height=540)
    
    background=ImageSource("vg0f9v.jpg.png")
    
    overlay(background, pip, x=24, y=92)
    Replace the first line with your video

    e.g
    pip=AVISource("video.avi").Spline36Resize(720,540)


    You may have to resize it differently, or add letterbox or pillarbox depending on the source video's aspect ratio . You might have to adjust the length of the background or insert video

    Image
    [Attachment 17182 - Click to enlarge]
    i have a problem and i don't know how to fix it.
    the problem is the video have like 65000 frame but when i merg it with the background i get only 1000 frame is there any way to fix this?
    Quote Quote  
  7. Adjust the background length

    Imagesource has "start" and "end" parameters
    http://avisynth.org/mediawiki/ImageSource

    Code:
    background=ImageSource("vg0f9v.jpg.png", start=0, end=64999)
    avisynth starts numbering at frame zero , so that's why end is 64999 (= 65000 total frames). Change it to the exact number of frames that you need -1 .

    You probably need to add ConvertToYV12() at the end of the script as well
    Quote Quote  
  8. Member
    Join Date
    Sep 2009
    Location
    United State
    Search Comp PM
    thank you very much i understand now to deal with pictures using avisynth
    i have another question there is option on virtualdub that fix video and audio he let them playing at the same time but i can't use on this avs file
    Quote Quote  
  9. I think audio isn't served in the script; what does file=>file information in vdub say? Does it report any audio ?

    An alternative you can probably adjust the audio in the script

    But to serve audio try something like this:

    Code:
    pip=colorbars(width=720, height=540) 
    background=ImageSource("vg0f9v.jpg.png", start=0, end=64999) 
    overlay(background, pip, x=24, y=92)
    vid=last
    
    aud=avisource("video.avi")
    
    audiodub(vid,aud)
    If it's a demuxed audio source, or different video container, use the appropriate source filter for aud
    Quote Quote  
  10. imagesource has fps parameter too, you can change it to match your insert video. Use mediainfo if you don't know what the fps is

    background=ImageSource("vg0f9v.jpg.png", start=0, end=64999, fps=x)
    Quote Quote  
  11. Member
    Join Date
    Sep 2009
    Location
    United State
    Search Comp PM
    it's recorded video using visual boy advance wath this video and you gonna understand
    http://www.youtube.com/watch?v=0D_wre2i2xI
    Quote Quote  
  12. Member
    Join Date
    Sep 2009
    Location
    United State
    Search Comp PM
    this is my script

    Code:
    pip=AVISource("1.avi").Spline36Resize(746,564)
    background=ImageSource("Pokemon Light Platinum.png", start=0, end=65252)
    overlay(background, pip, x=12, y=82)
    ConvertToYV12()
    Quote Quote  
  13. just add the audio in as above

    Code:
    pip=AVISource("1.avi").Spline36Resize(746,564) 
    background=ImageSource("Pokemon Light Platinum.png", start=0, end=65252) 
    overlay(background, pip, x=12, y=82) 
    ConvertToYV12()
    vid=last
    
    aud=AVISource("1.avi")  
    
    audiodub(vid,aud)
    Quote Quote  
  14. Member
    Join Date
    Sep 2009
    Location
    United State
    Search Comp PM
    everything works fine now thank you very much for your help
    Quote Quote  
  15. Member
    Join Date
    Sep 2009
    Location
    United State
    Search Comp PM
    this the final code that i use

    pip=AVISource("1.avi").Spline36Resize(746,564)
    background=ImageSource("Pokemon Light Platinum.png", start=0, end=65252)
    overlay(background, pip, x=12, y=82)
    ConvertToYV12()
    vid=last

    aud=AVISource("1.avi")

    audiodub(vid,aud)
    but i like to add a png images(transparent) to where is the balls
    i try to use imagesource but it didn't work
    Quote Quote  
  16. Originally Posted by simonrule View Post
    but i like to add a png images(transparent) to where is the balls
    i try to use imagesource but it didn't work
    Did you want single static image? or image sequence ?
    Quote Quote  
  17. BTW, To add transparency, you have to specify RGB32 for the alpha channel

    eg. Lets say you have a background video, and you want to add a single transparent png to overlay. The png has to be the same dimensions as the background video (make it in your image editor)

    Code:
    Background=AVISource("video.avi")
    Logo=ImageSource("logo.png",pixel_type="RGB32")
    Overlay(Background, Logo ,mask=Logo.ShowAlpha())
    Quote Quote  
  18. Member
    Join Date
    Sep 2009
    Location
    United State
    Search Comp PM
    image like this one but im gonna remove the white background

    Quote Quote  
  19. So it's a single image , not a sequence then ?

    Just remove the white brackground (mask it out, or key it out) save it as a transparent png (RGB32), and follow the example above in post #17. As before, you have to adjust the x, y parameters and so forth
    Quote Quote  
  20. Member
    Join Date
    Sep 2009
    Location
    United State
    Search Comp PM
    ok but i want to add the transparent image in this code

    pip=AVISource("1.avi").Spline36Resize(746,564)
    background=ImageSource("Pokemon Light Platinum.png", start=0, end=65252)
    overlay(background, pip, x=12, y=82)
    ConvertToYV12()
    vid=last

    aud=AVISource("1.avi")

    audiodub(vid,aud)
    Quote Quote  
  21. Originally Posted by simonrule View Post
    ok but i want to add the transparent image in this code

    pip=AVISource("1.avi").Spline36Resize(746,564)
    background=ImageSource("Pokemon Light Platinum.png", start=0, end=65252)
    overlay(background, pip, x=12, y=82)
    ConvertToYV12()
    vid=last

    aud=AVISource("1.avi")

    audiodub(vid,aud)

    Just name that section, eg. mybackground=last, then add the image with a 2nd Overlay()


    Code:
    pip=AVISource("1.avi").Spline36Resize(746,564) 
    background=ImageSource("Pokemon Light Platinum.png", start=0, end=65252) 
    overlay(background, pip, x=12, y=82) 
    ConvertToYV12()
    vid=last
    
    aud=AVISource("1.avi") 
    
    audiodub(vid,aud)
    
    MyBackground=last
    
    ##################
    
    Logo=ImageSource("logo.png",pixel_type="RGB32", start=0, end=65252) 
    
    Overlay(MyBackground, Logo , mask=Logo.ShowAlpha())
    Quote Quote  
  22. Member
    Join Date
    Sep 2009
    Location
    United State
    Search Comp PM
    everything works great now thank you very much for your help
    Quote Quote  
  23. Member
    Join Date
    Sep 2009
    Location
    United State
    Search Comp PM
    i want this pic to show in the frames that i want when i do that it's still showing from the frame 0 to frame 65252

    Logo=ImageSource("logo.png",pixel_type="RGB32", start=0, end=65252)
    Quote Quote  
  24. Originally Posted by simonrule View Post
    i want this pic to show in the frames that i want when i do that it's still showing from the frame 0 to frame 65252

    Logo=ImageSource("logo.png",pixel_type="RGB32", start=0, end=65252)
    add WithLogo=last

    Code:
    pip=AVISource("1.avi").Spline36Resize(746,564)  background=ImageSource("Pokemon Light Platinum.png", start=0, end=65252)  overlay(background, pip, x=12, y=82)  ConvertToYV12() vid=last  aud=AVISource("1.avi")   audiodub(vid,aud)  MyBackground=last  ##################  Logo=ImageSource("logo.png",pixel_type="RGB32", start=0, end=65252)   Overlay(MyBackground, Logo , mask=Logo.ShowAlpha())
    
    WithLogo=last
    So now you have 2 versions, MyBackground = no logo , and WithLogo that has logo. Both are the full duration

    Use trim() to add the logo. Say you want the logo to appear only from frame 1000-2000

    Code:
    MyBackground.trim(0,999) ++ WithLogo.trim(1000,2000) ++ MyBackground.trim(2001,0)
    There are other ways too, e.g. ReplaceFramesSimple() or ClipClop() or similar filters where you replace frames from one video into another
    Quote Quote  
  25. Member
    Join Date
    Sep 2009
    Location
    United State
    Search Comp PM
    i use the script like this but didn't work

    pip=AVISource("1.avi").Spline36Resize(787,537)
    background=ImageReader("Pokemon Light Platinum.png", start=0, end=9619)
    overlay(background, pip, x=35, y=84)
    ConvertToYV12()
    vid=last

    aud=AVISource("1.avi")

    audiodub(vid,aud)

    MyBackground=last

    Logo=ImageSource("pokemon.png",pixel_type="RGB32", start=7765, end=9619)

    Overlay(MyBackground, Logo , mask=Logo.ShowAlpha())

    withlogo=last
    Quote Quote  
  26. So you only want it at the end? from 7765 to 9619 ?


    pip=AVISource("1.avi").Spline36Resize(787,537)
    background=ImageReader("Pokemon Light Platinum.png", start=0, end=9619)
    overlay(background, pip, x=35, y=84)
    ConvertToYV12()
    vid=last

    aud=AVISource("1.avi")

    audiodub(vid,aud)

    MyBackground=last

    Logo=ImageSource("pokemon.png",pixel_type="RGB32", start=0, end=9619)

    Overlay(MyBackground, Logo , mask=Logo.ShowAlpha())

    WithLogo=last

    MyBackground.trim(0,7764) ++ WithLogo.trim(7765,9619)

    Quote Quote  
  27. Member
    Join Date
    Sep 2009
    Location
    United State
    Search Comp PM
    thank you very much
    Quote Quote  



Similar Threads

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