PDA

View Full Version : Join Clips


duchamp
30th December 2005, 14:02
Can i join 4 clips(with 4 video + 4 audio) in VDMod using script?
I tried Avisynth before, it only output YUY2. I just want to join 4 clips using direct stream copy method in VDMod.
Anyone could help me. :confused:

Skywalkerjen
31st December 2005, 01:23
Can you use AviMux GUI to join video together? That's what I use for joining but you may need to check audio lengths as synch problems may occur.

gatekeeper_007
31st December 2005, 14:53
Can i join 4 clips(with 4 video + 4 audio) in VDMod using script?
I tried Avisynth before, it only output YUY2. I just want to join 4 clips using direct stream copy method in VDMod.
Anyone could help me. :confused:


I don't know if I understood u corectly but if I did then:

* if the video & the audio are separate in u'r clips, u should first join them together. (use Vdubmod to 'save wave' from the audio)....
load any .avi file u want into the Vdubmod go to the streams and load the audio stream u like, hit the 'save wave' button, then 'ok', finaly f4 -and save it. After that u can join the video with the audio via vdub as u please 'compressed or not' I guess u know how.
___If u'r gettin' synch problems and u don't know how much - or + the -?ms from the audio are ,I can't really help u. Once I had this problem and I did that --> (if the voice is before the person talk's (-) and the other way, try to find it use -16ms if it dosen't fit use -..?ms.. till u find it).

_____if u don't have problems like that____ u can join them:

1. use Vdub and 'open video file' /open the 1st clip and drag the slider to the very last frame.
2. then ' Append Avi segment ' /open the 2nd clip and drag the slider to the very last frame.
3. ...
4. 'f7' (save), f4 (start) ....
_______U should select video&audio 'direct stream copy'_____

Skywalkerjen
1st January 2006, 01:56
I'd join them with Avimux GUI rather than vdub.

The problem with audio going out of synch when joining videos together is usually due to the audio track being shorter than the video track.
When you join them the video is joined back to back and the audio is joined back to back.

What happens is:

1. The first video and audio are in synch - no problem there.
2. The first audio track is NOT as long as the first video track.
3. When the second video is added, the second video's audio track is attached to the end of the first video's audio track.
4. This means the audio track from the second video is now starting at the very end of the first video - it is playing over what is left of the slightly longer first video track.
5. By the time the second video starts, the second video audio has already played a few hundred milliseconds and is now out of synch.

The way to solve this problem is to find out how long the audio track is and how long the video track is for each segment.
You then need to delay the audio tracks the correct amount for each subsequent video.
What will happen is each of your individual videos will have audio out of synch by an amount depending on the difference between audio and video from the previous video (!), but when they are joined together they will be perfectly in synch.

The problem I have run into and no one has offered a solution is which program to use to find the correct length of the audio track.

Previous thread about which program correctly reports audio track length (http://forum.doom9.org/showthread.php?t=104399)

Sorry it's such a long reply but I find very little is straight forward in digital video! Please ask if you need the above explaining in finer detail or with examples as I find it fairly hard to get my head around the process...

duchamp
1st January 2006, 13:46
Finally, AviMux GUI can help. (Also output 4GB Segment video that VDMod can't)
Sould i do those processes usning VirtualDubMod Script?

I can only do that using Avisynth. The scripts are in the following:
FilePrefix = "ClipName"

v1 = AviSource (FilePrefix + "_1.avi")
v2 = AviSource (FilePrefix + "_2.avi")
v3 = AviSource (FilePrefix + "_3.avi")
v4 = AviSource (FilePrefix + "_4.avi")

a1 = WavSource (FilePrefix + "_1.wav")
a2 = WavSource (FilePrefix + "_2.wav")
a3 = WavSource (FilePrefix + "_3.wav")
a4 = WavSource (FilePrefix + "_4.wav")

dub1 = AudioDub (v1, a1)
dub2 = AudioDub (v2, a2)
dub3 = AudioDub (v3, a3)
dub4 = AudioDub (v4, a4)

UnalignedSplice(dub1, dub2, dub3, dub4)

But i dont want to re-encode the clip again.

Skywalkerjen
1st January 2006, 16:10
No you don't need to re-encode the video.
All Avimux is doing is repackaging your video into the AVI container.

The way I would do it is to take each individual and mux the audio to the video.
Then just load all four into Avimux and it will join them together for you.

You may well run into the audio synch problem in the joined video when you get to the second video segment location in which case you need to delay the audio of each one in turn before joining them together.

Open video 1 in VDMod and use the file properties to find the length of the video.
Then go to the stream list and check the length of the soundtrack.
If they are the same lengths then you'll have no problem joining them together.

errorxp
20th February 2006, 18:44
hi
virtualdub shows
video length: 1:11:27.07
audio length: 1:11:27.04

So what's the delay for the second video file? 30 ms?

Skywalkerjen
20th February 2006, 18:55
I don't think you can join different audio codecs together - I've never tried.

Is it allowing you to join them?

If not I'd probably convert the ac3 audio track to mp3 so both are the same.
BeSweet does that I think.

errorxp
20th February 2006, 18:58
I don't think you can join different audio codecs together - I've never tried.

Is it allowing you to join them?

If not I'd probably convert the ac3 audio track to mp3 so both are the same.
BeSweet does that I think.

it was my mistake, it was ac3 in the original file :)

but about the delay...