Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
1st July 2009, 03:56 | #1 | Link |
Registered User
Join Date: Jun 2007
Posts: 21
|
Video formats don't match - help!
Here's the avs script:
a=ImageSource("Club209.bmp", end=240, fps = 29.97). fadeio(28) d=directshowsource("e:\liveart\timelapse.avi") a+d VDubMod says video formats don't match. a is a 640x480, 24-bit, bmp image. d is a 640x480, 29.97, progressive Camstudio lossless codec avi file, with no audio. So it looks like the frame rate and frame size are the same. Both a and d work fine when played alone. Is this a colorspace problem? How would I fix it? |
1st July 2009, 04:19 | #3 | Link |
契約者
Join Date: Jun 2008
Posts: 1,576
|
Try this:
PHP Code:
directshowsource("e:\liveart\timelapse.avi").Info() Look for colorspace info there and then use appropriate Convertto___() function in your main script Last edited by Keiyakusha; 1st July 2009 at 04:38. |
1st July 2009, 05:34 | #4 | Link |
Registered User
Join Date: Jun 2007
Posts: 21
|
Thanks for the suggestions. It looks like this works:
a=ImageSource("Club209.bmp", end=240, fps = 29.97). fadeio(28). converttoRGB32 d=directshowsource("e:\liveart\timelapse.avi", fps=29.97) a+d ImageSource outputs RGB24, but the Camstudio codec outputs RGB32. However, after making everything RGB32, I still got a framerate mismatch error. This was true even though both show 29.97 when played alone. Adding the framerate specifier to the video fixed it, and now everything works fine. My guess is there's something about Camstudio, or perhaps DirectshowSource, that mis-reports the framerate in some way, so you have to specify what it actually is. Anyway, this method works really well to add titles or end credits to videos, with nice fade transitions. |
1st July 2009, 09:54 | #5 | Link |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
Most probably, the frame rate of your video is not exactly 29.97, but 30000/1001, the standard NTSC rate. To match an image to a video, the most reliable way is like this:
d=directshowsource("e:\liveart\timelapse.avi") a=ImageSource("Club209.bmp", end=240, fps=Framerate(d), pixel_type="RGB32").fadeio(28) a+d As shown, you can also specify the RGB32 directly in the ImageSource rather than converting afterwards. |
2nd July 2009, 04:23 | #6 | Link | |
Registered User
Join Date: Jun 2007
Posts: 21
|
Quote:
|
|
Thread Tools | Search this Thread |
Display Modes | |
|
|