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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 22nd June 2004, 05:51   #21  |  Link
91638
Registered User
 
Join Date: Jul 2002
Location: Germany
Posts: 42
@ Wilbert
Do you mean mpeg2dec3 from decodefix 1.10?
If you mean this i already use this dll with DVD2AVI 1.76.

I will search for ten black frames in the movie and will upload them today.
91638 is offline   Reply With Quote
Old 22nd June 2004, 06:27   #22  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,717
Quote:
Originally posted by 91638
@ Wilbert
Do you mean mpeg2dec3 from decodefix 1.10?
I think he means the version that Nic and trbarry released.

http://nic.dnsalias.com/mpeg2dec3.html
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 22nd June 2004, 07:22   #23  |  Link
jorel
Guest
 
Posts: n/a
@ Wilbert, Boulder and all
the screenshots that i posted was using mpeg2dec3.dll v1.10 and dvd2avi176 from D2s!
from dvd2avi176 with mpeg2dec3 v110 and avisynth 255: http://img37.imageshack.us/img37/541...ynthscript.jpg
from vob: http://img37.imageshack.us/img37/6026/vob.jpg
  Reply With Quote
Old 22nd June 2004, 08:04   #24  |  Link
91638
Registered User
 
Join Date: Jul 2002
Location: Germany
Posts: 42
Tried to upload the file to yahoo but always the error invalid filename, no matter what name the file has. So if you are interested in the file i could send you this via email.

Instead i made screenshots with the mpeg2dec3.dll version 1.10
The first one with ConvertToRGB()

http://img39.imageshack.us/my.php?lo...vertToRGB0.jpg

The second with ConvertToYUY2()

http://img39.imageshack.us/my.php?lo...vertToYUY0.jpg
91638 is offline   Reply With Quote
Old 22nd June 2004, 14:24   #25  |  Link
trevlac
budala
 
Join Date: Oct 2003
Location: U.S.
Posts: 545
@jorel

I'm not 100% sure how you made your pics, but the avs one looks like a PC->TV version of the vob one. It has a higher black level and a lower white level. Also, the avs one looks like the V (of YUV fame) was stretched a bit. I can see gaps in it when graphed. However, the saturation is still low.

Bottom line:

ColorYUV(levels="TV->PC") will make the avs one look like the VOB one.

The vob one is still a bit better, because the avs one has gone thru some changes.


@91638

Your 2 new pics look the same. They both have a lower black level than your prior d2v pic. I also sure the white level is the same for you an all pics. This means you do not have the same issue as jorel. Finally, the color saturation looks the same for you on all pics. This is harder to tell, because the pics are so dark. I still think if you do the tweak bright and contrast things, it will fix your pics.
trevlac is offline   Reply With Quote
Old 22nd June 2004, 14:38   #26  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
Quote:
I'm not 100% sure how you made your pics, but the avs one looks like a PC->TV version of the vob one.
I agree with you, but this shouldn't be possible.

Quote:
Tried to upload the file to yahoo but always the error invalid filename, no matter what name the file has. So if you are interested in the file i could send you this via email.
Could you try uploading a zipped version? Also, how large is it?
Wilbert is offline   Reply With Quote
Old 22nd June 2004, 15:19   #27  |  Link
Kika
Registered User
 
Join Date: Jul 2002
Location: Germany
Posts: 819
@91638

I suggest to extract a Pic from the encoded Video, not from VirtualDub and not from any other programm before it is encoded.

Use this Script:

LoadPlugin("D:\Videobearbeitung\AviSynth 2.5\plugins\MPEG2DEC3dg.dll")
Mpeg2Source("G:\chucky.d2v")
ConvertToRGB24()

And ensure NOT to set the Option Output YUV data as Basic........ in TMPGEnc.
Kika is offline   Reply With Quote
Old 22nd June 2004, 17:31   #28  |  Link
jorel
Guest
 
Posts: n/a
Quote:
Originally posted by Wilbert
[B]I agree with you, but this shouldn't be possible.
Wilbert, trevlac, Kika and all
edited> all pictures are before any encode(1 from vobs and 2 from d2v),loading in vdubmpeg2 and did a screenshot(source to clipboard)and paste in paint,resize 80% and save as .jpg! the preview in vdubmpeg2 show more details than the screenshots! <edited

the pictures posted was using "PC scale" in d2a176 and was resized(80%) to put in the link that don't accept more than 850Kb size. trust me, i post like i wrote.
i have new pictures with 80% of the size,take a look please:

vobs:

http://img34.imageshack.us/img34/5236/vobs.jpg

using pc scale in dvd2avi project:

http://img39.imageshack.us/img39/7083/pcscale.jpg

using tv scale in dvd2avi project:

http://img34.imageshack.us/img34/516/tvscale.jpg

i posted about that differences in kvcd forum a long time ago.(if needed i post the link, was in Fri Mar 19, 2004)

all my encodes from all dvds are always dark comparing with the original dvds,
it happen with all sources (movies or cartoons) using PC scale or TV scale without any resize or filter in .avs script! i did lots of samples to compare encodes in tv trying to find the reason of that "darkness".
:arrow: but before that tests, we can only "feel" that something is wrong after all job is done getting the dark and with faded colors(washed) pictures in tv !
...(and i want to do all the job again) and believe me, i redo (from the begining)
for me,the picture from the vob have ~15% better color and ~10% more bright/contrast and we are loosing that details BEFORE we start to encode!
today i posted the same in kvcd forum:http://kvcd.net/forum/viewtopic.php?t=11927
thanks for your atention!
  Reply With Quote
Old 22nd June 2004, 17:41   #29  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
@jorel,

Assuming you opened the d2v file in avs, without any color conversion in your avs script, and made a screenshot in VDub (please confirm):

What incredible said at kvcd.net is false: "YEP! In DVD2AVI if setting Scale PCtoTV the luma will be keeped within the TV Luma range."

If you open the d2v in avs, that setting is ignored (hence your *latter* two screenshots show no difference). That settings is *not* ignored if you open the d2v file in VFAPI or TMPGEnc.

The real question is why your latter two screenshots are darker than the vob one. Btw, how did you make the vob screenshot?
Wilbert is offline   Reply With Quote
Old 22nd June 2004, 17:54   #30  |  Link
jorel
Guest
 
Posts: n/a
@ Wilbert
i confirm. was loading only d2v file in avs with
LoadPlugin("C:\xxx\MPEG2DEC3.DLL")
mpeg2source("F:\pc.D2V")# first script for pc scale
and
LoadPlugin("C:\xxx\MPEG2DEC3.DLL")
mpeg2source("F:\tv.D2V")# second script for tv scale

and you wrote:
"The real question is why your latter two screenshots are darker than the vob one"
---> but this is my question! i don't know the reason(kidding but true)

the vob screenshot was loading the vob in vdubmpeg2 exact like i did using the scripts posted. i think that no matter if any color convertion was used(and i don't use) the results would be the same in all screenshots, right or wrong? (real doubts in this question)

edited> sorry, i forgot this importants details:
the result of the encode is always dark and with colors faded if compared with the original dvd in the pc or in the tv,seamless the pictures posted!
  Reply With Quote
Old 22nd June 2004, 20:07   #31  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
I tried it myself with the movie From Hell (**).

1) vob -> vdubmod -> png
2) vob -> d2v -> avs -> vdubmod -> png

You guys are right. There is a difference in brightness (the latter being a bit darker).

When using ColorYUV(analyze=true) in the second script, I saw that the minimal luma value was 7 for a particular frame. But, a lot of frames had a minimal luma value smaller than 16 (*).

I also found a frame with maximal luma of 243.

(*) yes, I cropped all black borders away.
(**) using mpeg2dec3 1.10 and dvd2avi 1.76.

What to do next?
Wilbert is offline   Reply With Quote
Old 22nd June 2004, 20:51   #32  |  Link
Inc
Squeeze it!
 
Inc's Avatar
 
Join Date: Oct 2003
Location: Germany
Posts: 472
Quote:
Originally posted by Wilbert
What incredible said at kvcd.net is false: "YEP! In DVD2AVI if setting Scale PCtoTV the luma will be keeped within the TV Luma range."

If you open the d2v in avs, that setting is ignored (hence your *latter* two screenshots show no difference). That settings is *not* ignored if you open the d2v file in VFAPI or TMPGEnc.
Yep right Wilbert, I mixed it up with VFAPI RGB.
Inc is offline   Reply With Quote
Old 23rd June 2004, 07:52   #33  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,389
It could be of interest to read this old thread once more - one out of several.

Everytime the topic comes up, I get the bad feeling to have encoded rubbish all these years ...

- Didée
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 23rd June 2004, 08:57   #34  |  Link
Kika
Registered User
 
Join Date: Jul 2002
Location: Germany
Posts: 819
I really don't see where the Problem is.
MPEG2Dec ignores the Settings of DVD2AVI (i don't like this behavior!), any other application will not.

If DVD2AVI/MPEG3Dec are doing they job correctly, you will get the Luma-Range of 16-235. On YUV->YUV- or RGB->RGB-Transformations, the Range isn't changed, on YUV<->RGB-Conversions, it is.

So if you are Converting to RGB, you will get 0-255, if not, the Range will stay at 16-235. I don't see a necessity to use commands for changing the Luma-Range.
So, at the end, what will you Script deliver to an Encoder and how is the Encoder acting?
CCE ignores it's Luma-Range-Settings if YUY2 is delivered, if you feed CCE with RGB24, the settings are use.
TMPGEnc always needs RGB24, so it is a good Idea to use ConvertToRGB24() as last command in the Script. Without this Command, a System-Codec has to do the YUV->RGB-Conversion, and maybe this Codec will distort the Luma-Range.
Kika is offline   Reply With Quote
Old 23rd June 2004, 09:55   #35  |  Link
Inc
Squeeze it!
 
Inc's Avatar
 
Join Date: Oct 2003
Location: Germany
Posts: 472
Quote:
Originally posted by Kika
If DVD2AVI/MPEG3Dec are doing they job correctly, you will get the Luma-Range of 16-235.
Thats how I understood it too!?
And thats how I also tried it (seen as a whole) to explain to Jorel in the KVCD Thread as I always want to end up in 16-235 encodings for TV purposes.

So did we really encode rubbish all these years?
Inc is offline   Reply With Quote
Old 23rd June 2004, 09:59   #36  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
@Kika

I agree with all that, but something fancy is going on. Consider the following two cases:

1) vob -> vdubmod -> png
2) vob -> d2v -> avs -> vdubmod -> png

For (2) we used the script

LoadPlugin("C:\xxx\MPEG2DEC3.DLL")
mpeg2source("F:\xxx.D2V")
ConverToRGB24()

In the second case, avs should deliver [0,255] RGB to VdubMod, and there's no YUV->RGB conversion in VDubMod. So, this should be the correct clip.

The only problem is that it is a bit darker than the first clip.

In the first case, VDubMod makes a YUV->RGB conversion (iirc VDubMod does the conversion, not some codec ?). The only thing what can go wrong is that VDubMod keeps the luma range when converting, ie YUV [16,235] -> RGB [16,235]. But, I'm pretty sure you get RGB [0,255] (*). So, that implies that the first clip is also correct.

So, which one is correct?

(*) will double check that tonight.

A quote from Didee's thread (about a separate problem, at least I think it's a separate problem):

Quote:
While the majority of Avisynth filters operate in YUY2 space, it's not clear which of them are guaranteed to produce 16-235/240 output, or even if they should only produce that range. It certainly seems that mpeg2dec passes out-of-range pixels through without clipping, even though these pixels seem always to be compression artifacts.
I agree that "mpeg2dec passes out-of-range pixels through without clipping". But, how do we know for sure that these pixels are just compression artefacts? I guess we could make those pixels visible with Levels. I will post some screenshots tonight.

Last edited by Wilbert; 23rd June 2004 at 10:03.
Wilbert is offline   Reply With Quote
Old 23rd June 2004, 10:29   #37  |  Link
Kika
Registered User
 
Join Date: Jul 2002
Location: Germany
Posts: 819
@Wilbert

Can't do that here, but did you ever compare DVD2AVI 1.76/MPEG2Dec3 to newer Versions of the Tools?

As far as i can check it, VirtualDubMod does the same Kind of MPEG2-Decoding MME does with the Setting

YUV-Range: ITU-R BT.601-Range

And that gives me always the correct Luma-Range. Extracted Pictures from VirtualDubMod and MME are exaktly the same than extracting a Frame from the D2V (TV-Settings) by using TMPGEnc.
Kika is offline   Reply With Quote
Old 23rd June 2004, 16:39   #38  |  Link
jorel
Guest
 
Posts: n/a
@ ink(incredible) and Didée posted about "did we really encode rubbish all these years?" in my opinion when we(well,you all,not me)find what is giving this dark result,i will trash my encodes and will redo everything again!

@ all
another point is that: it's not vdub that is giving the dark image,i don't use vdub in my convertions.i used this tool only to get the pictures to post. my encodes using D2S to or all tools needed to do my kdvds,always result dark comparing with the dvd source in tv or in pc.then,if vdub give some error in my case is irrelevant cos i don't use it in my encodes. i posted: "the pictures show less details than the images in vdub -->or loading in all suported places that open the scripts and vobs<--, or the results of samples encoded in the tv or in pc!" and "the result of the encode is always dark and with colors faded if compared with the original dvd in the pc or in the tv,seamless the pictures posted!" the "problem"(as i call) start between dvd2avi and before the encoder...something in the middle os this passes! ok,i can be wrong but i'm catching this problem fro more than a year and was the best that i could do! thank you boys!

edited> details...last year was using old versions of meg2dec or mpegedec3 in D2s and the result is the same with the new mpeg2dec3 versions! the "old" versions give the same result of the "new" versions!
  Reply With Quote
Old 23rd June 2004, 23:17   #39  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
Quote:
The only thing what can go wrong is that VDubMod keeps the luma range when converting, ie YUV [16,235] -> RGB [16,235]. But, I'm pretty sure you get RGB [0,255] (*).
Checked it, [0,255] is indeed correct.

I made a plugin which shows the out of bound values (red for pixels with luma < 16, and green for pixels with luma > 235). Requires YUY2 or YV12, but the latter doesn't work correctly.

http://www.geocities.com/wilbertdijk...OutOfBound.zip

Screenshots:

luma < 16


luma < 14


luma < 12


So, are these just compression artefacts?

edit: replaced the pics.

Last edited by Wilbert; 24th June 2004 at 19:22.
Wilbert is offline   Reply With Quote
Old 24th June 2004, 09:28   #40  |  Link
Kika
Registered User
 
Join Date: Jul 2002
Location: Germany
Posts: 819
What are die Luma values of the "false" Pixels? Maybe it's the result of rounding errors while iDCT or YUV->RGB conversion.
Kika is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:42.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.