VideoHelp Forum




+ Reply to Thread
Results 1 to 15 of 15
  1. Member
    Join Date
    Aug 2017
    Location
    Italy
    Search Comp PM
    Hi to everybody,I'm new to video stuff and I have a problem using avisynth...

    Basically I have 4 videos,which only one of them has the audio i want to play.
    But I have the separated audio as well...

    The problem is that if I write the script string at the beginning the script is ignored,and if I write it for last there's the sound but no video at all (grey screen).

    Here some examples I used..


    1.videos but no sound

    Audio = BassAudioSource("C:\Users\Cris\Desktop\Vox.flac")
    topleft=avisource("C:\Users\Cris\Desktop\Bass.avi" , audio=false)
    topright=avisource("C:\Users\Cris\Desktop\Guitar.a vi", audio=false)
    bottomleft=avisource("C:\Users\Cris\Desktop\Keys.a vi", audio=false)
    bottomright=avisource("C:\Users\Cris\Desktop\Vox.a vi", audio=false)
    firstcolumn = StackHorizontal (topleft, topright)
    secondcolumn = StackHorizontal (bottomleft, bottomright)
    Stackvertical (firstcolumn, secondcolumn)


    2.Avisynth says:Splice : one clip has audio and the other doesn't (not allowed)

    topleft=directshowsource("C:\Users\Cris\Desktop\Ba ss.avi")
    topright=directshowsource("C:\Users\Cris\Desktop\V ox.avi")
    bottomleft=directshowsource("C:\Users\Cris\Desktop \Keys.avi")
    bottomright=directshowsource("C:\Users\Cris\Deskto p\Guitar.avi")
    firstcolumn = StackHorizontal (topleft, topright)
    secondcolumn = StackHorizontal (bottomleft, bottomright)
    Stackvertical (firstcolumn, secondcolumn)
    video = directshowsource("C:\Users\Cris\Desktop\Vox.avi") + directshowsource("C:\Users\Cris\Desktop\Bass.avi") + directshowsource("C:\Users\Cris\Desktop\Guitar.avi ") + directshowsource("C:\Users\Cris\Desktop\Keys.avi")
    audio = BassAudioSource("C:\Users\Cris\Desktop\Vox.flac")
    AudioDubEx (video, audio)

    3.Avisynth says :image widths don't match

    clip1 = AVISource("C:\Users\Cris\Desktop\Bass.avi", audio=false)
    clip2 = AVISource("C:\Users\Cris\Desktop\Vox.avi")
    clip3 = AVISource("C:\Users\Cris\Desktop\Guitar.avi", audio=false)
    clip4 = AVISource("C:\Users\Cris\Desktop\keys.avi", audio=false)

    AudioDub(StackVertical(StackHorizontal(clip1,clip2 ),clip3),clip4)

    Thanks in advance
    Quote Quote  
  2. Try this

    Code:
    aud = BassAudioSource("C:\Users\Cris\Desktop\Vox.flac")
    topleft=avisource("C:\Users\Cris\Desktop\Bass.avi" , audio=false)
    topright=avisource("C:\Users\Cris\Desktop\Guitar.avi", audio=false)
    bottomleft=avisource("C:\Users\Cris\Desktop\Keys.avi", audio=false)
    bottomright=avisource("C:\Users\Cris\Desktop\Vox.avi", audio=false)
    firstcolumn = StackHorizontal (topleft, topright)
    secondcolumn = StackHorizontal (bottomleft, bottomright)
    vid=Stackvertical (firstcolumn, secondcolumn)
    audiodub(vid, aud)
    Quote Quote  
  3. Member
    Join Date
    Aug 2017
    Location
    Italy
    Search Comp PM
    It works! great!!!Thank you so much!!!!!

    But what I was missing?
    Quote Quote  
  4. Member
    Join Date
    Aug 2017
    Location
    Italy
    Search Comp PM
    But now I realized that 3 videos are out of sync with the one with the audio...
    Is there a way to trim those from the very beginning to a certain amount of time or frame?
    Quote Quote  
  5. Originally Posted by crisvalk View Post

    But what I was missing?
    In the first case, you didn't use audiodub() to include the audio . The flac audio was never "called" . If you use a = something , but never call "a" , it won't appear in the script. So there you defined audio = bassaudiosource, but you never called "audio"


    Originally Posted by crisvalk View Post
    But now I realized that 3 videos are out of sync with the one with the audio...
    Is there a way to trim those from the very beginning to a certain amount of time or frame?
    You can use trim() to specify start frame, end frame . If you use "0" for end frame that means until the end. You can specify exact start, end frames

    e.g. If you wanted Bass.avi to include frame 100 to end (discarding frame 0 to 99) , it would be trim (100,0) . Just add it on after a period

    eg.
    Code:
    aud = BassAudioSource("C:\Users\Cris\Desktop\Vox.flac")
    topleft=avisource("C:\Users\Cris\Desktop\Bass.avi" , audio=false).trim(100,0)
    topright=avisource("C:\Users\Cris\Desktop\Guitar.avi", audio=false)
    bottomleft=avisource("C:\Users\Cris\Desktop\Keys.avi", audio=false)
    bottomright=avisource("C:\Users\Cris\Desktop\Vox.avi", audio=false)
    firstcolumn = StackHorizontal (topleft, topright)
    secondcolumn = StackHorizontal (bottomleft, bottomright)
    vid=Stackvertical (firstcolumn, secondcolumn)
    audiodub(vid, aud)
    Quote Quote  
  6. Also, be careful how you determine "sync" - it's going to partially depend on the characteristics of the video(s) . If they were all UHD, high resolution, high compression codecs, it would be more difficult to playback in realtime 4 streams than if they were all SD, low compressed codecs. Also your hardware characteristics play a role
    Quote Quote  
  7. Member
    Join Date
    Aug 2017
    Location
    Italy
    Search Comp PM
    Ok I didn't know it!trim works too!thanks for everything,I couldn't have done it without your help
    Quote Quote  
  8. Member
    Join Date
    Aug 2017
    Location
    Italy
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Also, be careful how you determine "sync" - it's going to partially depend on the characteristics of the video(s) . If they were all UHD, high resolution, high compression codecs, it would be more difficult to playback in realtime 4 streams than if they were all SD, low compressed codecs. Also your hardware characteristics play a role
    I managed to get almost perct sync without too much effort,in fact all the 4 videos were 3M HD but I had to convert them to a lower resolution (640x480) in order to get a not too heavy vid and let my pc handle the editing...that it seems took forever to render...

    The result is more than acceptable,but only one thing I don't understand...the 4 vids don't fill the entire screen...there are black stripes up,in the middle and at the sides...is it because of the resolution?
    Quote Quote  
  9. Originally Posted by crisvalk View Post
    Originally Posted by poisondeathray View Post
    Also, be careful how you determine "sync" - it's going to partially depend on the characteristics of the video(s) . If they were all UHD, high resolution, high compression codecs, it would be more difficult to playback in realtime 4 streams than if they were all SD, low compressed codecs. Also your hardware characteristics play a role
    I managed to get almost perct sync without too much effort,in fact all the 4 videos were 3M HD but I had to convert them to a lower resolution (640x480) in order to get a not too heavy vid and let my pc handle the editing...that it seems took forever to render...

    The result is more than acceptable,but only one thing I don't understand...the 4 vids don't fill the entire screen...there are black stripes up,in the middle and at the sides...is it because of the resolution?

    Probably just math and aspect ratio

    Were they 16:9 1920x1080 to begin with ? What do you mean by "3M HD" ?

    If you don't know what the characteristics were, you can use mediainfo (view=>text)

    If they were 16:9 to begin with, then the "lower resolution" version would be 640x360, not 640x480 (which is 4:3) . A 2x2 grid of 960x540 inputs would be 1920x1080 . So if your final goal was 1920x1080 16:9 , then you would resize each one to 960x540
    Quote Quote  
  10. Member
    Join Date
    Aug 2017
    Location
    Italy
    Search Comp PM
    My camcorder says: 3M HD (2304 x 1296 pixels @ 30fps /24mbps),that's the resolution they were at the beginning..
    Quote Quote  
  11. Originally Posted by crisvalk View Post
    My camcorder says: 3M HD (2304 x 1296 pixels @ 30fps /24mbps),that's the resolution they were at the beginning..
    That's 16:9 aspect ratio too, because 2304/1296 = 1.7777...

    So what is your destination goal ? How are you watching it ? On a 1920x1080 display ? If so , resize each of the videos to 960x540 as mentioned above (you can do it the same way in the script as the trim() by adding a period then some resize e.g. spline36resize(960,540) )
    Quote Quote  
  12. Member
    Join Date
    Aug 2017
    Location
    Italy
    Search Comp PM
    Yes I watch it in a full HD monitor,but the vid is gonna be watched even by phones as I've uploaded it on youtube...

    Ok I'll give it a try!
    Quote Quote  
  13. IMO, you should keep them as full resolution for youtube, because it supports higher resolutions . So even if you watch on 1920x1080 today - in a year or two you might be watching on something higher. Youtube re-encodes and re-sizes several different versions - so if a client is watching on a lower resolution phone, they will get a compatible lower resolution version by default

    But do you see how just making a 2x2 grid doesn't change the aspect ratio ? 4608x2592 is still 16:9 , so you should get no "black bars" or letterboxing/pillarboxing on a 16:9 display

    However, if the source videos had black borders to begin with, that might explain "there are black stripes up,in the middle and at the sides" - you'd have to look more closely. If that's what is happening, then you might consider cropping the borders +/- resizing somewhere in the script. If you can't figure out what's going on , just upload a small sample and someone will examine it
    Quote Quote  
  14. Member
    Join Date
    Aug 2017
    Location
    Italy
    Search Comp PM
    I always keep the original HQ files so no problem for that...but I've tried like this:

    aud = BassAudioSource("E:\Cris Valk Finalized Works and Vids\Video\I Miss You\Vox.flac")
    topleft=avisource("E:\Cris Valk Finalized Works and Vids\Video\I Miss You\Keys.avi" , audio=false).trim(45,0).spline36resize(960,540)
    topright=avisource("E:\Cris Valk Finalized Works and Vids\Video\I Miss You\Bass.avi", audio=false).trim(100,0).spline36resize(960,540)
    bottomleft=avisource("E:\Cris Valk Finalized Works and Vids\Video\I Miss You\Guitar.avi", audio=false).trim(50,0).spline36resize(960,540)
    bottomright=avisource("E:\Cris Valk Finalized Works and Vids\Video\I Miss You\Vox.avi", audio=false).spline36resize(960,540)
    firstcolumn = StackHorizontal (topleft, topright)
    secondcolumn = StackHorizontal (bottomleft, bottomright)
    vid=Stackvertical (firstcolumn, secondcolumn)
    audiodub(vid, aud)

    And the result is exactly the same as before,I don't know why...
    Or did you meant to apply this script to the original MOV hig resolution files?in that case my pc won't let me show the preview...
    Quote Quote  
  15. Originally Posted by crisvalk View Post


    And the result is exactly the same as before,I don't know why...
    Do you mean - "there are black stripes up,in the middle and at the sides" ?

    If so, then look at the AVI files individually first . They probably have borders . If the original MOV did not, then you conversion from MOV to AVI might have put borders on. If so, the double check how you did that conversion

    If it's none of those, then most some samples of the MOV and the AVI
    Quote Quote  



Similar Threads

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