View Full Version : prog to check quality by extracting frames


pjotor
25th March 2003, 18:05
Frame Harvester is a tool you can use to extract pictures from movies.
The main idea is to extract the same frame from different encodings which are encoded with different settings, avs filters or codecs. You then compare the images to see which has better quality.

If you only have a few frames you want to extract then you might be better off with Virtualdub. Frame Harvester's power lies in extracting many frames.


-Supports avi, mkv, wmv, mp4 and avisynth scripts.
-Extracts to bmp or jpg format.
-Supports parameters

Screenshot (http://img167.imageshack.us/img167/3145/frameharvester0pp1.jpg)
Website (http://www.freewebs.com/pjotor/)
No direct link, sorry. Freewebs doesn't allow that. You have to go through my website.

Sorry about the horrible description in the thread title. I don't know what I was thinking way back in 2003 :)

esby
27th March 2003, 02:02
mmm i'm a bit curious... :rolleyes:

What does your program exactly?
Except making screenshot? (maybe i'm wrong?)
Does it compare by statistical way two encodes?
If yes, by which method?

I'am asking because i tried to do a program
to compare encode vs source & encode vs other encode,
i tried to use psnr,
but i ended finding that psnr is not concluding for comparing encode.

esby

pjotor
27th March 2003, 09:04
It does no more than screenshots. Taking a screenshot from the same frame from different encodings will show which has better quality. You have to use an image viewer to compare the images.

Valky
27th March 2003, 15:35
are the jpg quality-settings at 100% ?

Also the idea is pretty good..could you put an option so that user can specify in which folder the pictures are stored..also there seems to be some bugs..I tried with two clips with random 5 pictures and it took 5 times the excacty same screenshots even if the framenumbers in queue were very different.



Hmm..this doesn't seem to work at all anymore..it always takes the same frame which I believe is the first one. It did work with same files when I first tried this proggy..I wonder what I did..

Hmm..it didn't work at the first time either..I just realized it was the same frame then and I didn't test it more..this always takes only the first frame.

My encoding is with divx 5.02 without any other fancy options. Only differences I made with two files was that I used bilinearresize in the first one and fastbilinearresize on the second one..

pjotor
27th March 2003, 16:29
yes, jpg quality is 100%

directory for images is on the way.

Same screenshots ? Weird. I tested with 5.03 and it worked fine but I'll do some testing with 5.02.

pjotor
27th March 2003, 17:36
I found a simple solution.
-On the Start menu : DivX - DivX Pro Codec - Decoder Configuration.
-Or run <DivX5 dir>\DivX Pro Codec\config.exe
-Or if you're using Windows Media Player: File - Properties - Advanced tab. Double click 'DivX Decoder Filter'.

On 'Quality Settings' tab, make sure 'Overlay Extended Mode' is checked.


Or uninstall DivX 5. Yes, that also worked :)

Valky
27th March 2003, 22:49
overlay checking absolutely fixed everything, thank you :)

aquaplaning
28th March 2003, 10:14
we coded a tool called "AVS Compare" to compare different avisynth filters, but you can also use it to compare different video files. (and make screenshots)

you can zoom in and switch between the sources during playback.

read this thread
http://forum.doom9.org/showthread.php?s=&threadid=40675

and download it from my hp (full source included)
http://aquaplaning.20m.com

aqua

p.s. taking screenshots for quality comparison as jpg is no good idea in my opinion as it is not lossless, even at 100%.

pjotor
28th March 2003, 11:03
AVS Compare is very nice. I believe I missed it when I was searching for progs similar to what I had in mind before starting coding my prog.

Originally posted by aquaplaning

p.s. taking screenshots for quality comparison as jpg is no good idea in my opinion as it is not lossless, even at 100%.
Correct. That's why there's an option to save as bmp files :)

N_F
28th March 2003, 13:41
@pjotor

You sure you're from Finland? ;) "Fiskaren" is a very much swedish word.

pjotor
28th March 2003, 15:32
Originally posted by N_F
"Fiskaren" is a very much swedish word. That's the idea:) It was the first name I could think of when beginning coding and it was meant to be just a temporary name but it stuck. I'm actually swedish speaking but I'm from finland.

Valky
28th March 2003, 21:07
Originally posted by aquaplaning
we coded a tool called "AVS Compare" to compare different avisynth filters, but you can also use it to compare different video files. (and make screenshots)

you can zoom in and switch between the sources during playback.

read this thread
http://forum.doom9.org/showthread.php?s=&threadid=40675

and download it from my hp (full source included)
http://aquaplaning.20m.com

aqua

p.s. taking screenshots for quality comparison as jpg is no good idea in my opinion as it is not lossless, even at 100%.


This is true..and I really appreciate your work. Your tool is daily used. But there are still some issues with 2.5 version and the video can be only played for certain amount of frames (these issues are not in 2.7 version) , but this software of my compatriote is really faster and comes more handy in this purpose. It includes PicViewer and you can always store your images at bmp-format.

No offence to anyone, but let's just give always credit to all great ideas and to those who make the difference :)

pjotor
29th March 2003, 16:35
New version availible. As requested, an option to select output folder has been added. Use link at first post to download.

vhelp
29th March 2003, 16:38
hi aquaplaning..


aquaplaning wrote:
>> p.s. taking screenshots for quality comparison as jpg is no good
>> idea in my opinion as it is not lossless, even at 100%.

I'm not sure about this lossless (though I believe your statement
to be true) but I'll ask a dumb question.. for taking snapshots of
screen displays, what is the optimum format(S) to save as ??

Currently, I am saving as *.PNG files, cause I thought that they
WERE lossless !!

EDIT: forgot to mention, the question above was asked becuase I too,
have an app that in short, aids in quality comparisons that I use.

Thank you for your answere(s)
-vhelp

HurlyBurly
29th March 2003, 17:56
Most Bitmaps (without RLE compression) and Sun Raster images are definitly uncompressed, therefore, as lossless as can be. Each pixel is raw RGB value. Dunno about png but i'm sure there are other uncompressed formats out there besides the two i mentionned.

vhelp
29th March 2003, 18:10
.
.
ok then.. baring the above in mind (weather any format is used in
an PIC saving routine) as long as BOTH pics (that are being compared)
are using the SAME "saved" format) then there really souldn't be
any issues as far as "true" uncompressed format is confirned.

If both pics are using the same format, then it really shouln't
matter all that much. You'll still be able to spot differences
when you compare the two pics.

Now, of course, I'd like to use the best format that will save the
pic(s) so that as much as artifacts can be ruled out, when finalizing
true or best quality. The I app I have created allows a user to
open .bmp; .png and .jpg files. I felt that this was enough for my
app to use in guaging quality, when tyring to perfect "filter" usage
in vdub or AVIsynth etc.

I will definately keep an eye out for which format to use, and in my
app, and once finalized, I will make it an "option" to save as, the
prefered format for un-compressed format. If it has to be .BMP
files, though they are LARGE in size, so be it. Yes, I did know that
.BMP files are un-compressed, but I thought there were others, even
smaller formats. Oh, well.. if any one knows of other format, please
let US know.

Thank you all for your assistance, and have a good day.
-vhelp

HurlyBurly
29th March 2003, 20:09
Originally posted by vhelp

If both pics are using the same format, then it really shouln't
matter all that much.



I'm not sure about this. My guess is 2 "different" images will compress differently. Not only that, you're also grabbing already compressed images and compressing compression is not good ;) Just grab a jpg at 100% and resave it as jpeg 100% a few times... you'll see the results. The only way to make sure you have a good comparaison ground imo would be to allocate same bit quantity to each pixel (aka uncompressed formats).

But then i might be wrong...

vhelp
29th March 2003, 20:16
hi HurlyBurly,

actually, I had already thought of that (your statement) right after
I had posted. I just didn't feel like revising it :eek:

But, even then, I continue to use other formats for quickies. But,
yes, for serious encodes, I do use .BMP (and also .PNG) but I don't
know for sure about .PNG files. I'll wait till I hear or find out
on my own weather or not .PNG is lossy or lossless. :rolleyes:

-vhelp

esby
29th March 2003, 23:30
Afik,
PNG can do lowsy or lowless compression
depending of the setting used.
Even with saving to a JPEG like format,
you are able to see difference between two encodes.
Of course you might not be able to see
the problems linked to what could be 'cleaned'
or altered by the JPEG Compression.

But personnaly, for comparing two same encodes,
i'll tends to watch the two encodes and check for problems in both...
I have no such use of images, unless for editing them,
and in that case a bmp saver can easily do the trick.

esby

vhelp
30th March 2003, 00:03
Hi esby,

What is the purpose.. you ask ??

The purpose of the image compare (those apps that do this) is to see if
one frame from a give AVI video stream is different from another frame
of that same video stream, but "filtered" or "encoded".

An example..

Say I wrote a AVS script using one of my "filter-chain" FC.A routines,
and then say I got hold of another "filter-chain" from a user FC.B on
this FORUM.
.
.
So, I open the AVS script for FC.A in vdub, and copy a frame to
clipboard and save as BMP file.
.
.
Then, I open the other AVS script FC.B (perhaps in another vdub
window, and proceed to copy frame to clipboard and save as BMP file. There
are many techniques or apps that do this even better. I have such an app
that can take AVI avi file (video stream) and play in a time-line window,
and I or user can position to a scene or frame and Copy or Save as BMP file.
Anyways..

So, now I have TWO images (or pics) that I want to have a look'seez at to
compare, and see which one is displaying the most artifacts (or the least)
whichever your direction..

If MY FC.A is showing the least amount of artifacts than FC.B,
I know I am on safe grounds, but if that users FC.B is showing better
or least amount of artifacts in his/her AVS script set of "filter-chain".. I
want to futher study THAT user's "filter-chain" and/or see where MY
"filter-chain" needs adjusting OR maybe I want to start using THAT user's AVS
script's "filter-chain" or whatever !!

Also, a lot can be learned from this approach or process (which I would
catagorize as Advanced stages of video processing) .. A user can:
* better produce his/her encodes
* increase quality
* decrease size/quality ratio per CDR or DVDR/RW etc.
* increase speed of encoding (based on studied filter use/values)
* demonstrate the good, the bad, and the ugly of encodes or filtering etc.
* anything else I left, goes here..

That's the purpose of comparing images or pics. Now, there are better tools
for this kind of process. You just have to find which one works best for
your given situation or whatever.

As for me, I use my own app to compare pics based on my "filter-chain" that
I use in AVIsynth scripts OR vdub filter use. I'm currently envolved in TWO
app developments for just this kind of thing. They are really just apps that
I create for my own personl use, (though I've shared one of them, but based
on personl observations, I feel that know-one actually uses my app
regularly - poo..hoo)

Anyways.. I'm developing and debuggin one now.

So, I would definately NOT ignore those apps that help in your video
encoding process. Deffinately look into these apps if you are cerious about
perfecting video quality in your final encodes. These tools are worth their
weight !!

-vhelp

esby
30th March 2003, 01:53
@vhelp
i think i understood the purpose of this tool since a while,
To be more exact, its purpose is screenshot dropping,
not image comparison, even if it can be used for image comparison.
But it you drop them on the hd, you are not going obviously
to use the tool to compare them.

More seriously
Of course, a tool for 'fast making' screenshot,
is a good thing indeed.
But like i said for direct image comparison of two clips,
i think we can skip the bmp/jpeg part
using:
file1.avs <click on the nice popup 'sendTo vdub' >
file2.avs <click on the nice popup 'sendTo vdub' >
and compare directly the two clips in the two vdub...
using alt tab ,arrow keys, and ctrl+G.

I wont go by intermediate steps of having image on hd,
unless if i want to make screenshot...
or if i want to show to other people
the possible problem without sending the two files...

esby
PS: and i'm not really ignoring the dev of this application,
even if i have no use for it actually, or i wouldn't have posted
in this thread the first time.
Of course i may agree that i was more interested by a possible statistic analysis. Because when you have 40000 frames to check over an avs script, it's good to have some advanced tool for that.

PPS: for the application, i think i good idea could be to include
informations on each frame dropped on harddisk,
Like sizeofFrame, drf used if available, any info usable.
this way is more for comparing after encode, (not really for chain filters comparison) since avs 'kills' all these info.
And then, having the possibility to add the info in overlay of the two images, to directly access these when they are needed.
(eg: an image who got LumaBlock in div3, with a drf of 2
,if you dont have the drf info, you can only guess it was a bad drf problem (bug of the codec...) )

Valky
31st March 2003, 09:54
Originally posted by esby
More seriously
Of course, a tool for 'fast making' screenshot,
is a good thing indeed.
But like i said for direct image comparison of two clips,
i think we can skip the bmp/jpeg part
using:
file1.avs <click on the nice popup 'sendTo vdub' >
file2.avs <click on the nice popup 'sendTo vdub' >
and compare directly the two clips in the two vdub...
using alt tab ,arrow keys, and ctrl+G.


This isn't the same thing if you wanna analyze excact same avs script with different kind of codec settings!! With b-frames, without b-frames, with different kind of quantisizers etc..

..and avscompare is much better tool to compare even four different avs script at the same time than vdub..at least from my opinion..

HurlyBurly
31st March 2003, 17:47
I think the problem with these quality checking methods is the human eye factor. No matter how many clips you compare "visually", what looks good for you might look bad for me. Maybe you like a soft picture, maybe i don't... So i tend, just like esby I beleive, to rely on statistical figures to judge a clip appropriatly.

But heck, this is the eternal debate in image processing of what looks "good" and what looks "bad" and we're not about to solve that. These are decisions that have to be made wether statistics are involved or not. Might as well have the visual tools for it too...

Now if we could have both... Perhaps overlaying stats on the screenshots or simply include both functionnalities in one tool ;)

esby
31st March 2003, 21:24
What i mean with statistical data, is that,
You can always compare frames to check quality in particular samples.
But sometimes checking data such as drf values used can be more efficient to detect errors & problems,
such as 'what these 'drf=32' frames are doing in the middle of the clip ...'
Of course you can use any tool you want to visually check these frames,
but i doubt this tool will tells you that these ten frames over 35000 are badly encoded, unless you check each frame one by one...
The problem stays the same if you a ten dropped frame in a clip and want to locate them...

@valki
1- i was talking of 'FrameFiskaren', not avscompare.

But to answer you:
'This isn't the same thing if you wanna analyze exact same avs script with different kind of codec settings!! With b-frames, without b-frames, with different kind of quantisizers etc.. '

I'm wondering how it will be not the same thing,
no matter the source of two clips, you can compare them,
if you encoded a clip it's kinda normal that you may want to check all the info available on the process,

You might find that frames (XX-YY) from clip A are better than frames (XX-YY)' from clip B,
but that will not allow you to conclude :'filter settings for A were better than those for B',
because there could have been any encoding problem when creating B.

Of course you might say that comparing avs is not sensible to encode settings, but what interrests me here is the final result, not an intermediate step before encoding.

esby

Ookami
2nd April 2003, 20:28
Codec comparisons:

http://forum.doom9.org/showthread.php?s=&threadid=19705