I can’t seem to figure out why this is happening. I have a transparent png overlay on video and the overlay looks really bad. The red shapes are blurry on the edge. I’m using the same code I have in the past so I’m not sure why this is happening now.
This is what it look like.
http://mo-de.net/d/wtf.jpg
The png file.
http://mo-de.net/d/1.png
This is the code.
#Start trimming Audio
main_explanation=WAVSource("C:\projects\video_edit ing\projects\howto\AY_Repetitive_I\acrobaticyoga_R epetitive_I_6\acrobaticyoga_Repetitive_I_6.wav")
at1=AudioDub( BlankClip(a, audio_rate=44100, Ceil (main_explanation.AudioLengthF()/main_explanation.AudioRate()*a.FrameRate())) , main_explanation)
at1=at1.trim ((3+0)*30,(25+0)*30).KillVideo()
#End trimming Audio
overlay_explain_1_image=ImageReader("C:\projects\v ideo_editing\projects\howto\AY_Repetitive_I\acroba ticyoga_Repetitive_I_6\1.png",pixel_type="RGB32")
lex_explain_overlay_1=atrim1.trim((10+0)*30+10,(10 +0)*30+10).killAudio().loop(Ceil (at1.AudioLengthF()/at1.AudioRate()*a.FrameRate()) ).overlay (overlay_explain_1_image, mode="blend", mask=overlay_explain_1_image.ShowAlpha(pixel_type= "RGB32") , x=0, y=0, opacity=0.30)
lex_explain_overlay_1=AudioDub(lex_explain_overlay _1, at1)
center_overlay=ImageReader("C:\projects\video_edit ing\projects\howto\AY_Repetitive_I\acrobaticyoga_R epetitive_I_6\9.png",pixel_type="RGB32")
center_line=AudioDub(LexExplain.trim((2*60+4)*30,( 3*60+0)*30), at9)
\.overlay (center_overlay, mode="blend", mask=center_overlay.ShowAlpha(pixel_type="RGB32") , x=0, y=0, opacity=0.30).Amplify(2)
overlay_all_together= lex_explain_overlay_1++center_line.ConvertToRGB32 ()
+ Reply to Thread
Results 1 to 5 of 5
-
-
I suspect what you are seeing is just the result of 4:2:0 chroma subsampling (colored edges will always be a little fuzzy in YV12).
Last edited by jagabo; 15th Aug 2010 at 07:35.
-
Are you seeing those artifacts before compression or after? Here's what I see using Overlay() and the overlay image shifted to the left by 200 pixels.
src=ImageSource("wtf.jpg").ConvertToRGB32()
over=ImageSource("1.png", pixel_type="RGB32")
alpha=ShowAlpha(over)
Overlay(src, over, mask=alpha, x=-200, y=0, opacity=0.30, mode="blend")
after converting to YV12 (4:2:0 chroma subsampling):
The second image was made by adding ConvertToYV12() at the end of the script. All high compression codecs work in YV12. What you're seeing is worse than just 4:2:0 chroma subsampling.Last edited by jagabo; 15th Aug 2010 at 17:26.
-
Jagabo, that looks better. I will try this and see what happens. Thanks
[Edit]
[ Solved Solution ]
As jgabo said and it works I converted all the movies to this color space and everything looks great ".ConvertToYV12()"Last edited by lindylex; 15th Aug 2010 at 23:23.
Similar Threads
-
Using AVISynth to overlay PNG subtitles?
By csdesigns in forum SubtitleReplies: 8Last Post: 3rd Feb 2012, 11:36 -
avisynth - overlay fadein from transparent
By doma79 in forum EditingReplies: 12Last Post: 6th Dec 2011, 11:38 -
VirtualDub unable to open avisyth scripts
By suroit in forum EditingReplies: 17Last Post: 19th Dec 2010, 15:13 -
YUYV to TIFF or PNG, or better yet, PNG to YUYV
By ekztal in forum EditingReplies: 18Last Post: 29th Dec 2009, 22:35 -
HDV to PNG to Procoder
By kippard in forum Video ConversionReplies: 1Last Post: 4th Feb 2009, 12:56