Log in

View Full Version : colorspace problem with overlay


Nocturno
19th March 2004, 15:13
hi all,

i've been trying for hours to add an image from a bmp picture to a part of an .m2v mpeg2 movie but i've got some problems.

my source is an NTSC dvd m2v file from a dvd menu. it's 2mins 54secs

first of all i tried to make a dvd2avi project file of my m2v and use mpeg2source,but for some reason it made my movie over 4 minutes long?

so i decided to use directshowsource (i don't like it either but it seemed to work).
now my time was correct and i used trim to cut my m2v in three parts.
a part before i want to add my bmp, the part with the bmp and the part after.
then i used overlay on the second part to add the bmp.
when i play this script in mediaplayer classic all is well, except it skips a bit on the change to the second part.
but when i encode it in CCE 2.5 my colors are screwed up.

here's my script :

----------------------------------------------------------------

LoadPlugin("D:\avi2dvd\filters\mpeg2dec3.dll")
#V1 is the videosource for the overlay part o1 is the overlay


#the three video parts are named p1,p2 and p3
p1 = DirectShowSource("E:\ROTK1\VIDEO_TS\test.m2v").Trim(0,2610)

#v1 and o1 are the main ingredients for the overlay p2
v1 = DirectShowSource("E:\ROTK1\VIDEO_TS\test.m2v").Trim(2611,4520)
logoMask =ImageReader("E:\ROTK1\VIDEO_TS\dutch2.bmp" , 0, 0, 29, false)
o1 = ImageReader("E:\ROTK1\VIDEO_TS\dutch2.bmp" , 0, 0, 29, false)

# Part 2 of the set is the part with the new button overlayed
p2 = Overlay(v1, o1, x=303, y=252, mode="blend", opacity=2.5,mask=logomask,pc_range=true) #,output="YUY2")
p3 = DirectShowSource("E:\ROTK1\VIDEO_TS\test.m2v").Trim(4521,0)

b1 = UnalignedSplice(p1,p2,p3)
b2 = Blankclip()
AudioDub(b1,b2)
ResampleAudio(44100) # needed for CCE 2.5
-----------------------------------------------------------------

i'm using avisytnh 2.54

the problem lies in the colorspace i presume but how do i fix it?

and yes i'm trying to "add" a button to an existing menu,i'll use menuedit later to "move" one of the other buttons settings over my new button.

sh0dan
19th March 2004, 15:23
What happends, if you end your script with ConvertToYUY2(interlaced=false).

... you could help us a lot by posting a screenshot.

Nocturno
19th March 2004, 16:16
you won't believe this, but i was looking through some tests i did to get some screenshots and i found out one of my conversions was actually fine.. but i don't know with what script i did it :( .
starting to think that maybe it's a decoder problem, not an avisynth one, because i must have checked the file earlier.. will test your solution anyway, thanx!

*damn it's definately a decoding problem.. ALL my test now play fine.. damned i didn't even reboot.. how can this be?

only problem that remains is the "skip" i get when it goes from p1 to p2 , and from p2 to p3 . could this be because of the directshowsource?