DivX DRF Analyzer - 0.9.5

 

DivX DRF Analyzer 0.9.5 opens DivX;) 3.11, DivX 4, DivX 5 and XVID avi files and analyses its quality. Plots a graphic with the DRF values/quantizers of each frame. Also plots a graphic with the size of each frame. Identifies key and dropped frames. A report is generated with overall technical/statistical characteristics of the file.

 
Added a small article about the recommended resolution feature and how is calculated. Click Here.
 
[New in 0.9.5.1]
Just a quick small fix to support DivX 5.0.5.
 
[New in 0.9.5]
Packeted Avi Frames Support for full account of B-Frames in DivX5 codec. Very CPU intensive, resulting in slower analysis, when necessary only.
New configuration file. Generated automatically with default values.
Minor changes in the report section.
Minor source cleaning. Optimized (hopefully) compilation options.
 
[New in 0.9.4]
Command Line Options: DRFanalyzer.exe [filename.avi] [--output DRFreport.txt] . It is now possible to open a video file using RightclickOnFile->OpenWith->ChooseProgram->Other. When generating a DRFreport.txt the program exits automatically when finished.
DRF export feature should be working properly know. Backward compatible with previous export versions.
Minor optimizations.
 
[New in 0.9.3]
Static MFC compilation. No more dlls required. Larger file size...
It is no longer necessary to have any codec installed.
Identify the FourCC of the avi file. With the mpeg4 user data, the encoder codec is now completly identified.
Suport for the original MS MPEG4 v2 and v3.
Should be a little faster.
Reading drf export files may result in missing/strange values in the Report Section. To be fixed in future releases.
 
[New in 0.9.2]
Implemented a MPEG4 bitstream parser class based on XVID source code.
Support for DIVX3.11, DIVX4.x, DIVX5.x and XVID.
Support for I, P, B, S frame types. B frames and DivX5 packeted bitstream support isn't complete yet.
Identification of mpeg4 encoder using internal user data string when available (XVID and DIVX5).
Report section was updated with more information. Frame type statistics, recommended resolution and other minor changes.
Reading export files may result in strange values in the Report Section. To be fixed in future releases.
 
[New in 0.9.0]
Added DivX4 (version 4.12 only) support. The frame structure seams to change with different versions of DivX4. For instance, this program doesn't support files that were encoded with version 4.0 of the DivX Codec. For more information click here.
Fixed a small annoying bug.
 
[New in 0.8.3]
Added the option to correct the DRF statistical information ( not the graphics ) by ignoring the last 15000 frames of the movie ( ~10 minutes ).
Minor changes.
 
[New in 0.8.2]
Minor graphical changes. Some thresholds were tuned in the Report section
 
[New in 0.8.1]
Minor changes. The frame size graphic was not completely draw.
 
[New in 0.8]
- Generates a report with some facts about the file and a subjective classification of the video quality.

- Verifies the deviation to the average of the DRF values.

- Exports the analysis to a file for future use, or to show to someone else the quality of a file. This can be useful when trading, the export is about 1MB ( ~33% if Zip Compressed) and can be easily uploaded/downloaded.
 
ATTENTION: The screen color depth must be 32bit. RightClickOnDesktop->Properties->Settings.
This Program was tested in Windows2000, XP and 2003RC2 only. In Win95/98/ME, it may not work properly. The Frame Size graphic isn't draw in Win98se.
Reading from a CD-ROM may be slow.
 
Download: DivX DRF Analyzer 0.9.5.1 (static binary).
Attention: Unfortunately, version 0.9.5 doesn't support DivX 5.0.5. Should be fixed in 0.9.5.1.
Warning: DivX5 packeted B frames should be correctly identified now, but analysis is slower in those files.
 

This program was developed using some code from Nandub to open the Avi File, wich was based in VirtualDub www.virtualdub.org.

The C++ MPEG4 Header Bitstream Parser was based on XVID source code, www.xvid.org.
 
Because of NanDub/VirtualDub and XVID distribution license, here is the source code of DivX DRF Analyzer 0.9.2 (scr)
 
Any Question/Suggestion: nfj@mail.pt
GuestBook: Write a message  - View Messages

 

 

Screen Shots

 
 
 
 
  Black : Key Frames.

DRF graphic:

  Green : DRF value between 2 an 4.
  Yellow : DRF value between 5 an 8.
  Red : DRF value above 8.

Frame Size graphic:

  Blue : Frame Size below average.
  Orange : Frame Size above average.
 
When there is no DRF value, the frame was dropped by the Codec when compressing.
 
 
 

Information

 
 
     DRF values. When encoding, the mpeg4 codec compresses each image in order to achieve a certain bitrate. The required level of compression depends on the desired bitrate, image complexity and level of motion. For each frame, a decision is made, resulting in the DRF values. The maximum quality is achieved with a DRF value of 2 (quantizer 1 is possible in XVID). The worst is obtained with a DRF of 31. Above DRF 8, I consider it to be very bad quality. The DRF/quantizer represents the quantity of information discarded by the encoder reducing the frame size.
     DivX4, 5 and XVID calls it Quantizers.
     Dropped frames occur when the codec doesn't have enough bitrate to encode a frame. Then it is marked as dropped and no information is included. Black images may also be discarded.
     A key frame is a special image that doesn't depend on the previous or future ones. Is required for seeking the file, improves the image quality in scene changes and cleans accumulated errors.
     These factors are very important for the quality of a DivX but aren't the only ones. The image resolution is also very important and any smoother filtering performed when encoding, like the crispness value. A very Low resolution ( below 512 horizontal ) and crispness below 70% can reduce greatly the quality of the result. This program doesn't analyze this problem.

     The report (starting at version 0.9.2) suggests a resolution in order to achieve a certain DRF/quantizer average. The target average is 2.8 and assumes that the file size changes linearly with it. That is not quite true but, for higher DRF average it is close.

     Assuming that S1/S2=q2/q1 when H1=H2 and W1=W2 is a good approximation, the equations for the resolution are: H2=sqrt(q2/q1)H1 and W2=sqrt(q2/q1)W1. Please click here for more information. This is supposed to be an hint, not an absolute true.
 
     A good TWO (2) CD DivX has an average DRF below 3 (three), no dropped frames and a maximum DRF of 6 (six) ( 2% max. ).The deviation should be less than 1. The resolution should be equal or bigger than 608 horizontal. ( DVD 16:9 source ), unless there is too much motion and/or image noise and/or the running lenght is high.
 
Export File
 
To save the results for later analysis, it is possible to create a file filename.drf in the "Export File" button. The file structure is detailed here.
 
DRF/Quantizers and Video Quality variations with different encoders
 
I don't know if the DRF values obtained from DivX4, 5, XVID and DivX3files are comparable in terms of image quality. It requires a subjective evaluation of many test samples to achieve any conclusion. For example, in my experience, DivX5 achieve the same quality with DRF values a little higher (ex: 2,7 -> 2.5). With the same DRF average, a DivX4 is bigger than a DivX3 file.
I think that B frames have the same quality of a P frame at the same quantizer. They just take less disk space allowing for a lower DRF average. Both DivX5 and XVID uses an higher quantizer for B frames in their default configuration.
Please send me your opinions, nfj@mail.pt.
 
Information about DivX4 and limitations of DivX DRF Analyzer:
 
This information is obsolete with version 0.9.2 (I had no idea how the bitstream was constructed!)
 

The way DRF values are stored in the video file changes with the version of the DivX4 codec . I've only tested with the versions 4.0 and 4.12. In the 4.0 video sample, the DRF values were stored in the 6th byte without any bit shifting. In 4.12 they are stored in the 8th byte with a 2 bit shifting. Every second there is a frame where the information is bit shifted one bit only (why?). Additionally, every keyframe has a large constant header in both codec versions, so the information is stored in the 27th byte with 3 bit shifting.

 
For comparison, in a DivX3 file the information is always in the first byte with a constant 2 bit shifting.
 
Because of this, I cannot guarantee that DivX DRF Analyzer works with all versions of the codec. I don't even have samples of all versions of it. DivX 4.0 is not supported because I've not found an easy way of unequivocally identifying the video files. DivX DRF Analyzer version 0.9.0 only displays a warning when the file doesn't 'look' like a 4.12 video.
 
 
 
 
Counter
©2001-2003 NFJ
 
1