View Full Version : YV12 FAQ
Wilbert
4th November 2002, 11:22
The YV12 FAQ is moved to avisynth.org (http://avisynth.org/mediawiki/FAQ_YV12).
Koepi
4th November 2002, 11:31
Very nice FAQ, finally all links and necessary information collected! :)
EDIT: edited out the points, they made it into the FAQ :) Thanks Wilbert for assembling and maintaining it!
Best regards
Koepi
Wilbert
4th November 2002, 12:03
@Koepi,
I will remove vdub-mpg2 if vdub-mod comes with a first release. I have added your other point.
iago
4th November 2002, 16:54
Thanks Wilbert! Great collection of information and necessary tools!
droolian01
4th November 2002, 17:25
Really excellent guide and link resource - obviously needs to be made a sticky!
WARNING - DUMB QUESTION ALERT ! ! !
I can see (i think) how YV12 will be quicker to process than YUY2 (working with 12 bits/pixel instead of 18 bits/pixel) but (now this MAY be the dumb part) will this mean that the same 'data' can be stored in 3/4 of the file space compared to YUY2? Because if this is the case quality should increase too on a 'same filesize' basis.
Could anyone confirm that this is the case?
sh0dan
4th November 2002, 17:47
Originally posted by droolian01
I can see (i think) how YV12 will be quicker to process than YUY2 (working with 12 bits/pixel instead of 18 bits/pixel) but (now this MAY be the dumb part) will this mean that the same 'data' can be stored in 3/4 of the file space compared to YUY2?
Only when dealing with uncompressed data. DivX/Xvid and other MPEG4 formats already store in YV12 format. So when you pass 16 bit/pixel YUY2 it is converted to YV12 before it is compressed. Skipping this is what's giving you the speed increase.
@Wilbert: Couldn't you make an "alpha notice" in the top of the FAQ. Many functions are quite badly tested, and some may even return bad data or crash. Most Doom9 users are pros, but I don't see the program fit for everyone (yet).
droolian01
4th November 2002, 17:56
@ shOdan
Thanks for clearing this up for me.
What with the developments in XVID and avisynth2/vdub using YV12 these are very exciting times indeed!
Great work - and i'll try and do some testing if i can.
Thanks again.
sh0dan
4th November 2002, 19:52
Originally posted by droolian01
What with the developments in XVID and avisynth2/vdub using YV12 these are very exciting times indeed!
I haven't heard anything specific - VdubMod hasn't had the YV12 fix committed (even though I posted it in the development thread) - Belgabor?
I don't know how Xvid is coming along - I'm still using DivX, but I'm actually quite tired of it (it gives me a bunch of internal access violation, making debugging very tiresome). Is the newest XVID capable of decoding YV12 to other formats (Koepi?)
Koepi
4th November 2002, 20:25
It claims to decode YV12 but just spits out a black picture - but it works for encoding purposes, if that suffices for your needs.
Regards,
Koepi
JohnMK
4th November 2002, 21:41
What I'm basically wondering is, and it may be answered above but in language I can't understand, is this new YV12 support in VDub/Avisynth something I can begin using immediately, given the fact that I use the DVD2AVI & GordianKnot, etc.?
vlad59
4th November 2002, 21:54
As it's explained, it's in an alpha stage and
as stated in Sh0dan web page all external filter need a new compile before being usable with avisynth 2.5. So Decomb, TemporalSmoother, TomsMoComp, ...... are not usable at all now.
So I'm afraid it's not ready for today's use ;).
EDIT : I think that YV12 has so many advantages that it shouldn't be too long. all avisynth filters developpers really owe a lot to Sh0dan.
hakko504
4th November 2002, 21:54
@JohnMK
Yes, as long as you only uses the internal filters stated on sh0dan's alpha page. the only external plugin that works is the YV12 version of MPEG3DEC, but given that you edit the GKnot script to use this .d2v import function it will work.
JohnMK
4th November 2002, 22:01
Thank you vlad59, hakko. Appreciated your comments. This should be added to the FAQ. It will be a frequently asked question, I'm sure . . . :)
sh0dan
4th November 2002, 23:56
OK - I spend a few hours converting (and debugging) milan's YV12 optimized version of WarpSharp. It's quite fast aleady. I made a few adjustments to it, but nothing major.
Be very careful - you cannot use it after a crop, since ffdshow assumes that input pitch = output pitch! This will give the wellknown distorted pictures! I hope someone else has the time to take up the challenge?
I also have a ColorYUV lying at home, so people shouldn't bother converting it - it's already done!
Edit: It's on the alpha page - forgot to tell ya ;)
Wilbert
5th November 2002, 10:56
I added the plugins WarpSharp and Undot. For JohnMK I changed Q10 a bit :)
JohnMK
10th November 2002, 03:53
What is WarpSharp? Forum search turned up no definition, and indeed downloading WarpSharp . . . tells me nothing as there's no "Here's what this is" section, probably because there's no readme whatsoever. :D
MaTTeR
10th November 2002, 04:25
Quick Google search shows-
http://www.virtualdub.org/virtualdub_filters
http://web.syr.edu/~tjmyers/both_filters.html
Lots more too.
JohnMK
10th November 2002, 09:39
Ahhh excellent, the one source I forgot to consult. Thank you for your kind and generous assistance.
HarryM
10th November 2002, 09:52
@Wilbert, @Koepi:
Do exists any MJPEG codec (for TV grabbing) with native YV12 support?
I use morgan-multimedia's MJPEG (v3.0) and this have only 4:2:2 (YUY2) or 4:1:1 support.
4:2:0 (YV12 for Avisynth 2.5) don't... :(
sh0dan
10th November 2002, 16:34
When I open MJPEG files with YV12, using Morgan, it has swapped the UV channels (giving me I420 instead of YV12). I'll do a SwapUV function shortly. I'm using an older version of Morgan, so it might be fixed in the latest version.
HarryM
10th November 2002, 17:01
Originally posted by sh0dan
When I open MJPEG files with YV12, using Morgan, it has swapped the UV channels (giving me I420 instead of YV12). I'll do a SwapUV function shortly. I'm using an older version of Morgan, so it might be fixed in the latest version.
Thanks for answer.
Can you implement 'SelectRangeEvery' function (for fast compresibility check) too?
sh0dan
11th November 2002, 16:59
How is it different from selectevery?
vlad59
12th November 2002, 09:56
SelectRangeEvery was included in mpeg2dec.dll by Dividee. I think it's now removed from mpeg2dec3 (by MarcFD) so adding this filter in YV12 is juste a matter of compile.
I can do that tonight.
sh0dan
12th November 2002, 10:31
Couldn't it simply be included in AviSynth 2.5 (or is that what you meant). The old filters no longer works anyway, so why not just add it as an internal feature?
HarryM
12th November 2002, 10:49
Originally posted by sh0dan
Couldn't it simply be included in AviSynth 2.5 (or is that what you meant). The old filters no longer works anyway, so why not just add it as an internal feature?
SelectRangeEvery is 'must be' for GordianKnot (compresibility check in this famous rip program). I know, actual version GK isn't compatible with Avisynth 2.5, but future...
HarryM
12th November 2002, 10:51
Originally posted by HarryM
SelectRangeEvery is 'must be' for GordianKnot (compresibility check in this famous rip program). I know, actual version GK isn't compatible with Avisynth 2.5, but future...
I am not (big) programmer, but I think, that implementation of 'SelectRangeEvery' direct into Avisynth2.5 is very easy (few lines of code).
vlad59
12th November 2002, 10:52
Yes it should be included in avisynth 2.5 .
If you need the original code I can send it to you (adding it to field.cpp is just a matter of copy/paste) or if you don't have time I can do this for you.
HarryM
12th November 2002, 10:58
Originally posted by sh0dan
How is it different from selectevery?
SelectRangeEvery is very similar to SelectEvery.
SelectEvery works with alone frames, SelectRangeEvery work with intervals of frames.
E.g.
SelectRangeEvery(280,14)
Select this frames
0 to 13, 280 to 293, 560 to 573, etc.
HarryM
12th November 2002, 11:07
Originally posted by vlad59
Yes it should be included in avisynth 2.5 .
If you need the original code I can send it to you (adding it to field.cpp is just a matter of copy/paste) or if you don't have time I can do this for you.
Sorry, but i have no experiences with C++ programing and with team programing. :(
I use relative often VisualBasic or sometime Delphi only.
vlad59
12th November 2002, 11:23
@HarryM
Sorry while posting I was answering to Sh0dan but in the meanwhile you posted two answer too.
So I'll make the modification. don't worry.
sh0dan
12th November 2002, 12:23
@vlad: I'm doing modifications on field.cpp (I think there is a bug in Separatefields()) today, so feel free to mail or PM me the sources.
JohnMK
15th November 2002, 13:23
If someone could make available the SelectRangeEvery-capable binary of mpeg2dec3.dll, I'd be so appreciative. :D
vlad59
15th November 2002, 14:30
Originally posted by JohnMK
If someone could make available the SelectRangeEvery-capable binary of mpeg2dec3.dll, I'd be so appreciative. :D
SelectRangeEvery will be added in avisynth 2.5's core. So we just have to wait till a new alpha release of avisynth dll.
JohnMK
15th November 2002, 14:59
Could that be today please? :D This is so fundamental.
vlad59
15th November 2002, 15:30
I checked CVS and this function is already added. I won't be able to compile before 5 or 6 hours.
And I don't know if it a really good idea to compile this fresh checkout (I don't know if Sh0dan is modifying something).
JohnMK
15th November 2002, 17:30
How about the old compile + this function?
SansGrip
17th November 2002, 19:11
Question 6:
FluxSmooth (http://forum.doom9.org/showthread.php?s=&threadid=38296) supports 2.5/YV12 as of 0.2 :).
Richard Berg
18th November 2002, 04:09
Be very careful - you cannot use it after a crop, since ffdshow assumes that input pitch = output pitch! This will give the wellknown distorted pictures! I hope someone else has the time to take up the challenge?
Is it more complicated than replacing every instance of 'width' with 'pitch'?
Anyway, I suppose it's about time I figured out how to work with the CVS branch...
JohnMK
18th November 2002, 19:52
I just wanted to thank everyone who's made this possible. My encodes are easily -- easily 20-30% faster, just as you say. And quality doesn't look any less. In fact, theoretically, it's better, right?
sh0dan
19th November 2002, 14:30
Originally posted by Richard Berg
Is it more complicated than replacing every instance of 'width' with 'pitch'?
Anyway, I suppose it's about time I figured out how to work with the CVS branch...
1) Unfortunately, yes. It uses both pitch and width, but it only uses ONE pitch. And when input and output images have different pitch, the pictures it distorted. I have an "almost" working version, but there are still one wrong pitch I'm having troubles finding.
2) It's really easy, just use the "avisynth_2_1" branch name to get access to the files.
rocker60
19th November 2002, 19:42
Can anyone please tell me why TestSub.VDF from Gabest-VobSub don't work in YV12?
It's suposed to work in YUY2 and YV12...
Everytime i try to load in VdMod a .AVS script with a TestSub in it, it crash withouth any
error messages.
Thx.
P.s: Keep the great work in Avisinth_Yv12!!!
SansGrip
19th November 2002, 23:21
Question 6:
Blockbuster (http://forum.doom9.org/showthread.php?s=&threadid=37135) supports YV12 as of 0.5 :).
Wilbert
20th November 2002, 10:29
Can anyone please tell me why TestSub.VDF from Gabest-VobSub don't work in YV12?
It's suposed to work in YUY2 and YV12...
Yes, because textsub/vobsub doesn't work in YV12. Gabest told me that only dvobsub works also in YV12. I asked him to make a version for AviSynth 2.5 but there are some issues he want to see resolved. Sh0dan knows more about this ...
sundance
22nd November 2002, 16:57
Being an absolute rookie to this color space stuff:
Could anyone please point out, how the bits of the YUV components are allocated to the 12 bits of YV12?
How's it with YUY2 (are there 16 or 18 bits)?
And how is "4:2:2" or "4:2:0" related to the above?
smokeslikeapoet
23rd November 2002, 04:26
@sundance
You can view technical information about YV12 here:
http://www.fourcc.org/fccyuv.htm#YV12
I've digested the information and posted it here:
http://www.everwicked.com/forums/showthread.php?s=&threadid=1645
I knew very little about colorspace before a few hours of research a few days ago.
sundance
23rd November 2002, 09:16
@smokes,
thanks a lot for the knowledge compilation and your links.
Just what I was looking for. Plenty of stuff to read (and to understand, too)!
-sundance-
sh0dan
26th November 2002, 11:00
I also put up some information at the bottom of the Alpha page. Also some useful links.
Wilbert
26th November 2002, 16:57
@Sh0dan,
I also put up some information at the bottom of the Alpha page. Also some useful links.
1) I'm not sure what you mean. I copied the links to the YV12 resource pages (see 14). Let me know if you mean something else.
2) I'm updating the Q&A for YV12 and AviSynth v2.5. If it is ready should I commit it to the 2.1 branch (or both branches)?
3) Is it still true that v2.0x plugins (I remember you discussed it with Richard somewhere) will be useable in the first beta of v2.5?
4) Will there be a v2.08 or is v2.5 the next version?
trbarry
26th November 2002, 18:43
From the first page of the faq:
10. Is YV12 & AVISynth 2.5 just for Xvid/DivX or can it be used for conversions to MPEG1 or MPEG2 (DVD to (S)VCD) via TMPGenc or CCE? Or do these 2 encoders not support YV12?
Neither CCE nor TMPGEnc can use YV12 input since Windows has no internal YV12 compressor. This only means that the last line of AviSynth must be a ConvertToYUY2 (for CCE, or ConvertToRGB24 for TMPGEnc) call, and that you will not be able to take full advantage of YV12 colorspace. All internal filtering in AviSynth will be faster though (less data to filter, better structure to filter, and a very fast conversion from YV12 to YUY2), and you will definitely be able to tell the difference between 2.06 and 2.5.
If you are making a progressive clip then there is probably more than just a speed advantage.
Putting off the YV12->YUY2 conversion until the end of the script allows you to first IVTC or Deinterlece to create progressive frames. But the YV12->YUY2 conversion for progressive frames maintains more chroma detail than it does for interlaced or field based frames.
So there should also be a small quality advantage.
- Tom
sh0dan
28th November 2002, 09:05
Originally posted by Wilbert
1) I'm not sure what you mean. I copied the links to the YV12 resource pages (see 14). Let me know if you mean something else.
Not at the moment.
2) I'm updating the Q&A for YV12 and AviSynth v2.5. If it is ready should I commit it to the 2.1 branch (or both branches)?
It should only be comitted to the 2_1 branch - I had planned on copying the 2.0 documentation for the first beta, and then correct it, as the beta phase went along. So just copy the documentation from the main branch (with the latest changes) to 2_1 branch. I haven't updated any documentation for 2.5 yet.
3) Is it still true that v2.0x plugins (I remember you discussed it with Richard somewhere) will be useable in the first beta of v2.5?
No - I can see no way for that to be possible, without putting back some bad restrictions into 2.5 (all audio work, and much YV12 support will not be possible, if they have to remain compatible :( )
The first beta will also invalidate ALL 2.5 alpha, since the plugin load'er will change, so that 2.0 will not try to load 2.5 plugins (and crash) and vice versa.
It is however only a 5 second fix and a recompile necessary to make alpha filters work in the beta.
4) Will there be a v2.08 or is v2.5 the next version?
2.0x will still be bug-fixed, but all new features will go into 2.5!
2.0x is the "stable" version, but will probably die out.
smokeslikeapoet
6th December 2002, 10:01
It looks like the link to Mpeg2Dec3 has been down for a couple of days, in case anyone needs it you can find it here http://smokeslikeapoet.d2g.com . By the way, if any other coders need mirrors for their YV12 compatible AVISynth filters. I am more than willing to host them. In a few weeks I will have increased bandwidth and resources to host filter development pages as well. My only motive in doing this is that I want to teach myself and gain experience in managing a large number of users on a linux platform. As long as you're not going to tax my bandwith too much feel free to contact me. william at techwill.net
Snollygoster
16th December 2002, 08:13
Sorry if this may sound stupid but do the IVTC and Deinterlace filters work with YV12?
hakko504
16th December 2002, 09:43
Originally posted by Snollygoster
Sorry if this may sound stupid but do the IVTC and Deinterlace filters work with YV12? Decomb and TomsMoComp have been updated to use YV12.
vidiot
20th December 2002, 17:50
I hope I understand everything written about YUV12 vs. YUV2...
I would like to know more about that issue:
1. The MPGs on DVDs are saved in YUV12? Right?
2. I do convert (and maybe filtering) to YUV2! (Right?)
3. And the encoder (regardless if TMPenc or CCE) makes YUV12 out
of it or YUV2???
If the DVD MAterial is YUV12 - why not decode in Yuv12 - as with avisynth 2.5 - and encode in YUV12 -> not possible? Or just not possible right now? Do we have to wait for a special YUV12 Encoder?
A second question: Which codec should I use for tv captures in future?
I do use PICvideo for the moment (and IŽm still very happy...), but maybe there is a way to increase the speed of editing after capture by doing the capture with the right codec.
Is XVID comparable (quaitywise) with picvideo Q19/20 - and fast enough?
kind regards
Harald
BTW: Speedincrease with DVD Backup is >10% -> Thank you...YUV12 Team!
hakko504
20th December 2002, 18:06
Well it's called YV12, not YUV12, but yes, that's the way it is stored on DVD's Yes. Yes and no.
CCE uses YUY2 as input which means that it uses YV12->YUY2->YV12 . Not bad but could be better.
TMPEG on the other hand requires RGB input so the conversion here is YV12(->YUY2)->RGB->YV12 where the second step is of course done if you use AviSynth 2.0x or earlier.Every color conversion will introduce rounding errors, not large and usually not noticeable. They usually only become noticeable if you mix frame/field information and encode an interlaced video as framebased or vice versa. And if AviSynth2.5 becomes popular enough I'd say that sooner or later someone will make an MPEG encoder that can use YV12 input. The teams behind ReMPEG or bbMPEG maybe?
vidiot
20th December 2002, 23:01
Originally posted by hakko504
[list=1] ...And if AviSynth2.5 becomes popular enough I'd say that sooner or later someone will make an MPEG encoder that can use YV12 input. The teams behind ReMPEG or bbMPEG maybe?
Thank you,
as far as I know Koepi and Nic were working on an new mpegencoder,
but I havenŽt heard much of it for months...
Maybe theyŽll do something in that YV12 way?
Anything about my second question (codec for tv-caps)?
Then IŽll be able to do the "caps for the kids" much faster
:)
Harald
hakko504
20th December 2002, 23:34
Originally posted by vidiot
Anything about my second question (codec for tv-caps)?
Modification of HuffYuv codec for YV12 (http://forum.doom9.org/showthread.php?s=&threadid=38389)
vidiot
21st December 2002, 10:44
Thnaks again hakko,
but after reading the whole thread - there really wasnŽt a
new Huffyuv for DL...
WeŽll have to wait, I guess...
(Maybe Christmas eve :cool: )
Harald
HarryM
21st December 2002, 11:40
Originally posted by vidiot
Thnaks again hakko,
but after reading the whole thread - there really wasnŽt a
new Huffyuv for DL...
WeŽll have to wait, I guess...
(Maybe Christmas eve :cool: )
Harald
Yes. You must wait. -h has christmas.
cweb
23rd December 2002, 21:49
It would be great if they would do one capable of encoding KVCD's.
Originally posted by vidiot
Thank you,
as far as I know Koepi and Nic were working on an new mpegencoder,
but I havenŽt heard much of it for months...
Maybe theyŽll do something in that YV12 way?
Anything about my second question (codec for tv-caps)?
Then IŽll be able to do the "caps for the kids" much faster
:)
Harald
HarryM
30th December 2002, 11:52
'Tweak' function (in Avisynth2.5) don't work in YV12???
sh0dan
30th December 2002, 21:17
Originally posted by HarryM
'Tweak' function (in Avisynth2.5) don't work in YV12???
Thanks to Richard it does now :)
Anyway, I updated avisynth.org. I added "troubleshooting" to the main page - wrote some stuff for it - moved the wiki-stuff to the bottom of the page - added a description of vdubmod - updated some other pages.
Stereodude
31st December 2002, 07:04
I instally AVIsynth 2.5 and VDmod 1.4.13.1. I get the following error.
http://stereodude.cjb.net:900/YV12_error.gif
If I do a ConvertToYUY2() or ConvertToRGB() it works fine. I thought VDmod was supposed to support YV12 video. I unzipped all the DLLs into the same directory as VDmod. I presume that's where it is supposed to go (seeing as there were no instructions).
Any ideas, or tips?
Stereodude
scmccarthy
31st December 2002, 09:23
Putting all the dll in the vdubmod directory is the way to go.
Maybe you need either the unstable xvid build or dvix 5.02.
Stephen
Stereodude
2nd January 2003, 00:22
Originally posted by scmccarthy
Putting all the dll in the vdubmod directory is the way to go.
Maybe you need either the unstable xvid build or dvix 5.02.
Stephen Ok, now I can see the output footage (after installing Divx 5.02), but why it is shown as the wrong size vertically and horizontally when it's shown in VDmod?
Stereodude
Edit: Nevermind. This is a VirtualdubMod issue, not an AVIsynth one. I'll ask over there.
SleepEXE
2nd January 2003, 04:27
Would someone be so kind as to email me a copy of the latest Avisynth 2.5 DLL, or attach it to this thread? I have been trying to reach cultact-server.novi.dk page all day but can't get a response (traceroute gives up...). I'm trying to get some test jobs set up before going to bed in about 3 hours.
If someone has it mirrored somewhere already, I apologize. I searched the forum but didn't find it.
Best regards,
SleepEXE
jmneal at orca.st.usm.edu
Stereodude
2nd January 2003, 04:52
Originally posted by SleepEXE
Would someone be so kind as to email me a copy of the latest Avisynth 2.5 DLL, or attach it to this thread? I have been trying to reach cultact-server.novi.dk page all day but can't get a response (traceroute gives up...). I'm trying to get some test jobs set up before going to bed in about 3 hours.
If someone has it mirrored somewhere already, I apologize. I searched the forum but didn't find it.
Best regards,
SleepEXE
jmneal at orca.st.usm.edu Try this link: http://forum.doom9.org/attachment.php?s=&postid=232127
Stereodude
SleepEXE
2nd January 2003, 04:59
Stereodude, thank you for the quick help. Can't wait to get started.
Best regards,
SleepEXE
kyousuke
3rd January 2003, 13:42
i ask me if TemporalSmoother & Spatialsmoother exists for avs1.5 YV12 ?
thks
regards,
kyo.
HarryM
3rd January 2003, 13:52
Originally posted by kyousuke
i ask me if TemporalSmoother & Spatialsmoother exists for avs1.5 YV12 ?
thks
regards,
kyo.
This filter functions (exactly TemporalSoften and SpatialSoften!) are built-in in Avisynth 2.5
Wilbert
3rd January 2003, 14:20
This filter functions (exactly TemporalSoften and SpatialSoften!) are built-in in Avisynth 2.5
Yes, but only TemporalSoften works also in YV12.
Hiro2k
3rd January 2003, 17:50
When i try to click on the link for Decomb I get this message
You do not have permission to access this page. This could be due to one of several reasons:
1. You do not have permission to access the page that you were trying to. Are you trying to edit someone else's post or trying to access administrative features? Check that you are allowed to perform this action in the Forum Rules.
2. If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
I know it's a sticky on the main forum, but im not sure if thats what you were linking to.
theReal
4th January 2003, 15:09
I also get the "no permission" message when I click on the Decomb link in the FAQ.
I guess you actually want to link to this thread? http://forum.doom9.org/showthread.php?s=&threadid=41943
Wilbert
4th January 2003, 15:31
Yes, you are right. I linked to the wrong page. Thanks!
sh0dan
5th January 2003, 17:12
@theReal: Anybody can edit these pages :-)))
movmasty
30th January 2003, 08:37
i noticed that divx encoded with fast recompress sometime have a bigger size than the same divx encoded with normal recompress,
but sometime size is the same.
Has this something to do with YV12 conversion??
sh0dan
30th January 2003, 19:27
... yes - the YV12 -> RGB -> YV12 conversion sligtly blurs chroma, and since the conversion isn't lossless, the luma also gets slightly altered. So you get reduced quality (bad) at reduced size (good) and decreased speed (bad) - it's your choice!
movmasty
31st January 2003, 15:31
another thing, Yv12 cant be used in interlaced sources,
since some dvd is interlaced, then there are 2 different dvd standards?(Yv12-yuv2)
hakko504
31st January 2003, 15:37
@movmasty
Read this thread (http://forum.doom9.org/showthread.php?s=&threadid=42708) for an explanation of how YV12 is handled in interlaced video.
esby
14th February 2003, 01:07
Maybe it's nothing but...
I have a divx 3.11 alpha raw anime file. (lomotion)
when I try to open it using avisynth 2.5 & avisource,
Vdub tell me that codec used is RGB32 uncompressed.
When i add a convertToYv12() at the end of script
I ends with codec= divx5.02...
for playback default (and decoding if i'm not wrong)
I'm using divx 3.11 alpha and not divx5.02.
So here my question, is it just some weird error that tell vdub
he is decoding a divx5.02 file, or does avs really use divx 5.02
to decode 3.11 file...
In this case, it will be bad because divx 5.02 decode div3 stuff unproperly sometimes.
esby
esby
14th February 2003, 01:12
I just tested with samples known to have problems with divx5.0X decoding.
No problem found, so it's prolly (my) vdub that uses divx5.0X to 'decode' Yv12, or vdub that assign divx5.0X name to yv12 f4cc.
esby
hakko504
14th February 2003, 08:58
DivX 5 is used for decoding any avs containing YV12. This have nothing to do with how AviSynth is decoding the video in the first place. This is just how the data is passed from AviSynth to VirtualDub. The actual AviSynth command (AviSource) will use the normally registered codec to decode the video, and you can also force AviSynth to use ffdshow by opening the video with DirectShowSource instead.
Stux
14th February 2003, 09:30
- Does 3ivx D4 codec support YV12 Video Stream? http://forum.doom9.org/showthread.p...76&pagenumber=3
3ivx D4 4.0.3 now correctly supports YV12 encoding :)
wing1
25th February 2003, 07:00
I've asked this question once before, please forgive me for asking it once again: I've noticed that in the YV12 'To Do' list there is no mention of this feature. Currently, this feature does function correctly in AVS2.5x; However, a 'converttoyuy2()' must preceed this function and a 'converttoyv12()' afterward. This would waste valuable CPU time and defeat the purpose of YV12. Is there plan to port this function to YV12 or it is not worth doing so?
sh0dan
25th February 2003, 08:41
Eventually it will be supported - the code is not that easy to understand, and there are several modes to support, so there has been more important things to work on up until now.
wing1
26th February 2003, 05:59
ahh..ok..not a problem :D
Boulder
6th March 2003, 16:38
Regarding Q11, the swapped channels have been corrected in DivX 5.0.3 so no need for SwapUV() if that's used as the decoder.
abitfun
7th March 2003, 04:17
I have already used AviSynth 2.5,and I find it very good.
I get faster encoding speed,at least it works on my PC,using the latest Nic-XviD.
The configuration of my PC:
Tulatin 1G(overclocked to 1.4G)
WD80GB-BB+U640GB
Jetway-615TCS
384MB SD-memory
Win2K-sp2-SCN/WIN2K-sp1-SCN
And I get a speed at 12~15fps at 1st-pass,12~15fps at 2nd-pass;
and I got very steady speed at 8fps before I use AviSynth 2.5.
THX to AviSynth 2.5!!!!!!
crusty
13th March 2003, 18:10
Since the subject of this thread has been altered to ÄviSynth 2.5 FAQ I think the next question has relevance and should be answered on top of this thread:
: What is multichannel support?
Just my $0.02
Ty Bower
19th March 2003, 20:20
I'm getting a curious error trying to get YV12 to work on my machine. Previously, I had software installed from the following kits:
GordianKnot RipPack 0.27
GordianKnow SystemPack 1.0
All worked well. I have since installed the software I believe I need for YV12:
AviSynth 2.51
MPEG2Dec3 v1.00
VirtualDubMod 1.4.13, build 310103
VirtualDubMod needed dlls, build 251102
I can drop my .avs script on WMP and it plays back just fine. Putting an "Info()" in my script confirms that my colorspace is indeed YV12. However, when I try to encode it in VirtualDubMod, I get the following error:
"VideoSourceAVI error: The source image format is not acceptable. (error code -2)"
If I put a ConvertToYUY2() in my script, it works fine. If I turn off fast recompress and use full processing mode, it also works fine. Unfortunately, both these options kinda defeat the purpose. My codec is DivX 5.0.2. Any ideas? My cropping and resizing values are all legit (even numbers for cropping, multiples of 16 for resizing).
sh0dan
19th March 2003, 20:27
What codec are you compresing to?
Ty Bower
19th March 2003, 20:31
I'm compressing to DivX 5.0.2. I've tried both the Pro version as well as the standard. It doesn't seem to matter whether I configure the encoder for single pass, multi-pass, or whatever.
I will admit it seems more like a problem with my DivX codec rather than an error coming from AviSynth, MPEG2Dec3, or VDubMod. It almost smells like my DivX codec isn't accepting YV12 input?
sh0dan
19th March 2003, 22:20
Open a new thread, or ask in the DivX forum - I don't know the solution of your problem.
scmccarthy
20th March 2003, 17:46
The DivX forum is one option, but finding out what error code -2 is might offer a valuble clue.
Stephen
Acaila
20th March 2003, 18:31
I believe error -2 comes up with a variety of things, I can't think of anything specific out of the top of my head that can trigger it. I would have said a resolution problem, but like you said, even cropping numbers and mod 16 are definately not the problem. Most likely your installation has gone bad (be sure that you install the codec AFTER you install GKnot). Reinstall the DivX codec and see if that clears it up.
But it's definately not an Avisynth problem.
Ty Bower
20th March 2003, 18:35
I re-installed the DivX codec, AviSynth, MPEG2Dec3.dll, and VirtualDubMod. I also tried DivX 5.0.3. Nothing seems to help.
I tried installing the same software on another machine. I got it working over there, so I guess there must be something flaky on the first PC? Maybe I can try re-installing the OS. :(
I took my question over to the DivX forum. Maybe someone has seen this before.
Druizk
11th April 2003, 04:01
@Ty bower
What happening?, How resolve your problem?...
My experience, I said...
First: Install the las betas or release and CVS Binary Files
Open VirtualDubMod with AviSynth file, in menu File /File Information you see "ForCC Code" and "Decompressor".
Second: Change file avisynth ConvertoYuy2(),ConvetToYv12() or both
Repit the first pass.
In both colorspace, you can see the Decompressor used in Windows.
Uninstall or re-install this Decompressor, someone video-board install yourself decompressor. I'm using for YV12 "ATI Yv12" and "Xvid MPEG-4".
troy
25th April 2003, 05:16
Sorry Im a newbe. so if I am converting dv material and frameserving to cce with avisynth do I need to make ConvertToYUY2 the last line of my script.
Wilbert
25th April 2003, 09:36
I guess your dv is YUY2. So if you don't convert to YV12 in your script, you don't need the line ConvertToYUY2. Note you can also put the filter info (http://www.avisynth.org/index.php?page=Info) as the last line, to see what the color format is.
Guest
25th April 2003, 12:49
Please open new threads for problems. This thread is for the FAQ and comments related to that. Thank you.
dsmith
15th May 2003, 00:59
I had a problem where I was getting a band of yellow tinge a couple pixels wide on the left edge of the image (mpeg2 source through .d2v) after cropping the image in avisynth. (it only really showed up when the background was fairly light, though) Turns out that the vidc.YV12 registry parameter (from q.13) had not been set at all (or removed at some point; I recently installed GordianKnot, and a couple things seem to have changed when I did that). VDub generated warnings when run in batch mode (but no actual messages), but all other indications were that the video was being processed in YV12 as expected (if slower than I was expecting, but I wasn't really sure what it -should- be; fixing the problem improved the speed dramatically). I had had 2.51 final installed, and installed the 4/16 and 5/14 builds on top of it, but they didn't fix the problem on install. Installing DivX 5.05 a second time also didn't have any effect. Not sure what program was supposed to have set the value, but AviSynth should probably check for it on installation.
Edit: Oh, there was one other indication of a problem with YV12 decoding. If I added a ConvertToYUY2() to the .avs script before the crop command, the problem went away.
--
David
JimBryce
4th June 2003, 01:43
In "Q2" ("Where can I download the mpeg2dec plugin which supports YV12") it states:
"Note that the colorspace information of dvd2avi is disregarded when using mpeg2dec."
I don't understand what that means:confused:
I admit to being relatively new to this stuff but I've read all the links mentioned in this FAQ and done a search through the rest of the forum and I still can't make sense of that statement. Can someone please explain?
:) Thank you!:)
Defiler
4th June 2003, 02:01
It just means that the colorspace setting you choose in DVD2AVI gets ignored.
JimBryce
4th June 2003, 02:15
Thanks!:)
Does that mean you need to specify the input/output if you use mpeg2dec or does it automatically default to YV12?
sh0dan
4th June 2003, 07:21
MPEG2DEC3 outputs to YV12 - prevoius versions had automatic conversion to YUY2, so this is simply removed now.
Wilbert
8th October 2003, 22:08
I added a bunch of new plugins. Please, notify me if I missed something :)
actionman133
24th March 2004, 02:35
i haven't been able to find any info on this, but i've found that my computer seems to run faster in YUY2 mode (using MPEG2Dec3), than YV12 with avisynth 2.5. the code i use is online at
http://www.avisynth.org/index.php?page=EnhancingDvdVideos, and if you noted the ConvertToYUY2 line, it's because without this line (remaining in YV12), i have some major frame dropping while it plays in media player, but when it is converted to YUY2, it plays beautifully with cpu cycles to spare.
im running on a p4 2.6 with geforce4 mx-440 card, if anyone needs to know. so why does yv12 run slower on my computer, when it shouldnt be?
ps. does converting YV12 to YUY2 actually result in loss, since they are basically the same? Wouldn't all colour information in YUY2 be the same for each vertical pair?
thanks
esby
24th March 2004, 03:06
Maybe an explanation...
Case 1:
source --> convertToYuy2 --> filter -->(we get out of avs)--> wmp
Case 2:
source --> filter --> wmp -->(we get out of avs) --> convertToYuy2* --> wmp
* done by wmp by calling the local decoder...
Filtering should be done at a somewhat equal speed no matter the colorspace here...
But maybe the conversion done out of avs is slower than the internal...
You can confirm or infirm the hypothesis by moving the convertToYuy2()
at the end of the script... and see if the playback is still choppy...
esby
Edit: there is always a slight loss of quality during each color conversion,
but it should not be noticeable for one instance...
actionman133
15th April 2004, 12:29
it seems when you use SelectEvery () to interlace frames in YV12 and then weave, you get the sort of chroma upsampling problems when you get the Interlaced = True/False wrong.
the only solution around it right now that i am aware of is to convert to YUY2, interlace and reconvert back to YV12 with the interlace option. without meaning to be a perfectionist, i find it inconvenient when i try to provide a clean output for the final video. id like to avoid the conversions if at all possible. is there a solution in the works with the developers, or will there be?
Gatak
12th November 2004, 19:56
I think people should be aware of the differences in colour resolution with the different YUV modes. I have attached a file wich illustrates the differences on uncompressed video data. It doesn't matter how high quality you would set your xvid/divx to. Normally this isn't a problem, bur for content with very bright and saturated colours it will be.
So far I have only seen MPEG-2 that support 4:4:4.I wish xvid would too...
It seem as the attachment is delayed. Have a look at: http://moment22.mine.nu/YUV.png
Wilbert
12th November 2004, 20:13
So far I have only seen MPEG-2 that support 4:4:4.
I thought MPEG-2 only supported 4:2:0 or 4:2:2? Btw, did you never rip a dvd?
About the picture: perhaps you can add 4:2:0 too, then I will add it somewhere on wiki.
Btw, attachments have to be approved.
Gatak
12th November 2004, 20:25
Oh I did not realize about the attachment. About MPEG-2, it supports 4:4:4. I do not remember the exact name for the High Profile 4:4:4 mode though. I will have to look through the specs again. Most software won't support it though =(.
Here is some info on MPEG-4 Part 10/H264: http://fastvdo.com/spie04/spie04-h264OverviewPaper.pdf which has support for 4:4:4 too.
2Bdecided
16th February 2005, 17:10
Originally posted by Wilbert
Is YV12 & AVISynth 2.5 just for Xvid/DivX or can it be used for conversions to MPEG1 or MPEG2 (DVD to (S)VCD) via TMPGenc or CCE? Or do these 2 encoders not support YV12?
Neither CCE nor TMPGEnc can use YV12 input since Windows has no internal YV12 compressor.
Is this still true?
If YV12 goes into TMPGEnc Plus 2.5 OK (which is what is happening) does this mean that I do have a YV12 codec installed under windows? Where did that come from then?!
TMPGEnc seems to accept RGB24 or YUY2 or YV12. I'm using YUY2 when I'm generating interlaced material (because IIRC I shouldn't re-interlace in YV12), and YV12 when it's all progressive.
What colour conversions will be happening in each case, and where?
Cheers,
David.
KaiserS
16th February 2005, 17:16
Originally posted by 2Bdecided
Is this still true?
Yes it is.
Originally posted by 2Bdecided
If YV12 goes into TMPGEnc Plus 2.5 OK (which is what is happening) does this mean that I do have a YV12 codec installed under windows? Where did that come from then?!
No it doesn't mean that. It just means that it will do a colorspace conversion as the FAQ shows to get it into the proper colorspace, which is why its recommended if you use TMPGEnc to put a ConvertToRGB24 at the end of the script. It's no different then if you feed RGB input into DivX or XviD; they will just do an intermediate colorspace conversion to get it into the proper colorspace for input.
Gatak
16th February 2005, 17:23
Btw, isn't converting to RGB always preferred if you are doing scaling or handling (de)interlacing since otherwise you will loose even more resolution in the colour channels?
KaiserS
16th February 2005, 17:24
No, I don't think so.
Gatak
16th February 2005, 17:26
Originally posted by KaiserS
No, I don't think so. Why not? At least in my testing, converting to RGB before down/upsizing and then back to YUV mode for output gives better result than keeping it at YUV.
KaiserS
16th February 2005, 17:28
I'm just speaking from personal experience, I get better results leaving it in YV12 at all times rather then doing 2 colorspace conversions along the way.
Gatak
16th February 2005, 17:32
Things like colour bleeding seem to get worse if I do not convert to RGB. Probably because doing conversions in YV12 has so poor resolution in the remaining colour channel. 4:2:2 would still only contain half resolution in both. When you do scaling or deinterlacing or other things, you can only work with the lower resolution as long as you keep it in 4:2:2 and not 4:4:4 or RGB.
KaiserS
16th February 2005, 17:34
Originally posted by Gatak
Things like colour bleeding seem to get worse if I do not convert to RGB.
Why not just use the ChromaShift filter instead?
Gatak
16th February 2005, 17:36
Originally posted by KaiserS
Why not just use the ChromaShift filter instead? What would that help with resolution wise?
EDIT: Ok, I looked it up. Shifting chroma channels could help in some cases, but it doesn't repair poorer quality because of lower resolution.
KaiserS
16th February 2005, 17:37
Originally posted by Gatak
What would that help with resolution wise?
No, but if you were only doing a colorspace conversion cause of color bleeding why not just use ChromaShift to fix instead.
Originally posted by Gatak
When you do scaling or deinterlacing or other things, you can only work with the lower resolution as long as you keep it in 4:2:2 and not 4:4:4 or RGB.
Yes, but the intermediate conversions always cause some noticeable color distortions on anything I've done so I just prefer to leave it in YV12 whenever possible, unless a certain filter needs another colorspace to work (such as Dust).
Gatak
16th February 2005, 17:51
You are right of course, that preventing unessesary colour space conversions is the best usually. Especially for speed.
Gatak
16th February 2005, 17:56
The luminuosity is different between the two screenshots. Why is that? Did you scale the YV12 values differently for the two?
Apart from that, there seem to be a little more colour bleeding on the YV12 imagem but perhaps this is due to the differences in lightness. Look around the knuckles and around the chairs against the background.
KaiserS
16th February 2005, 17:57
Here are two upscaled pics from a DVD (source is Hajime no Ippo) from 720x480 to 1024x768 (using BilinearResize and no extra sharpeneing. I can honestly see no difference between the or which would warrant doing the conversion.
YV12 only
http://img175.exs.cx/img175/634/pic11qr.th.png (http://img175.exs.cx/my.php?loc=img175&image=pic11qr.png)
ConvertToRGB before upsize
http://img175.exs.cx/img175/32/pic26dl.th.png (http://img175.exs.cx/my.php?loc=img175&image=pic26dl.png)
Edit: Fixed it.
Gatak
16th February 2005, 18:00
What is "EE"?
Gatak
16th February 2005, 18:06
http://moment22.mine.nu/bleed.png
Why is there "edge enhancement" on the YV12 and not on the RGB version?
Your revised version is certainly better and cures most things. However, the shifting is only in one direction, but chroma errors when scaling occur in all directions. Look on the shirt, on his left shoulder. You have introduced colour bleeding there because you have shifted to many pixels.
KaiserS
16th February 2005, 18:09
Yeah, I noticed now what you meant, and like I said all that is needed is to do a slight chroma shift. Converting it to RGB does fix it slightly (chroma is still slightly off), but it would be better to just shift chroma left a few pixels instead of the conversion.
KaiserS
16th February 2005, 18:14
Here's a new pic:
http://img229.exs.cx/img229/5707/pic39vt.th.png (http://img229.exs.cx/my.php?loc=img229&image=pic39vt.png)
Gatak
16th February 2005, 18:15
Originally posted by KaiserS
Yeah, I noticed now what you meant, and like I said all that is needed is to do a slight chroma shift. Converting it to RGB does fix it slightly (chroma is still slightly off), but it would be better to just shift chroma left a few pixels instead of the conversion. Yes, I see your point. ChromaShift seem to be a good filter =)
Now I wish 4:4:4 mode would be supported by xvid and other codecs.
KaiserS
16th February 2005, 18:52
Well 4:4:4 wouldn't make much difference if the chroma is already off in the source (I double checked the source on my example and it was slightly off in the source itself not due to the upscale), but that would be a nifty feature if you were working from a source that had full color resolution. But for the purpose of re-encoding a DVD to something such as XviD, I wouldn't see much of a use for it.
Gatak
16th February 2005, 18:56
Nope, it wouldn't be to beneficial for doing DVD backups. But when you do DVD backups you backup the DVD, you don't re-encode it to DivX|XviD.
But yes, I was thinking of 1) digital/computer generated content and 2) downsampling HD content into more resonable sizes.
KaiserS
16th February 2005, 18:58
Originally posted by Gatak
Nope, it wouldn't be to beneficial for doing DVD backups. But when you do DVD backups you backup the DVD, you don't re-encode it to DivX|XviD.
I guess I worded it wrong cause I was referring to encoding a DVD source to XviD or DivX.
Gatak
16th February 2005, 19:05
Most divx/xvid encodes from DVD movies are actually scaled down from 720 to 640 or 512. Here it would be beneficial to use 4:2:2 or 4:4:4 as it would retain more of the colour resolution.
KaiserS
16th February 2005, 19:18
Originally posted by Gatak
Most divx/xvid encodes from DVD movies are actually scaled down from 720 to 640 or 512. Here it would be beneficial to use 4:2:2 or 4:4:4 as it would retain more of the colour resolution.
Yes, but since the DVD is already in YV12 it wouldn't give any noticeable benefit to use any other colorspace. Just as I showed in my example there was no real benefit to doing a colorspace conversion (putting aside the slight bleeding in the souce itself which was fixed by chroma shifting before upscale).
Gatak
16th February 2005, 19:31
Originally posted by KaiserS
Yes, but since the DVD is already in YV12 it wouldn't give any noticeable benefit to use any other colorspace. Just as I showed in my example there was no real benefit to doing a colorspace conversion (putting aside the slight bleeding in the souce itself which was fixed by chroma shifting before upscale). You upscaled the picture,..
When you downscale - you reduce the resolution. But because the chroma channel is already at low resolution (half or less) you can retain by scaling up the chroma channels to full resolution before downscaling.
A 4:2:2 720x576 picture will have a chroma resolution of 360x240. If you scale down the picture to 640x512 the chroma channel will be reduced to 320x256. If you instead convert to RGB or 4:4:4 the amount of colour detail will be the same (or very close to) as the original source.
KaiserS
16th February 2005, 19:36
Well here are two shots from the same source downscaled to 576x432(with the chroma shifted). Again, I see no added benefit to the RGB version to the YV12. I could be blind, but I see no real difference.
YV12 all the way
http://img197.exs.cx/img197/8453/yv129nd.png
Converted to RGB before downscale
http://img197.exs.cx/img197/2686/rgb2ud.png
Boulder
16th February 2005, 19:42
Originally posted by Gatak
When you downscale - you reduce the resolution. But because the chroma channel is already at low resolution (half or less) you can retain by scaling up the chroma channels to full resolution before downscaling.
When you upscale, you interpolate. Thus, the chroma resolution does not get any better when you upscale and then downscale. In fact, inevitable rounding errors etc. probably make it worse.
Gatak
16th February 2005, 19:49
No, you are right. There is not that much difference unless you measure with Photoshop or something similar.
On the other hand, it depend on the image. If you look on the 4:4:4 vs 4:1:1 picture which I posted earlier there would be a difference. The brighter colour and finer colour details, the more difference it would be.
in fact, inevitable rounding errors etc. probably make it worse.Well. I do not think so. You are right about rounding errors. There will also be distorsion caused by the algorithm used.
However, the same rouding errors and algorithm mistakes will occur when you downsize too.
Which image will contain more detail/resolution:
A) 360x288 downsized to 320x256
B) 360x288 interpolated to 640x512
KaiserS
16th February 2005, 19:53
Originally posted by Gatak
No, you are right. There is not that much difference unless you measure with Photoshop or something similar.
Well I'm sure mathematically there is a difference, but visually there isn't.
Originally posted by Gatak
On the other hand, it depend on the image. If you look on the 4:4:4 vs 4:1:1 picture which I posted earlier there would be a difference. The brighter colour and finer colour details, the more difference it would be.
Yes, but converting something that is 4:2:0 to start with to 4:4:4 isn't gonna make it look like it was originally 4:4:4. Like I said before, 4:4:4 is useful if your source has full chroma resolution from the beginning but for something that is already half chroma resolution it isn't going to help at all, and in many cases it can actually cause problems.
Originally posted by Gatak
Which image will contain more detail/resolution:
A) 360x288 downsized to 320x256
B) 360x288 interpolated to 640x512
Neither will have as much detail as the original source as you can't just interpolate detail from nowhere. Through upscaling and sharpening you can enhance the detail that is in the original picture, but it isn't going to have more detail.
Gatak
16th February 2005, 19:56
Neither will have as much detail as the original source as you can't just interpolate detail from nowhere. But you can enhance the detail that is there if you do an upsize and a sharpen. This isn't an answer to my question. Which will retain more detail? A or B? In my oppinion it would be B =)
KaiserS
16th February 2005, 19:58
Originally posted by Gatak
This isn't an answer to my question. Which will retain more detail? A or B? In my oppinion it would be B =)
Doing neither would retain more detail.
KaiserS
16th February 2005, 20:04
Secondly, without knowing which resizer you are using and any other enhancements you might do as well it is almost impossible to know which will look better.
Gatak
16th February 2005, 20:10
Originally posted by KaiserS
Doing neither would retain more detail. Of course =). If that is an option (I do myself try to not rescale if possible).
I do agree with you all. As long as there is no visual difference for the content, then go for the option which uses fewest bits. That's what compression is about anyway.
The 4:x:x modes were chosen simply because for most content there wouldn't be much difference.
For CG it is another story, as it is probably much charper with finer and sharper details than normal video content.Secondly, without knowing which resizer you are using and any other enhancements you might do as well it is almost impossible to know which will look better. True. But say we use the optiomal algorithm for each case?
KaiserS
16th February 2005, 20:16
Doing a comparison between the same source comparing a 640x480 to 1024x768 (both using bilinear resize) I would say that at 100% the 640x480 looks sharper to my eyes. Now once you start upscaling that to the other's resolution it starts to look a bit more fuzzy, but that's to be expected.
Boulder
16th February 2005, 20:40
Originally posted by Gatak
However, the same rouding errors and algorithm mistakes will occur when you downsize too.
Which image will contain more detail/resolution:
A) 360x288 downsized to 320x256
B) 360x288 interpolated to 640x512
When you upsize and then downsize, the rounding errors and distortion multiply and are introduced twice.
From those two, A is my choice as it is closer to the original.
There's a thread in the capturing video section about resolution, you might want to head over there. This discussion is a bit off-topic in the YV12 FAQ;)
Gatak
16th February 2005, 20:46
Originally posted by Boulder
When you upsize and then downsize, the rounding errors and distortion multiply and are introduced twice.
From those two, A is my choice as it is closer to the original.
There's a thread in the capturing video section about resolution, you might want to head over there. This discussion is a bit off-topic in the YV12 FAQ;) But you forget one thing. The chroma is upsampled during playback, probably not using anything better than bilinear filtering. While when using 4:4:4 mode it is not scaled more than the luminance channel.
Yes, maybe a little off topic. My original statement was that YV12 was worse than 4:2:2 and 4:4:4 which should be considered when working with video.
Wilbert
16th February 2005, 22:30
If YV12 goes into TMPGEnc Plus 2.5 OK (which is what is happening) does this mean that I do have a YV12 codec installed under windows? Where did that come from then?!
As KaiserS explains. Whatever format TMPGEnc/CCE accepts, for TMPGEnc it is converted to RGB and for CCE to YUY2 prior to processing. After that the video will be converted to YV12.
Perhaps you have DivX/XviD installed which is doing the conversion for you?
Btw, isn't converting to RGB always preferred if you are doing scaling or handling (de)interlacing since otherwise you will loose even more resolution in the colour channels?
See Q7. But, like you note, some people argue that when doing YV12->RGB you will have more chroma to work on, and thus get more accurate results.
Now I wish 4:4:4 mode would be supported by xvid and other codecs.
4:4:4 planar is supported in ffv1 (YUV 444p).
http://forum.doom9.org/showthread.php?s=&threadid=72709
It will also be supported in AviSynth v3.
Gatak
16th February 2005, 22:49
Yes, I knew that AviSynth would support 4:4:4. But for ffv1, that's a lossless codec - resulting in very large files. Doesn't the huffyuv codec also support a RGB mode?
What I want is a high compression codec like xvid/divx to support 4:4:4, even though it would use some more space. The step from 100:1 compression to 3:1 is very huge.
2Bdecided
17th February 2005, 14:00
Originally posted by Wilbert
[B]As KaiserS explains. Whatever format TMPGEnc/CCE accepts, for TMPGEnc it is converted to RGB and for CCE to YUY2 prior to processing. After that the video will be converted to YV12.
Perhaps you have DivX/XviD installed which is doing the conversion for you?
Ah, yes, that's it! Thanks.
So, if I didn't have XviD installed, it simply wouldn't work?
Is there any advantage to using ConvertToRGB24 at the end of the AVIsynth script compared to letting the XviD codec do the conversion automatically on the way into TMPGenc?
(I'll use ConvertToRGB24 in the future, but I wonder if it actually makes any difference, if XviD is doing the conversion anyway? Quality-wise, speed-wise, or anything else? e.g. do I need to re-encode what I've already done because it's wrong?)
Cheers,
David.
Wilbert
17th February 2005, 14:09
But for ffv1, that's a lossless codec - resulting in very large files.
Yes, it's useless for your final encoding. But it's the only codec i now which supports it.
Is there any advantage to using ConvertToRGB24 at the end of the AVIsynth script compared to letting the XviD codec do the conversion automatically on the way into TMPGenc?
XviD/DivX will always upsample progressively. So, if you feed an interlaced clip it will mangle the chroma of your clip. You also don't know which codec is doing the conversion (at first sight). If you do it in AviSynth you know how it is done.
Gatak
17th February 2005, 14:10
I suppose the only difference with using the color space converter in Avisynth instead of Xvid would be that it's internal precision was better. I am not sure it is, or if it has any real visual benefits.
2Bdecided
17th February 2005, 18:01
Originally posted by Wilbert
XviD/DivX will always upsample progressively. So, if you feed an interlaced clip it will mangle the chroma of your clip. You also don't know which codec is doing the conversion (at first sight). If you do it in AviSynth you know how it is done.
Thanks. I'd only done progressive content this way, so shouldn't have any major problems.
Cheers,
David.
mjliteman
23rd February 2005, 20:14
"Q13: I installed AviSynth v2.5 and DivX5 (or one of the latest Xvid builds of Koepi), all I got is a black screen when opening my avs in Virtualdub/VirtualdubMod/CCE/TMPGEnc ?[/b]
Ok, apperently your video is not decompressed by DivX 5.02 (or Xvid). Go to your windows-dir and rename a file called MSYUV.DLL, or add the following to your registry file:
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32]
"VIDC.YV12"="divx.dll"
Replace "divx.dll" by "xvid.dll" for xvid v0.9 or "xvidvfw.dll" for xvid v1.0."
I thought this was just the solution I needed because I'm having this exact problem, but so far it hasn't worked for me. I first tried the registry solution. I didn't have an entry for "VIDC.YV12=DivX.dll" so I made one. Rebooted. Still no video (the audio plays fine) in VDubMOD nor MPC. Renamed the MSYUV.dll to MSYUV.old. Rebooted. Still no video. What I don't understand is that the file plays fine if I load it directly in VDubMOD or MPC. Under MPC filters it lists DivX (5.2 I think) as the filter. I'm not home right now so I can't remember the script exactly, but I've tried AVISource and DirectShowSource without luck. My source is PAL DivX that I'm trying to make NTSC DVD compatible. Any more insight would be greatly appreciated! I've worked with AVI and MPEG sources before, but this is the first time with a DivX file. I figure the problem lies with me and my lack of understanding because many others seem to open DivX just fine.
Thanks again,
MJ
Wilbert
23rd February 2005, 23:43
Could you check that divx.dll is indeed in your system32 folder?
mjliteman
23rd February 2005, 23:59
Originally posted by Wilbert
Could you check that divx.dll is indeed in your system32 folder?
I will check tonight when I get home.
mjliteman
24th February 2005, 16:06
Checked my System32 folder and DivX.dll is in there, but I realized before I go any further that I should try just loading the source file alone into my script and testing that in VDub. It worked of course. Here's the script that wasn't working and you'll probably see right away what's wrong:
AVISource("C:\Myfile.avi",25,video=true)
AssumeFPS(23.976,sync_audio=true)
ResampleAudio(48000)
AddBorders(8,8,8,8)
LanczosResize(720,486)
Crop(0,4,0,2)
I started removing the last line one by one and the first line I removed (Crop) solved it. Having Crop after LanczosResize is wrong. I had been reading a lot about PAL to NTSC but obviously misunderstood. I think if I swap Crop and LanczosResize that would be correct.
MJ
BTW, I used ResampleAudio because I don't have SSRC. I thought this was an internal filter? I'm using AVISynth 2.5 & AVSEdit. At least it's not listed on my filters tab of AVSEdit.
Wilbert
24th February 2005, 16:15
Try
AVISource("C:\Myfile.avi")
AssumeFPS(23.976,sync_audio=true)
ResampleAudio(48000)
AddBorders(8,8,8,8)
LanczosResize(720,486)
Crop(0,4,0,-2)
BTW, I used ResampleAudio because I don't have SSRC. I thought this was an internal filter? I'm using AVISynth 2.5 & AVSEdit. At least it's not listed on my filters tab of AVSEdit.
Yes, it's an internal filter (assuming you are using v2.55). Try
http://www.planetdvb.net/AVSEdit_1.1.1.3.exe
Of course you can also check the docs you got when installing AviSynth itself.
mjliteman
25th February 2005, 07:48
Thanks, Wilbert, the -2 was the problem. Using AviSynth 2.5.5 and AVSEdit 1.1.1.3 and still can't find SSRC. I'll stop asking here as this is the YV12 FAQ.
Learning and loving it.
MJ
Wilbert
27th April 2006, 22:41
I modified the YV12 faq a bit, and moved it to avisynth.org. I hope some of you can read it through and tell me whether I need to change, add or remove anything. Thanks!
danpos
28th April 2006, 01:51
I modified the YV12 faq a bit, and moved it to avisynth.org. I hope some of you can read it through and tell me whether I need to change, add or remove anything. Thanks!
I just was reading the topics from this great community (which I always do everyday :) ) and saw this post and so I went there take an eye and I've to say that it's very pleasant to read out.
Thanks for your time to do our life easier.
Cheers,
GrofLuigi
28th March 2007, 04:35
The YV12 FAQ is moved to avisynth.org:
http://www.avisynth.org/mediawiki/wiki/YV12_FAQ
Hi,
I just found it's moved now http://avisynth.org/mediawiki/YV12_FAQ
GL
Wilbert
28th March 2007, 22:05
Thanks for mentioning it. I corrected the link.
frustum
9th August 2012, 22:13
The SDK has functions like IsYUY2(), IsYV12(), IsRGB(), etc. At the script level, there is the Info() function, but it simply overlays the video image, and the information isn't easily available the script.
Is there a means whereby a script can determine the format of a video stream it has been handed? I'm hoping for something akin to IsYUY2() for use as a ConditionalFilter() selector.
Why do I want it? Because some plugins don't handle YUY2 but do handle YV12, or the two formats need different arguments. For instance, the RemoveDirt() script can process YV12 sources as-is, but YUY2 sources need to be converted to/from planar YUY2 format before/after RemoveDirt().
Thanks.
Guest
9th August 2012, 22:45
Have you read the documentation? The functions you ask for are available.
frustum
10th August 2012, 01:12
Neuron2:
I looked at the places listed below, and then some. I know, judging by name, some of these don't make sense to look for IsYUV(), say, but since I didn't find it, I kept looking. I did google search on things like "avisynth isyuv" "avisynth determine video format", etc. No luck. I probably spent an hour browsing around and searching without finding it before coming here.
http://avisynth.org/mediawiki/Internal_functions/Boolean_functions
http://avisynth.org/mediawiki/Internal_functions/Runtime_functions
http://avisynth.org/mediawiki/Internal_functions/Script_functions
http://avisynth.org/mediawiki/Internal_functions/String_functions
...
In fact, I searched all pages under:
http://avisynth.org/mediawiki/Internal_functions
I looked under:
http://avisynth.org/mediawiki/Category:Internal_filters
http://avisynth.org/mediawiki/Category:External_filters
http://avisynth.org/mediawiki/YUY2
I have now found it here:
http://avisynth.org/mediawiki/Clip_properties
I just tried searching on "avisynth isyuy2" (without quotes), and google helpfully changed it to find "avisynth yuy2" instead. That must have happened to me before, but I didn't notice it. When I force it to search on isyuy2, then the last link above finally showed up.
Guest
10th August 2012, 01:21
It's right there in the documentation that gets installed with Avisynth. For example, on my system:
E:\AviSynth 2.5\Docs\english\index.htm
Anyway, I'm glad you've got it sorted out.
jmac698
10th August 2012, 16:15
I often have difficulties finding documentation. Ideally there would be an index to all keywords. Try to guess where to find LoadPlugin for example - what entry under table of contents would have it? I was looking for the other versions, load std call or whatever.
Guest
10th August 2012, 16:42
It was so hard:
Open index.html
Look at left menu
click on Getting Started/Plugins
I had to rest for hours after suffering through that. :devil:
Wilbert
11th August 2012, 14:04
I looked at the places listed below, and then some. I know, judging by name, some of these don't make sense to look for IsYUV(), say, but since I didn't find it, I kept looking.
You know the mediawiki has a search bar right (under the 'in other languages' on the left hand side)?
Guest
11th August 2012, 14:46
Unfortunately using search for "loadplugin" leads to this less-than-useful page:
http://avisynth.org/mediawiki/LoadPlugin
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.