Log in

View Full Version : RGB in AviSynth (and MeGUI)


byme
24th October 2008, 14:17
Is possible use the RGB in the MeGUI without creating artifacts?

The IV12 creates darkened and blur


YV12

http://www.plurkpix.com/pix/7sd.png


RGB

http://www.plurkpix.com/pix/7sf.png

Guest
24th October 2008, 14:24
I deleted your OT signature spam. Do not restore it.

byme
24th October 2008, 14:34
I deleted your OT signature spam. Do not restore it.

ok, sorry

byme
24th October 2008, 15:44
or as an good alternative to megui?

Didée
24th October 2008, 16:11
It doesn't matter. You can use RGB on the road to the encoder, but even then, at latest the encoder will use YV12 anyway.

byme
24th October 2008, 16:46
then also with Avidemux converts it to YV12?

kemuri-_9
24th October 2008, 18:42
afaik, the only program that megui has that can work with non YV12 colorspace is ffmpeg,
but most encoders (even within ffmpeg) use YV12 because of the amount of raw data it has compared to RGB makes YV12 more compressible.

if you're looking to compress it well, then convert it to YV12 within avisynth (may need to specify a matrix to keep the colors right).
if you're just looking to compress it compared to the raw format, then LAGS (lagarith) or FFV1 work for RGB.

byme
24th October 2008, 21:25
ffmpeg do not understand how it works :(

I understand few English and I have some difficulty

...

sorry if I go off topic.....

I would like to use this logo

http://www.plurkpix.com/pix/7tN.png

PSD http://www.psdnow.com/download/file/1tmGSosOEH/


the result is enough disastrous

http://www.plurkpix.com/pix/7tK.png


can someone help me?

poisondeathray
25th October 2008, 00:04
I don't understand what you are trying to do? Use that image and make it into video sequence using x264 and MeGUI?

What script are you using? ImageSource() ?

byme
25th October 2008, 17:44
I don't understand what you are trying to do? Use that image and make it into video sequence using x264 and MeGUI?

What script are you using? ImageSource() ?
I use

VD_Logo(filename="C:\edit\temp\logo",x=8,y=8,alpha=255,transparent=true,xr=0,xg=0,xb=255,tolerance=127)

byme
25th October 2008, 17:48
which GUI recommended to use for ffmpeg?

I tried AutoFF but does not work

I tried MEncoder but I will not meet

poisondeathray
25th October 2008, 18:07
One option: you can use avidemux's logo filter to superimpose a logo from a .png or .bmp image, and encode to x264

e.g. TDK apple movie trailer:

http://i38.tinypic.com/r8i9n6.png

Guest
25th October 2008, 18:50
VD_Logo(filename="C:\edit\temp\logo",x=8,y=8,alpha=255,transparent=true,xr=0,xg=0,xb=255,tolerance=127) Is your logo file a 24-bit BMP as required for this filter? If so, what is your complete script?

byme
25th October 2008, 19:07
Is your logo file a 24-bit BMP as required for this filter? If so, what is your complete script?

the script fo MeGUI is


Import("C:\edit\VD_Logo.avsi")
LoadPlugin("C:\edit\gradfun2db.dll")
Import("C:\edit\GradFunkMirror.avs")

####

AviSource("C:\edit\video.avi")
ConvertToRGB()
VD_Logo(filename="C:\edit\temp\logo.bmp",x=8,y=8,alpha=255,transparent=true,xr=0,xg=0,xb=255,tolerance=127)
ConvertToYV12()
GradFunkMirror()


why?


however I solved the problem of logo (apart the problem of the YV12)

This is the result

http://www.plurkpix.com/pix/7xO.png

Guest
25th October 2008, 19:12
why? Why what?

Post a link to the logo.bmp file and I'll figure out what the problem is.

byme
25th October 2008, 19:15
Why what?

Post a link to the logo.bmp file and I'll figure out what the problem is.

you are right :p


.. Now I thought the problem with ffmpeg

Guest
25th October 2008, 19:18
I asked you for two things and you didn't provide either of them.

And I don't know why you say I am right, because I did not make any assertions in my post.

I'm hearing the Twilight Zone music in my head.

byme
25th October 2008, 19:25
Excuse me, maybe I have not explained well

I do not speak English very well

Guest
25th October 2008, 19:30
Will you give me the thing I need to help you, that is, a link to the logo.bmp file?

Or have you solved your problem and don't need my help now?

byme
25th October 2008, 19:41
I solved the problem of the logo but not the problem of the YV12 and ffmpeg

Guest
25th October 2008, 19:49
You haven't told us about these new problems. What is your ffmpeg command line?

byme
25th October 2008, 20:09
I haven't a command line..... I did not understand how ffmpeg :o

Guest
25th October 2008, 20:12
OK. Then what is the YV12 problem that you still have?

byme
25th October 2008, 20:48
that I wrote on the first page

the IV12 creates darkened and blur

.. you can explain how ffmpeg?

kemuri-_9 writes:

the only program that megui has that can work with non YV12 colorspace is ffmpeg

Guest
26th October 2008, 00:24
You never told us how you made the result in the first post!

Tell us exactly what you did to make that happen.

This thread is beginning to resemble a Monty Python sketch.

byme
26th October 2008, 00:39
aaargh! as I never told us?



Import("C:\edit\VD_Logo.avsi")
LoadPlugin("C:\edit\gradfun2db.dll")
Import("C:\edit\GradFunkMirror.avs")

####

AviSource("C:\edit\Nuova cartella\_All Music_rgb.avi")
ConvertToRGB32()
VD_Logo(filename="C:\edit\temp\logo.bmp",x=8,y=8,alpha=255,transparent=true,xr=0,xg=0,xb=255,tolerance=127)
ConvertToYV12()
GradFunkMirror()

http://img183.imageshack.us/img183/5638/logolilladx8.png (http://imageshack.us)

http://www.weepic.com/out.php/t3202_Snap1.png (http://www.weepic.com/out.php/i3202_Snap1.png)

Guest
26th October 2008, 01:00
What happens if you leave off the GradFunkMirror() line?

One more time, can you give me the logo.bmp file? How many times do I have to ask?

byme
26th October 2008, 15:53
GradFunkMirror use this to remove the imperfections of color created by YV12

the logo is always that

http://img183.imageshack.us/img183/5638/logolilladx8.png (http://imageshack.us)

not there?

but this logo does not interest me most

the logos that now using are these

http://www.picpanda.com/images/62asoymsj2bphenjq0o.bmp (http://www.picpanda.com/)

http://www.picpanda.com/images/de1nl0ajolo05dog26zg.bmp (http://www.picpanda.com/)

Guest
26th October 2008, 16:03
I asked what happens when you do it without GradFunkMirror! You did not answer me. The point is that GradFunkMirror may be the cause of your problem.

byme
26th October 2008, 16:08
no, not GradFunkMirror to create the problem

the result is the same with or without GradFunkMirror

http://img183.imageshack.us/img183/5638/logolilladx8.png

http://www.picpanda.com/images/62asoymsj2bphenjq0o.bmp

http://www.picpanda.com/images/de1nl0ajolo05dog26zg.bmp

Guest
26th October 2008, 16:23
I don't see any problem in the images you just posted. Are you jerking my chain?

This works fine for me (don't import anything because I put them in the code below, use the script as is):

loadplugin("gradfun2db.dll")

global VD_plugins = "d:\Virtualdub 1.8.6\plugins"

function VD_Logo(clip clip, int "x", int "y",
\ int "alpha", bool "transparent",
\ int "xr", int "xg", int "xb",
\ int "tolerance", string "filename",
\ bool "animate", int "start", int "duration", int "loops",
\ int "fadeinlen", int "fadeoutend", int "fadeoutlen")
{
LoadVirtualdubPlugin(VD_plugins+"\logo.vdf", "_VD_Logo", 0)
return clip._VD_Logo(default(x,5), default(y,5),
\ default(alpha,128), default(transparent,true)?1:0,
\ default(xr,0), default(xg,0), default(xb,0),
\ default(tolerance,10),
\ default(filename,VD_plugins+"\logo.bmp"),
\ default(animate,false)?1:0,
\ default(start,0), default(duration,0), default(loops,0),
\ default(fadeinlen,20), default(fadeoutend,300),
\ default(fadeoutlen,20))
}

Function GradFunkMirror( clip c, float "strength" )
{
strength = default( strength, 1.2 )
w = c.width()
h = c.height()
vflip = c.FlipVertical()
hflip = c.FlipHorizontal()

stackhorizontal( hflip.crop( w-16, 0, 16, h ).addborders( 0, 16, 0, 16 ),
\ stackvertical( vflip.crop( 0, h-16, w, 16 ), c, vflip.crop( 0, 0, w, 16 ) ),
\ hflip.crop( 0, 0, 16, h ).addborders( 0, 16, 0, 16 ) )
gradfun2db( strength )
crop( 16, 16, -16, -16 )

Return last
}

BlankClip(color=$808080)
ConvertToRGB32()
VD_Logo(filename="e:\tmp\logo.bmp",x=8,y=8,alpha=255,transparent=true,xr=0,xg=0,xb=255,tolerance=127)
ConvertToYV12()
GradFunkMirror() Replace BlankClip() with your AVISource() line.

foxyshadis
27th October 2008, 07:16
He's stressing about the very faint chroma blurring that ConvertToYV12 causes; it washes out the bright white and black edges somewhat. Sorry, byme, there is no cure. Besides, any encoding will only blur them even more, so it isn't worth worrying.

Use translate.google.com if you have to, or people might not be able to help you.

Guest
27th October 2008, 13:47
He's stressing about the very faint chroma blurring that ConvertToYV12 causes; it washes out the bright white and black edges somewhat.
I see no such effect on the output from the script I posted above. Can you be specific about the specific problem he is now talking about?

byme
27th October 2008, 19:51
I don't see any problem in the images you just posted. Are you jerking my chain?

This works fine for me (don't import anything because I put them in the code below, use the script as is):

loadplugin("gradfun2db.dll")

global VD_plugins = "d:\Virtualdub 1.8.6\plugins"

function VD_Logo(clip clip, int "x", int "y",
\ int "alpha", bool "transparent",
\ int "xr", int "xg", int "xb",
\ int "tolerance", string "filename",
\ bool "animate", int "start", int "duration", int "loops",
\ int "fadeinlen", int "fadeoutend", int "fadeoutlen")
{
LoadVirtualdubPlugin(VD_plugins+"\logo.vdf", "_VD_Logo", 0)
return clip._VD_Logo(default(x,5), default(y,5),
\ default(alpha,128), default(transparent,true)?1:0,
\ default(xr,0), default(xg,0), default(xb,0),
\ default(tolerance,10),
\ default(filename,VD_plugins+"\logo.bmp"),
\ default(animate,false)?1:0,
\ default(start,0), default(duration,0), default(loops,0),
\ default(fadeinlen,20), default(fadeoutend,300),
\ default(fadeoutlen,20))
}

Function GradFunkMirror( clip c, float "strength" )
{
strength = default( strength, 1.2 )
w = c.width()
h = c.height()
vflip = c.FlipVertical()
hflip = c.FlipHorizontal()

stackhorizontal( hflip.crop( w-16, 0, 16, h ).addborders( 0, 16, 0, 16 ),
\ stackvertical( vflip.crop( 0, h-16, w, 16 ), c, vflip.crop( 0, 0, w, 16 ) ),
\ hflip.crop( 0, 0, 16, h ).addborders( 0, 16, 0, 16 ) )
gradfun2db( strength )
crop( 16, 16, -16, -16 )

Return last
}

BlankClip(color=$808080)
ConvertToRGB32()
VD_Logo(filename="e:\tmp\logo.bmp",x=8,y=8,alpha=255,transparent=true,xr=0,xg=0,xb=255,tolerance=127)
ConvertToYV12()
GradFunkMirror() Replace BlankClip() with your AVISource() line.

the result does not change

thanks anyway for the interest

Guest
27th October 2008, 19:52
What result are you talking about?

EuropeanMan
31st October 2008, 06:06
Foxyshadis is right...there is deviation in the form of blurring in chroma. That's the result byme is referring to. He/she wants to eliminate that in the conversion process to the colourspace.

Now he/she knows it is not possible. It would have been better IMHO to get to lag, then feed that to megui and it gets converted to yv12 automatically...instead of doing it all at once to megui...again, that's just MY opinion.