VideoHelp Forum
+ Reply to Thread
Results 1 to 8 of 8
Thread
  1. Member
    Join Date
    Jul 2014
    Location
    London
    Search PM
    I've got a pretty large number of very large uncompressed avi files here, which I'm looking to join together into one single 80 or 90 minute avi file. These are VHS captures from various different tapes, but they were all captured on VirtualDub with the same settings. But, to keep audio/video sync, I had to check "Sync video to audio by adjusting video timing".

    When I try to join them together in VirtualDub, everything works perfectly... but the audio is now way out of sync in all the appended files. I've read the explanation on the VDub site so I (just about) understand why this is, but obviously it doesn't solve my problem.

    So I tried Avidemux, which works perfectly, in as much as everything's still in sync in the preview... but when the output file reaches 4gb, Avidemux promptly crashes. Seeing as 80 minutes of these uncompressed avis would probably come to more than 100gb, that's obviously a bit of a problem.

    All I need to know is: how can I join 25 or so uncompressed avis into one huge uncompressed avi file (which I'd then encode with something like Handbrake, making it into a more manageable 2gb file, probably an mp4)... without losing audio/video sync? They're all neatly edited and everything, and I'd be applying the filters etc. later on, I just need a direct copy - so if there's a command-line only program which would do it, I should be able to use that without getting too bogged down (I normally use Ubuntu, but I'm doing this work on a laptop running Windows 7, with which I'm not massively familiar). Ideally though, I'd like something with a GUI and a preview window so I know what I'm doing as I go along.

    I suppose another option would be to re-encode the segments into normal-sized avis, then join them in Avidemux to make a 2gb file which wouldn't crash while saving. But that's a last resort, because the picture is already poor enough on these ratty old vhs captures, i don't want to add an extra step if I can help it. I'd rather work in uncompressed avi right up to the final encoding.

    Thanks in advance for any help.
    Quote Quote  
  2. You could use an AviSynth script:

    Code:
    v1 = AviSource("file1.avi")
    v2 = AviSource("file2.avi")
    v3 = AviSource("file3.avi")
    
    v1++v2++v3
    Open the script in VirtualDub and save. A bit of a pain writing the script for 80 files though.
    Quote Quote  
  3. Member
    Join Date
    Jul 2014
    Location
    London
    Search PM
    Thanks, that sounds like it could be what I'm after.

    Agreed about the pain. I had to do it this way for various reasons - in part because the tapes were practically disintegrating and kept threatening to chew up. But joining them together is going to be a lot harder this way.

    Presumably, I'd get a non-encoded copy at the end of this? If so, I suppose I could join ten of them together at once, play around with the batches of ten to work out a running order, then join them all together later. That would take longer, but it'd be less of a chore.
    Quote Quote  
  4. Originally Posted by Ogron View Post
    Presumably, I'd get a non-encoded copy at the end of this?
    It depends on what codec you choose. If you choose nothing you get uncompressed. Better would be to install and choose a lossless codec. I use Lagarith although there are many.
    Quote Quote  
  5. Another benefit of doing it in an .avs first, is you can test the sync first (you can playback the script in a media player)

    Avisynth frameserves uncompressed audio & video, so yes - it will be a "non-encoded" copy unless you select a compression
    Quote Quote  
  6. AviSynth is a "frameserver". It delivers uncompressed frames to an editor or encoder. What you get in the end depends on what the editor or encoder does.
    Quote Quote  
  7. Member
    Join Date
    Jul 2014
    Location
    London
    Search PM
    Brilliant - I've just tested this out and it works perfectly. I figured there must be a command line program which would do this simply and unfussily, and it looks like AviSynth is the one. Thanks very much indeed.
    Quote Quote  
  8. what is the underlying reason for the appending sync issues in vdub? do you have a link to the discussion ?

    One option for the commandline only approach is to use ffmpeg's concat demuxer
    https://trac.ffmpeg.org/wiki/How%20to%20concatenate%20%28join,%20merge%29%20media%20files
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!