VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Results 1 to 12 of 12
Thread
  1. Member
    Join Date
    Apr 2008
    Location
    Israel
    Search Comp PM
    hi,

    I'm trying to stitch together several .avi files with AviSynth. I'm using the SegmentedAVISource function but keep getting the message "SegmentedAVISource: no files found!". When I change the function to .avi source with the same file everything works ok. What am I doing wrong?

    Also, can anyone give me some pointers on how to stitch .avi files with AviSynth when the fps and frame size are not the same?

    Thanks!
    Quote Quote  
  2. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    Can you post your avisynth script?
    Quote Quote  
  3. Member
    Join Date
    Apr 2008
    Location
    Israel
    Search Comp PM
    Here it is:

    SegmentedAVISource("D:\b.avi")
    Subtitle("Hello, world!")
    Quote Quote  
  4. Also, can anyone give me some pointers on how to stitch .avi files with AviSynth when the fps and frame size are not the same?
    You don't. Not without making them all the same, and it doesn't look like SegmentedAVISource can do much about that. Even SegmentedDirectShowSource, while it can force them to all have the same framerate, can't force the same resolution:

    http://avisynth.org/mediawiki/SegmentedAviSource
    SegmentedAVISource("D:\b.avi")
    If you're using letters (a, b, c, d, etc.), it doesn't look to me like it works like that. You have to use numbers:

    SegmentedAVISource("D:\b.01.avi")
    Quote Quote  
  5. Member
    Join Date
    Apr 2008
    Location
    Israel
    Search Comp PM
    Quote:
    Also, can anyone give me some pointers on how to stitch .avi files with AviSynth when the fps and frame size are not the same?

    You don't. Not without making them all the same, and it doesn't look like SegmentedAVISource can do much about that. Even SegmentedDirectShowSource, while it can force them to all have the same framerate, can't force the same resolution:

    http://avisynth.org/mediawiki/SegmentedAviSource
    I realize I'm going to have to do some pre-processing for each file. Which functions should I use?

    Quote:
    SegmentedAVISource("D:\b.avi")

    If you're using letters (a, b, c, d, etc.), it doesn't look to me like it works like that. You have to use numbers:

    SegmentedAVISource("D:\b.01.avi")
    Nope, doesn't work.
    Quote Quote  
  6. Of course it won't work if the source files are all different. Not only do you have differences in framerate and resolution, but probably some audio differences as well that prevent them from being joined. I think that SegmentedAVISource was probably developed for captures which would all have the same properties to begin with, not downloaded AVIs from different sources and with different properties.
    I realize I'm going to have to do some pre-processing for each file. Which functions should I use?
    Encode them with all the same properties - codec, resolution, framerate, audio bitrate, etc. And after all that it still may not work. And if it does work you won't need to use SegmentedAVISource at all, as you'll be able to join them all using the Append button in VDub(Mod).

    You didn't say what the purpose of this little exercise is. If for DVD you don't even have to join them before doing the encoding.
    Quote Quote  
  7. Member
    Join Date
    Apr 2008
    Location
    Israel
    Search Comp PM
    Of course it won't work if the source files are all different.
    In this case there was just one file (see the script above) so no difference in properties. It still didn't work though.
    Quote Quote  
  8. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by dannoura
    Also, can anyone give me some pointers on how to stitch .avi files with AviSynth when the fps and frame size are not the same?
    AVISource("x-201.avi").LanczosResize(720,480).AssumeFPS(23.976) ++\
    AVISource("x-202.avi").LanczosResize(720,480).AssumeFPS(23.976) ++\
    AVISource("x-203.avi").LanczosResize(720,480).AssumeFPS(23.976)

    [post edited to correct error]


    The Assumefps seems to be necessary often even when the reported fps seems to be the same, but it must be slightly different.
    See http://avisynth.org/mediawiki/AssumeFPS

    In the case where the fps is really different (23.975 and 25 fps, say) you might want to do something like ChangeFPS.

    You might do Addborders as well as Resize if the proportions are different.
    Quote Quote  
  9. Originally Posted by dannoura
    In this case there was just one file (see the script above) so no difference in properties. It still didn't work though.
    Use some common sense then and just use AVISource. If it still doesn't work and you can't figure out why not, post the error message.

    AlanHK, won't you need periods after the AVISource and before the LanczosResize?
    Quote Quote  
  10. Banned
    Join Date
    Jun 2007
    Location
    UNREACHABLE
    Search Comp PM
    manono wrote:

    AlanHK, won't you need periods after the AVISource and before the LanczosResize?
    Well-spotted, dear Master.

    Anyway, it seems that the OP is trying to solve the difficult problems
    before having learned about the easy ones JMO.
    Quote Quote  
  11. If the files are significantly different it may be better to assign variables to each clip, make the changes on each clip to change to the same parameters, then stitch them together at the end.

    V1 = AviSource("File1.avi")
    V2 = AviSource("File2.avi")
    V3 = AviSource("File3.avi")

    V1 = Lanczos4Resize(V1, 720, 480)
    V2 = AddBorders(V2, 10,20,10,20)

    Return(V1 ++ V2 ++ V3)

    This can also allow you to easily test each clip to be sure you're getting the results you want by just specifying the specific clip in the Return() statement.

    Return(V2)
    "Shut up Wesley!" -- Captain Jean-Luc Picard
    Buy My Books
    Quote Quote  
  12. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by manono
    AlanHK, won't you need periods after the AVISource and before the LanczosResize?
    Right.
    I was simplifying an old script as an example, took too much out.
    Fixed it now.

    Or if doing it all in one line gets messy, do it in blocks:

    AVISource("x-207.avi")
    LanczosResize(720,480)
    AssumeFPS(23.976)
    EnsureVBRMP3sync()
    trim(120,220)
    AmplifydB(4.5)
    d7=last

    AVISource("x-208.avi")
    LanczosResize(720,480)
    AssumeFPS(23.976)
    EnsureVBRMP3sync()
    trim(120,220)
    AmplifydB(1.5)
    d8=last

    AVISource("x-209.avi")
    LanczosResize(720,480)
    AssumeFPS(23.976)
    EnsureVBRMP3sync()
    trim(120,220)
    AmplifydB(4.5)
    d9=last

    d7++d8++d9


    This way you can apply whatever filters you like on each file or segment separately befeor joining them.
    Quote Quote  



Similar Threads