PDA

View Full Version : Cannot join across mpg/avi/wmv


gamez
19th October 2007, 08:15
Hello,

I have found a strange behaviour of the different input filters one can use to read videos. I am trying to join (concatenate) three videos of type mpg, avi and wmv.

This works:
DirectShowSource("1.mpg")
\++DirectShowSource("2.avi")

and this works as well:
AVISource("2.avi")
\++DirectShowSource("3.wmv")

But this one fails
DirectShowSource("1.mpg")
\++AVISource("2.avi")

and this one also fails as well
DirectShowSource("2.avi")
\++DirectShowSource("3.wmv")
both with the Splice function reporting that the "video formats don't match".

Note: some resizing, fps- and audio resampling is performed after the import filters to align the characteristics of the three videos and allow splicing at all.

While I am also a bit curious about the difference between using DirectShowSource and AVISource on an avi video, my main question is: if I can join each of the two videos, why is it not possible to join all three?

Thx for your advice / help / explanations.

g.
:thanks:

davidhorman
19th October 2007, 09:29
The clips are probably in different colour spaces, and DSS/AviSource are probably returning different colour spaces for the same clip.

Try converttoyuy2 on each source:

DirectShowSource("2.avi").converttoyuy2+directshowsource("3.wmv").converttoyuy2

David

foxyshadis
19th October 2007, 16:53
Also use assumefps after each. It doesn't matter if it looks like the same framerate, it must be exactly the same numerator and denominator. In fact, everything Info() outputs must be exactly the same, but avisynth won't always tell you exactly which is the problem.

gamez
19th October 2007, 19:40
:thanks: :thanks: :thanks: :thanks: :thanks:

Info() helped me determine that there were indeed some remaining subtle differences that needed treatment with ConvertTo and AdjustFPS.

g.