VideoHelp Forum




+ Reply to Thread
Results 1 to 9 of 9
  1. Hello,

    I'm sure this is a question that has been asked and answered before but I seem to be having a hard time finding a solution to my question. Heck, I might not even be using the right terminology for what I want to do so I will describe what I want to do. Pretend the following image is a standalone 15 second video:


    What I want to do is overlay another video on top of the screen of the video above. How can I do this?

    Thanks!
    Quote Quote  
  2. Easiest way is to use a video editor e.g. sony vegas, premiere pro, FCPX, etc..
    Quote Quote  
  3. Originally Posted by poisondeathray View Post
    Easiest way is to use a video editor e.g. sony vegas, premiere pro, FCPX, etc..
    It doesn't necessarily have to be the easiest way. I want to do it for free and I am willing to jump through a few hoops to accomplish this. Are there any other ways?
    Quote Quote  
  4. Originally Posted by Cuber456 View Post
    Originally Posted by poisondeathray View Post
    Easiest way is to use a video editor e.g. sony vegas, premiere pro, FCPX, etc..
    It doesn't necessarily have to be the easiest way. I want to do it for free and I am willing to jump through a few hoops to accomplish this. Are there any other ways?


    yes, there are other ways

    e.g. you could do it in avisynth with overlay() or mt_merge() . It requires scripting, and there is a learning curve



    All you need is a video editor with 2 tracks. Even free video editors should be able to do this. Something like wax should be able to do this
    Quote Quote  
  5. Originally Posted by poisondeathray View Post
    Originally Posted by Cuber456 View Post
    Originally Posted by poisondeathray View Post
    Easiest way is to use a video editor e.g. sony vegas, premiere pro, FCPX, etc..
    It doesn't necessarily have to be the easiest way. I want to do it for free and I am willing to jump through a few hoops to accomplish this. Are there any other ways?


    yes, there are other ways

    e.g. you could do it in avisynth with overlay() or mt_merge() . It requires scripting, and there is a learning curve



    All you need is a video editor with 2 tracks. Even free video editors should be able to do this. Something like wax should be able to do this
    This way looks interesting to me. I have done coding before so that isn't a problem. Looking at the example done in this video, the scripting looks rather simple so if there is a learning curve, it won't be a steep one. I might use Virtual Dub since it is already installed on my computer. I can't wait to actually dig into this!
    Quote Quote  
  6. Avisynth isn't that bad once you start if you have some coding background.

    But I can forsee a problems you 're going to have if that is your actual background image . If your background image has alpha channel, it will most likely not be rendered in your final format (it will be "black" in most video formats, which typically are YCbCr , and are not RGBA). I'm referring to the background area around the monitor in the base picture

    Also what is this for? What is the final format goal (how is it going to be watched) ? or is it for use in another program ?

    If you provide a sample of your elements (the background image, and sample of the overlay video) someone here can help you with starting a script

    It's just usually much much easier for most people to use a video editor. You just drop & drag the overlay video, scale it to "fit" within the monitor screen graphic.
    Quote Quote  
  7. Originally Posted by poisondeathray View Post
    Avisynth isn't that bad once you start if you have some coding background.

    But I can forsee a problems you 're going to have if that is your actual background image . If your background image has alpha channel, it will most likely not be rendered in your final format (it will be "black" in most video formats, which typically are YCbCr , and are not RGBA). I'm referring to the background area around the monitor in the base picture.

    Also what is this for? What is the final format goal (how is it going to be watched) ? or is it for use in another program ?
    Well what is without problems, especially in coding? Its all about breaking the problems into small little steps and using code to solve those little problems. The purpose for me to do this is nothing more than experimentation. I have always wanted to try to have a video play inside a screen like that. This isn't anything fancy. It just has to be a video that can play on a computer.

    Originally Posted by poisondeathray View Post
    If you provide a sample of your elements (the background image, and sample of the overlay video) someone here can help you with starting a script
    Very generous offer but I am very willing(and want) to screw around with Avisynth. I feel that Avisynth has potential to do a lot for free and I want to see that potential myself.

    Originally Posted by poisondeathray View Post
    It's just usually much much easier for most people to use a video editor. You just drop & drag the overlay video, scale it to "fit" within the monitor screen graphic.
    Well of course it would be easier to use a video editor but I am not dropping $600 on sony vegas when all i am doing is purely experimenting :P. I mean unless there is a free editor that can do what I want or there is something similar to Avisynth then I see Avisynth as the only solution. Am I wrong?
    Quote Quote  
  8. No, it's not the only solution there are free NLE's e.g. lightworks , videopad ? , and you can use the free trials on most NLE's for a month, I think even blenders' VSE can do this

    What you want to do is actually quite easy in avisynth with Overlay() , it will basically take 3 lines and might look something like this
    http://avisynth.org/mediawiki/Overlay

    Code:
    background = Imagesource("background.png")
    overlayvideo = AVISource("video.avi")
    Overlay(background, overlayvideo, x=0, y=0)
    Now, there are some "gotchas" like colorspaces, and what to enter for the x,y values (these coordinates position where the overlay will be), how to resize the video so it "fits" within the screen , but they are fairly simple to work around. Experiment and have fun, if you get stuck, just ask
    Quote Quote  
  9. Quick hack:

    Code:
    vid=AviSource("vid.avi").BicubicResize(204,130)
    bg=ImageSource("tv.png").ConvertToYV12()
    Overlay(bg,vid,27,49)
    Name:  overlay.jpg
Views: 602
Size:  6.8 KB

    I used a screen cap to make the image file so you'll probably have to adjust the overlay X,Y location if you use the original source image. You can use an alpha (transparency) map if you want to feather the edges.
    Quote Quote  



Similar Threads

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