VideoHelp Forum
+ Reply to Thread
Results 1 to 7 of 7
Thread
  1. I've heard it can be done, I was tinkering with it.

    This is what I have so far:


    LoadPlugin("C:\Program Files (x86)\AviSynth\plugins\ffms2.dll")
    Import("C:\Program Files (x86)\AviSynth\plugins\FFMS2.avsi")

    AudioDub(FFAudioSource("d1.mp4"),FFVideoSource("d1 .mp4",fpsnum=30000, fpsden=1001,threads=1))

    AddBorders(550,0,0,0)

    With the borders, that puts the video on one half of the screen. I just don't know exactly how to insert an image or another video to play alongside it.
    Quote Quote  
  2. And
    http://avisynth.nl/index.php/StackVertical
    http://avisynth.nl/index.php/Overlay.

    For example:

    Code:
    v1 = WhateverSource("file1.ext")
    v2 = WhateverSource("file2.ext")
    StackHorizontal(v1,v2) # must be same height for StackHorizontal, same width for StackVertical
    Or picture-in-picture:

    Code:
    v1 = WhateverSource("file1.ext") # big video
    v2 = WhateverSource("file2.ext") # small video
    Overlay(v1, v2, x=0, y=0) # Overlay small video at top left of big video
    Last edited by jagabo; 2nd Dec 2016 at 12:39.
    Quote Quote  
  3. I got it to work. Thank you!

    I notice I only get sound from one clip, I guess that's normal that they can't overlap?


    Also, is it possible to do it with a video and an image? I tried it and got an error message about formats not matching.



    Originally Posted by jagabo View Post
    And
    http://avisynth.nl/index.php/StackVertical
    http://avisynth.nl/index.php/Overlay.

    For example:

    Code:
    v1 = WhateverSource("file1.ext")
    v2 = WhateverSource("file2.ext")
    StackHorizontal(v1,v2) # must be same height for StackHorizontal, same width for StackVertical
    Or picture-in-picture:

    Code:
    v1 = WhateverSource("file1.ext") # big video
    v2 = WhateverSource("file2.ext") # small video
    Overlay(v1, v2, x=0, y=0) # Overlay small video at top left of big video
    Quote Quote  
  4. Originally Posted by smike View Post

    Also, is it possible to do it with a video and an image? I tried it and got an error message about formats not matching.
    Yes, it's possible, easy even. Formats not matching usually refers to color space. If your video is YV12, so must be your picture. For example:

    v2 = ImageSource("Picture.bmp").ConvertToYV12()

    or:

    v2 = ImageSource("Picture.bmp",End=1000).ConvertToYV12( )

    where 'End' refers to the number of frames you want the picture to last (same as the video?).
    Last edited by manono; 2nd Dec 2016 at 21:40.
    Quote Quote  
  5. That works as well, except for I was testing different images until I used one that got an error:


    "Cannot convert if height isn't mod2"


    Yes, it's possible, easy even. Formats not matching usually refers to color space. If your video is YV12, so must be your picture. For example:

    v2 = ImageSource("Picture.bmp").ConvertToYV12()

    or:

    v2 = ImageSource("Picture.bmp",End=1000).ConvertToYV12( )

    where 'End' refers to the number of frames you want the picture to last (same as the video?).
    Quote Quote  
  6. Your height has to be divisible by 2. RGB doesn't require it but YV12 does. You can crop away one row of pixels or add a row of black. Something like this:

    v2 = ImageSource("Picture.bmp").Crop(0,0,0,-1).ConvertToYV12()
    Quote Quote  



Similar Threads

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