AVS APL Study - Adjunct to AVS Contrast Project - Page 4 - AVS | Home Theater Discussions And Reviews
Baselworld is only a few weeks away. Getting the latest news is easy, Click Here for info on how to join the Watchuseek.com newsletter list. Follow our team for updates featuring event coverage, new product unveilings, watch industry news & more!


Forum Jump: 
 10Likes
Reply
 
Thread Tools
post #91 of 115 Old 05-16-2015, 12:04 PM
AVS Addicted Member
 
darinp2's Avatar
 
Join Date: Sep 2003
Location: Seattle, WA
Posts: 21,427
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 167 Post(s)
Liked: 141
Quote:
Originally Posted by Soulnight View Post
But the tutorial above is not enough for me. Could someone detail the steps for someone who has never used any of this software?
Great to see that you want to do this too. I just got this setup last weekend, but sorry that I didn't keep track of the steps I had to take. You may have figured it out by now, but one important step I recall finding in a thread here about this (probably the original CR thread stanger89 was referring to) was that I had to put DGDecode.dll from DGIndex in \Program Files (x86)\AviSynth 2.5\plugins.
Quote:
Originally Posted by Soulnight View Post
Does it only work with vob files? (dvd?)
How do you proceed with blu-ray/m2ts/mkv files?
The above does only work with DVD level. My goal today was to get this working for HD. I found DGAVCIndexNV, but not sure if that version will work on my PC. When I went to try it a few days ago I got an error that I needed to download some more stuff from a DG toolkit, which I plan to look into today.


Since the first tools were limited to DVD I got "Any Video Converter" to convert HD files to mpeg2. I remember that my virus scanner caught something trying to download an ad program and I think it might have been this one, but I'm not sure. In any case, I would prefer to analyze the original instead of converting first, so hopefully can get this process working for HD files.


--Darin

This is the AV Science Forum. Please don't be gullible and please do remember the saying, "Fool me once, shame on you. Fool me twice, shame on me."
darinp2 is online now  
Sponsored Links
Advertisement
 
post #92 of 115 Old 05-16-2015, 12:37 PM - Thread Starter
AVS Addicted Member
 
stanger89's Avatar
 
Join Date: Nov 2002
Location: Marion, IA
Posts: 18,151
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 571 Post(s)
Liked: 294
For HD, there are a few options. For AVC there's:
http://www.digital-digest.com/software/DGAVCDec.html

ffmpeg source can load just about anything:
http://avisynth.nl/index.php/FFmpegSource

The easiest way may be StaxRip:
http://staxmedia.sourceforge.net/

It includes all the source plugins you're likely to need, and the simple step of opening a video in it will perform whatever steps are necessary to create an avs file. Though one thing to watch out for, it seems to like to default to expanding video to PC levels, so be aware of that.

See what an anamorphoscopic lens can do, see movies the way they were meant to be seen
stanger89 is online now  
post #93 of 115 Old 05-16-2015, 02:39 PM
Member
 
Soulnight's Avatar
 
Join Date: Dec 2011
Posts: 147
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 43 Post(s)
Liked: 31
I downloaded Staxrip.

Seems like a magic tool...but I'm not a magician!

I would need your help.

What do I need for an .avs file? How do I use it?
How do I run a script? With which software? Is it with the avsfile?

Do I need to te reencode (lossy) the mkv I made from the m2ts blu-ray file?

Thank you!
Soulnight is online now  
post #94 of 115 Old 05-16-2015, 04:01 PM
Member
 
Soulnight's Avatar
 
Join Date: Dec 2011
Posts: 147
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 43 Post(s)
Liked: 31
OK guys, I got it to run. Still runs... but I could already look at the first results Blu-ray Django unchained!). But... I'll tell you only when it's finished!

I do have question:

Is the average luma given in the text file already gamma corrected (with a gamma or 2.2)?
It seems so because the value are so small (range about 9% Avg luminance).

But I do not see where in the script is it written!
Soulnight is online now  
post #95 of 115 Old 05-16-2015, 05:29 PM
AVS Addicted Member
 
darinp2's Avatar
 
Join Date: Sep 2003
Location: Seattle, WA
Posts: 21,427
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 167 Post(s)
Liked: 141
Quote:
Originally Posted by Soulnight View Post
Do I need to te reencode (lossy) the mkv I made from the m2ts blu-ray file?
I don't believe so.


I'll have to get back to this, but from an mkv I've gotten a .raw file that I ran through DGAVCIndex by following these instructions for avidemux:


RAW: specialist needs, not handled by avidemux afterwards in this format.
extracting the video only to raw:
leave both video and audio output set to [Copy]
set Output Format to [Video Only]
now use save and give it a name, don't add an extension.
The video should be saved with extention .raw

Now I need to get this to run through avisynth. I don't recall whether I need a special version of that for HD.


--Darin

This is the AV Science Forum. Please don't be gullible and please do remember the saying, "Fool me once, shame on you. Fool me twice, shame on me."
darinp2 is online now  
post #96 of 115 Old 05-17-2015, 03:05 AM
Member
 
Soulnight's Avatar
 
Join Date: Dec 2011
Posts: 147
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 43 Post(s)
Liked: 31
So here is what worked for me in the end:

I used StaxRip, opened the mkv in it and got from that this avs script in the temp files folder:

Code:
LoadPlugin("D:\Video\Software\StaxRip\Tools\Plugins\ffms2\ffms2.dll")
FFVideoSource("D:\Video\Django_Unchained\Django_Unchained_t00.mkv", cachefile = "D:\Video\Django_Unchained\Django_Unchained_t00 temp files\Django_Unchained_t00.ffindex", fpsnum = 24000, fpsden = 1001)
Crop(0, 140, -0, -140)
Unfortunately it didn't work like that. So I downloaded the ffms2 plugin separately and changed the path in LoadPlugin to the new ffms2.dll.

The complete avs script (that I opened with media player classic) is:

Code:
LoadPlugin("D:\Video\Software\ffms2-2.20-icl\x86\ffms2.dll")
FFVideoSource("D:\Video\Django_Unchained\Django_Unchained_t00.mkv", cachefile = "D:\Video\Django_Unchained\Django_Unchained_t00 temp files\Django_Unchained_t00.ffindex", fpsnum = 24000, fpsden = 1001)
Crop(0, 140, -0, -140)

filename = "Django"
ConvertToRGB()
Levels(16,0.4545,235,0,255,coring=false)
ConvertToYV12()
Selectevery(24,0)
AssumeFps(240)
colon = " : "
WriteFile(filename, "current_frame", "colon", "YPlaneMin", "colon", "YPlaneMax", "colon", "AverageLuma" )
WriteFileStart(filename, """ "AverageLuma for Django" """)
WriteFileStart(filename, """ "Frame : MinLuma : MaxLuma : AverageLuma" """ )
WriteFileEnd(filename, """ "End" """)
ConvertToYUY2()
One thing I'm wondering about is the line AssumeFps(240). Why are we doing this?

Thanks again for your help!
Soulnight is online now  
post #97 of 115 Old 05-17-2015, 03:25 AM
Member
 
Soulnight's Avatar
 
Join Date: Dec 2011
Posts: 147
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 43 Post(s)
Liked: 31
Arrow

Here the results for Django unchained (blu-ray) attached:



Average movie ADL: 8.10%
Attached Thumbnails
Click image for larger version

Name:	DjangoADLrange.PNG
Views:	54
Size:	31.8 KB
ID:	721434  

Last edited by Soulnight; 05-17-2015 at 05:15 AM.
Soulnight is online now  
post #98 of 115 Old 05-17-2015, 03:55 AM
Member
 
Soulnight's Avatar
 
Join Date: Dec 2011
Posts: 147
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 43 Post(s)
Liked: 31
And here the results for Django unchained if you DO take into account the black bars into the ADL analysis (so uncropped).



Average movie ADL: 6.00%


Attached Thumbnails
Click image for larger version

Name:	DjangoADLrange-UNCROPPED.PNG
Views:	54
Size:	32.5 KB
ID:	721458  

Last edited by Soulnight; 05-17-2015 at 05:16 AM.
Soulnight is online now  
post #99 of 115 Old 05-17-2015, 04:00 AM
Member
 
Soulnight's Avatar
 
Join Date: Dec 2011
Posts: 147
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 43 Post(s)
Liked: 31
Quote:
Originally Posted by Soulnight View Post
OK guys, I got it to run. Still runs... but I could already look at the first results Blu-ray Django unchained!). But... I'll tell you only when it's finished!

I do have question:

Is the average luma given in the text file already gamma corrected (with a gamma or 2.2)?
It seems so because the value are so small (range about 9% Avg luminance).

But I do not see where in the script is it written!

I Do know now! I found it.

Code:
Levels(16,0.4545,235,0,255,coring=false)
This line converts the APL of each pixel into ADL with a approximation of the gamma 2.2 (which is 1/0.4545).

Soulnight is online now  
post #100 of 115 Old 05-17-2015, 05:12 AM
Member
 
Soulnight's Avatar
 
Join Date: Dec 2011
Posts: 147
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 43 Post(s)
Liked: 31
Here the results for one bright movie/animation: ICE AGE 4

Uncropped:


Cropped:
Attached Thumbnails
Click image for larger version

Name:	IceAge4ADLuncropped.PNG
Views:	52
Size:	32.1 KB
ID:	721562   Click image for larger version

Name:	IceAge4ADLcropped.PNG
Views:	53
Size:	31.3 KB
ID:	721570  
Elix likes this.
Soulnight is online now  
post #101 of 115 Old 05-17-2015, 06:55 AM - Thread Starter
AVS Addicted Member
 
stanger89's Avatar
 
Join Date: Nov 2002
Location: Marion, IA
Posts: 18,151
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 571 Post(s)
Liked: 294
Quote:
Originally Posted by Soulnight View Post
One thing I'm wondering about is the line AssumeFps(240). Why are we doing this?
I think I did that originally so it would "run" faster. If you open an AVS script in a media player (WMP, etc) they'd play it at 24fps, which would take the whole runtime to finish. Of course if you use something that ignores the source frame rate that line doesn't do anything.

See what an anamorphoscopic lens can do, see movies the way they were meant to be seen
stanger89 is online now  
post #102 of 115 Old 05-17-2015, 09:37 AM
Member
 
Soulnight's Avatar
 
Join Date: Dec 2011
Posts: 147
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 43 Post(s)
Liked: 31
I just analysed Alien as well.
I change the format of the graph to present the results more clearly and to show fairly the distribution in the luminance.

It's crazy how much there is below 3% in the 3 films!

Without black bars (cropped) results:



With black bars (uncropped) results:

Attached Thumbnails
Click image for larger version

Name:	APL-3films-cropped.png
Views:	56
Size:	39.4 KB
ID:	721850   Click image for larger version

Name:	APL-3films--UNcropped.png
Views:	55
Size:	43.1 KB
ID:	721858  
Elix likes this.
Soulnight is online now  
post #103 of 115 Old 05-17-2015, 09:52 AM - Thread Starter
AVS Addicted Member
 
stanger89's Avatar
 
Join Date: Nov 2002
Location: Marion, IA
Posts: 18,151
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 571 Post(s)
Liked: 294
IMO you really don't want to include the bars, that just skews the results, they're just an artifact of the encoding of the movie.

See what an anamorphoscopic lens can do, see movies the way they were meant to be seen
stanger89 is online now  
post #104 of 115 Old 05-17-2015, 11:02 AM
Member
 
Soulnight's Avatar
 
Join Date: Dec 2011
Posts: 147
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 43 Post(s)
Liked: 31
Quote:
Originally Posted by stanger89 View Post
IMO you really don't want to include the bars, that just skews the results, they're just an artifact of the encoding of the movie.
I just "take them into account" afterwards because I know how I much I "cropped". And I know that they have pure black, so it's pretty simple to have this others ADL.

And I DO think that it's as important as the other ones..since on almost all consumers blu-rays+projectors, you will display the black bars as well, and so the ADL in each frame is decreasing a bit.

And then you can really compare contrast measurement of the projector (1920*1080p) with the picture ADL of the film with the black bars that the projector will display anyway...

Last edited by Soulnight; 05-17-2015 at 11:05 AM.
Soulnight is online now  
post #105 of 115 Old 05-18-2015, 11:15 AM
AVS Addicted Member
 
darinp2's Avatar
 
Join Date: Sep 2003
Location: Seattle, WA
Posts: 21,427
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 167 Post(s)
Liked: 141
It looks to me like we are losing information for some low levels due to lack of precision. For instance, a full image encoded at level 20 (and even some distance higher than that) looks like it would get releveled to be the same as a full image encoded at level 16. Does anybody know how to increase the precision, like have things done in at least the 10 bit space from the point of applying gamma on?

Thanks,
Darin

This is the AV Science Forum. Please don't be gullible and please do remember the saying, "Fool me once, shame on you. Fool me twice, shame on me."
darinp2 is online now  
post #106 of 115 Old 05-18-2015, 11:35 AM
Member
 
Soulnight's Avatar
 
Join Date: Dec 2011
Posts: 147
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 43 Post(s)
Liked: 31
Quote:
Originally Posted by darinp2 View Post
It looks to me like we are losing information for some low levels due to lack of precision. For instance, a full image encoded at level 20 (and even some distance higher than that) looks like it would get releveled to be the same as a full image encoded at level 16. Does anybody know how to increase the precision, like have things done in at least the 10 bit space from the point of applying gamma on?

Thanks,
Darin
Why do you think so? How did you test it?

Because as I said, I checked on a grayscale calibration video, and except for the small adjustement on the level function to go along the 0-255 range, it was in very good accordance!

Maybe your method to check it isn't right. (hoping )
Soulnight is online now  
post #107 of 115 Old 05-18-2015, 11:53 AM
AVS Addicted Member
 
darinp2's Avatar
 
Join Date: Sep 2003
Location: Seattle, WA
Posts: 21,427
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 167 Post(s)
Liked: 141
Quote:
Originally Posted by Soulnight View Post
Why do you think so? How did you test it?
As an example, when I made a video with a 5% video level window on black my result was 16.000000.

I can check some more numbers later, but I have the feeling that all pixels encoded up to about video level 8% are treated as if they are encoded at black (for that color primary at least).

For instance, take encoding 34 in video space. That is 18 out of 219, or 0.082. Apply 2.2 gamma and that goes 0.004. Multiply by 219 and the result is 0.9. Level that to 8 bit space with a 16 offset and unless there is rounding it is now 16.
Quote:
Originally Posted by Soulnight View Post
Because as I said, I checked on a grayscale calibration video, and except for the small adjustement on the level function to go along the 0-255 range, it was in very good accordance!
Did you check to see what it would give you if you considered those calibration images to be video levels? For instance, a full image encoded at video level 20? I sent you an example.

I would like to be wrong too.

--Darin

This is the AV Science Forum. Please don't be gullible and please do remember the saying, "Fool me once, shame on you. Fool me twice, shame on me."

Last edited by darinp2; 05-18-2015 at 11:58 AM.
darinp2 is online now  
post #108 of 115 Old 05-18-2015, 01:57 PM
Member
 
Soulnight's Avatar
 
Join Date: Dec 2011
Posts: 147
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 43 Post(s)
Liked: 31
You are right, there is a small mistake which is done...but when you do the histogramms every 1% ADL, you actually don't do (or almost) any mistakes. (I checked, the tool does round).

See below:





Attached Thumbnails
Click image for larger version

Name:	Toolcheck_Page_1.jpg
Views:	34
Size:	127.3 KB
ID:	724922   Click image for larger version

Name:	Toolcheck_Page_2.jpg
Views:	34
Size:	145.9 KB
ID:	724930   Click image for larger version

Name:	Toolcheck_Page_3.jpg
Views:	34
Size:	136.3 KB
ID:	724938   Click image for larger version

Name:	Toolcheck_Page_4.jpg
Views:	34
Size:	127.5 KB
ID:	724946   Click image for larger version

Name:	Toolcheck_Page_5.jpg
Views:	34
Size:	71.3 KB
ID:	724954  


Last edited by Soulnight; 05-18-2015 at 10:41 PM.
Soulnight is online now  
post #109 of 115 Old 05-18-2015, 02:11 PM - Thread Starter
AVS Addicted Member
 
stanger89's Avatar
 
Join Date: Nov 2002
Location: Marion, IA
Posts: 18,151
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 571 Post(s)
Liked: 294
These might be helpful for processing at greater than 10 bit
http://avisynth.nl/index.php/High_bi..._with_Avisynth
http://forum.doom9.org/showthread.php?t=170509
http://forum.doom9.org/showthread.php?t=154971

It sounds like AVISynth, while being limited to 8-bit can handle two stacked 8-bit clips effectively giving it 16 bit precision. I haven't investigated to understand how to make use of it. But SmoothAdjust has a SmoothLevels filter that has a gamma parameter.

See what an anamorphoscopic lens can do, see movies the way they were meant to be seen
stanger89 is online now  
post #110 of 115 Old 05-18-2015, 07:36 PM
AVS Addicted Member
 
darinp2's Avatar
 
Join Date: Sep 2003
Location: Seattle, WA
Posts: 21,427
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 167 Post(s)
Liked: 141
Quote:
Originally Posted by Soulnight View Post
You are right, there is a small mistake which is done...but when you do the histogramms every 1% ADL, you actually don't do (or almost) any mistakes. (I checked, the tool does round).
Thanks. I saw some indications of that after I posted, so figured it essentially crushes things encoded at about video level 6 and below with 2.2 gamma.
Quote:
Originally Posted by Soulnight View Post
See below:
Nothing shows up here for me.


Thanks,
Darin

This is the AV Science Forum. Please don't be gullible and please do remember the saying, "Fool me once, shame on you. Fool me twice, shame on me."
darinp2 is online now  
post #111 of 115 Old 05-18-2015, 10:48 PM
Member
 
Soulnight's Avatar
 
Join Date: Dec 2011
Posts: 147
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 43 Post(s)
Liked: 31
Quote:
Originally Posted by darinp2 View Post
Nothing shows up here for me.
It should work now.
Soulnight is online now  
post #112 of 115 Old 05-19-2015, 12:03 AM
AVS Addicted Member
 
darinp2's Avatar
 
Join Date: Sep 2003
Location: Seattle, WA
Posts: 21,427
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 167 Post(s)
Liked: 141
Quote:
Originally Posted by Soulnight View Post
It should work now.
Thanks.

For some dark images that I was trying to get the ADL for I'm thinking that maybe I could learn more by leveling the 16 to 235 levels to 128 to 347, or something like that, if I don't figure out how to do this in higher than 8-bit space. Seems like at the least I should be able to get a more accurate value for the min, max, and median values for these images that way, where I think many of them don't have any pixels even approaching 50% video level.

I've also estimated ADLs I was getting before by measuring how bright the light is bouncing off the walls in my living room setup, but that quickly goes lower than I can measure and is somewhat crude with directionality issues. I wonder if I could defocus the image, then measure off the screen and get reasonable ideas of what I'm actually getting for average luminance as displayed that way. I could always try it with some test patterns.

--Darin

This is the AV Science Forum. Please don't be gullible and please do remember the saying, "Fool me once, shame on you. Fool me twice, shame on me."
darinp2 is online now  
post #113 of 115 Old Yesterday, 11:03 AM
Member
 
Soulnight's Avatar
 
Join Date: Dec 2011
Posts: 147
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 43 Post(s)
Liked: 31
The Art of flight

The brightest film of all!

The Art of flight! Snow, snow, snow...

Attached Thumbnails
Click image for larger version

Name:	ArtOfFlight-cropped.PNG
Views:	18
Size:	16.6 KB
ID:	729066  
Elix likes this.
Soulnight is online now  
post #114 of 115 Old Today, 02:40 PM
AVS Addicted Member
 
darinp2's Avatar
 
Join Date: Sep 2003
Location: Seattle, WA
Posts: 21,427
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 167 Post(s)
Liked: 141
Interesting results from The Art of Flight. Given the limits of cameras and human vision I wonder how much ANSI CR off the screen really matters for that material even though it does have a lot of images that are brighter than the ANSI checkerboards. For example, if ANSI CR is say 20:1 to 30:1 because of white walls then a little bit of black in a mostly white scene could be 1/20th of the white around it and still look very dark to human vision. It might be that certain ANSI CR differences are more noticeable in 25% ADL scenes than 75% ADL scenes in general.

Soulnight,

Does that include the credits? I don't know how the credits are displayed for that one, but if they are like a lot of content then they could account for much of the under 5% ADL frames.

Thanks,
Darin

This is the AV Science Forum. Please don't be gullible and please do remember the saying, "Fool me once, shame on you. Fool me twice, shame on me."
darinp2 is online now  
post #115 of 115 Old Today, 02:47 PM
Member
 
Soulnight's Avatar
 
Join Date: Dec 2011
Posts: 147
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 43 Post(s)
Liked: 31
No I removed the credits from the analysis already!
Soulnight is online now  
Sponsored Links
Advertisement
 
Reply Digital Hi-End Projectors - $3,000+ USD MSRP

Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page


Forum Jump: 

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off