VideoHelp Forum




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

    I have two videos that I would like to have in one window, I am using AviSynth however I am new to it. I have tried to stack them vertically, but it isn’t working. What’s wrong is that both videos open when I click on them in their folder, however when I go to open them as AVISource("C:blaaah.avi") one of them opens and the other one doesn’t, my media player tells me that "AVISource: could not open video stream in any supported format". I tried to resize the videos, using LanczosResize (xx,yy) but it didn’t make a difference... any suggestions??

    All help is much appreciated!!
    Thank you!
    Quote Quote  
  2. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    Last edited by Baldrick; 31st Oct 2012 at 05:14.
    Quote Quote  
  3. You can also install the ffmpeg source plugin and use ffVideoSource(). DirectShowSource() isn't always frame accurate.

    http://code.google.com/p/ffmpegsource/

    Beware that the two videos must have similar properties to stack them in AviSynth. They must both be the same colorspace. The frame height must be the same to use StackHorizontal(). The frame width must be the same to use StackVertical(). Both must be the same to use Interleave(). You can use Crop(), AddBorders(), or BilinearResize() to adjust frame sizes.
    Quote Quote  
  4. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by 123catty456 View Post
    I have two videos that I would like to have in one window, I am using [url=https://www.videohelp.com/tools/Avisynth]AviSynth
    How can anyone help you if you don't show them the code?

    Copy the entire AVS script into a post.

    And as above, if AviSource doesnt work, the best bet is FFMpegsource2
    Install the AVSI as well as the dlls and you can use

    FFmpegSource2("video.avi",atrack=-1,fpsnum=-1,fpsden=1)

    It will take a few minutes to create an index the first time it opens a video.
    Quote Quote  
  5. Thanks for all the responses!
    @baldrick thanks that worked when I changed to DirectShowSource; @jagabo thanks I tried the crop() option and I should now have both videos as 800 x 600. here is the tiny script:
    v1 = DirectShowSource("C:\Documents and Settings\blaaaaah...\Video1.avi")
    v2 = DirectShowSource("C:\Documents and Settings\moorrrreeeblaaaaah...\Video2.avi")
    Crop (212,112,-212,-112)
    StackHorizontal(v1,v2)

    (V1 is already 800 x 600, those values reduce v2 to the same..) they both opened fine when on their own and that Crop works fine when in a file on its own with the video 2, but when put together like this I'm told there is invalid arguments to "crop" if ya know whats that about?!

    thanks AlanHK, I plan to exhaust aviSynth before downloading more..!

    thank you!
    Quote Quote  
  6. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    You really need to give more info. Such as "mediainfo" specs on the files in question, and the actual wording of the error messages given.
    Otherwise, we are working in the dark.

    BTW, for cleanliness of code documentation, it would probably be a good idea for you to use
    Code:
    CroppedV2 = Crop (V2, 212, 112, -212, -112)
    or you could do
    Code:
    CroppedV2 = V2.Crop (212, 112, -212, -112)
    instead of
    Code:
    Crop (212,112,-212,-112)
    and then follow up with the StackVertical, etc commands (remembering to use the new "CroppedV2" stream designator).

    Scott
    Last edited by Cornucopia; 31st Oct 2012 at 10:28.
    Quote Quote  
  7. Originally Posted by 123catty456 View Post
    v1 = DirectShowSource("C:\Documents and Settings\blaaaaah...\Video1.avi")
    v2 = DirectShowSource("C:\Documents and Settings\moorrrreeeblaaaaah...\Video2.avi")
    Crop (212,112,-212,-112)
    StackHorizontal(v1,v2)
    Your Crop() statement isn't saying what video is to be cropped. Change it to

    Code:
    v2 = Crop(v2,212,112,-212,-112)
    When you don't specify a video AviSynth usually assumes "last". So a sequence like

    Code:
    AviSource("name.avi")
    Crop(212,112,-212,-112)
    is equivalent to:

    Code:
    last = AviSource("name.avi")
    last =  Crop(last,212,112,-212,-112)
    and is also equivalent to:

    Code:
    last = AviSource("name.avi").Crop(212,112,-212,-112)
    By the way, the difference between ffVideoSource() and FFmpegSource2() is that the former gives you only the video, the latter can give both video and audio.
    Last edited by jagabo; 31st Oct 2012 at 10:59.
    Quote Quote  
  8. Hi thanks, that got rid of the error for the Crop (). the error I am not getting is

    "StachHorizontal:image formats don't match
    (C:\Documents and Settings\test3.avs,line 4) "

    here is the script again:
    V1 = DirectShowSource("C:\Documents and Settings\catherine.keigher\My Documents\Video of Bending Moments\AviSynth stuff\Video1.avi")
    V2 = DirectShowSource("C:\Documents and Settings\catherine.keigher\My Documents\Video of Bending Moments\AviSynth stuff\Video2.avi")
    CropV2 = Crop (V2, 112,212,-112,-212)
    StackHorizontal(V1,CropV2)

    What I have is a plain video 3gp video that I converted to .avi, and the other is data from DEWESoft 7.0.3 which I exported as an .avi file, perhaps I just cant match these two videos in this way? if their formats wont match, is there other options?

    thank you very much!
    Quote Quote  
  9. Use Info() the check the colorspace of the two videos. Convert one of them to match the other. You'll end up using ConvertToRGB(), ConvertToYUY2(), or ConvertToYV12().
    Quote Quote  
  10. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by 123catty456 View Post
    thanks AlanHK, I plan to exhaust aviSynth before downloading more..!
    FFMPEGsource has some advantages over DirectShowSource.
    It becomes part of Avisynth after you install it in the plugins folder.


    Originally Posted by 123catty456 View Post
    What I have is a plain video 3gp video that I converted to .avi, and the other is data from DEWESoft 7.0.3 which I exported as an .avi file, perhaps I just cant match these two videos in this way? if their formats wont match, is there other options?
    Need to match:

    frame size
    fps
    sound sampling rate and number of channels.
    colourpace, as mentioned by Jagabo

    Each of these can be adjusted.
    See respectively

    http://avisynth.org/mediawiki/Resize
    http://avisynth.org/mediawiki/Crop
    http://avisynth.org/mediawiki/AddBorders


    http://avisynth.org/mediawiki/FPS

    http://avisynth.org/mediawiki/ResampleAudio
    http://avisynth.org/mediawiki/GetChannel



    Code:
    DirectShowSource("Video1.avi")
    info()
    for each video to see all the specs and adjust one to match the other.
    Quote Quote  
  11. Hi everyone,

    thanks for all the help and advice with this problem, much appreciated!! I went to match up the two videos frame space, fps, colourspace and it worked thank you very much, but it really reduced the quality of the videos and wasnt coming out well, so just ended up using this software trakazpc:
    http://www.trakax.com/software/pc/

    which was very user-friendly and I just plonked the two videos side by side and vola! worked wonders and looked well, just wanted to reply incase anyone else is looking for the same solution!

    thanks!
    Quote Quote  
  12. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    "videos not coming out well" has little or nothing to do with the software we suggested; has much more to do with the encoding options you did or did not choose. So if you are a true beginner and want to pay money for a simple piece of software, you and others can try what you happened upon. Makes more sense for beginners to just use WMM, as it's free, comes already with Windows, and is just as simple (if not more so) but still gives you a few output options (unfortunately, most are WMV-based).

    I daresay, doing what you wanted in Virtualdub or AVISynth could have been done just as quickly and easily (and for free), and likely with even BETTER quality that what you arrived at. All depends on the settings (and your understanding of them).

    Scott
    Quote Quote  
  13. Sorry to disappoint you Scott but it was a free download!

    I was saying "videos not coming out well" to avoid getting into too much detail, what i had was some high speed camera footage and was matching it to a moving graph, altering the frames per second of either or both of these videos prevented them from syncing perfectly with each other, but it wouldn't run unless i matched them so it was not suitable for me. Anyway i just came back to say thanks for the helpful replies i had gotten, and as i said, to point out the direction i went in the end as that could be the exact solution that someone else out there is looking for.
    Quote Quote  
  14. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Download may be free, but it is "trial" PAY software, at least according to that site you linked.

    Like I said, you still could have gotten better with the right settings for Vdub/AVISynth.

    Scott
    Quote Quote  



Similar Threads

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