PDA

View Full Version : Help joining wav and wmv files


jjones3535a
7th January 2009, 22:52
Hi,

I have a series of wav and wmv files. I'm trying to join the files into a single video file. I simply need to append the files back to back to back.

I have this so far and it works fine for 2 files:

A = DirectShowSource("_2.wmv",15,convertFPS=TRUE)
B = DirectShowSource("_1.wav") # No audio stream
A ++ AudioDub(B, BlankClip(A))

The problem is, I have a bunch of files (wav and wmv) in different orders. I can't figure out how to keep appending files. Ideally I'd just like to do this (pseudocode):

1.wmv ++ 2.wmv ++ 1.wav ++ 3.wmv ++ 2.wav

and other such combinations like this:

2.wav ++ 3.wmv ++ 2.wmv ++ 1.wav etc.....

But this doesn't work as I get this error message: "Splice: one clip has video and the other doesn't (not allowed)"

Any help would be greatly appreciated.

Thanks.

hanfrunz
8th January 2009, 08:38
you could write a function that detects if the input is video and/or audio and always returns video+audio. Then you could do something like myfunction("file.wmv") + myfunction("file2.wav")

regards,
hanfrunz

jjones3535a
9th January 2009, 02:37
Thanks for the response, but I got it sorted out.