Log in

View Full Version : Number of Key Frames & Field Order Questions.


rkr1958
29th December 2006, 00:42
What I did. VCR > Hauppauge PRV Win2000 @ 12000 kbs (CBR) > PC.

Why I did it. Use AVISynth to clean up the capture and frameserve to CCE-basic to encode.

I have several questions (which I'll add on as/if necessary) but I'll start with two.

The following is the simple AVISynth script I wrote in order to open and get file info in VirtualDub from the raw capture.

LoadPlugin(plugin_dir+"MPEGDecoder.dll")
MPEGSource("I:\Aladdin_and_the_King_of_Thieves\Aladdin_and_the_King_of_Thieves_CAP.mpg")

# Get Info (Load file in VirtualDub)
info()

Question #1. I get two different framecounts from VirtualDub w/avs script (147008) and TMPGEnc DVD Author w/raw mpeg2 capture file (147002). Why and which is correct?

Question #2. I get two different field order parity in VirtualDub w/avs script (BFF) versus MediaInfo (TFF). Why & which is correct?

http://www.knology.net/~benrunyan/Nframes_BTFF.jpg

rkr1958
29th December 2006, 22:51
I think I found my answer through a post at videohelp.com. http://forum.videohelp.com/viewtopic.php?p=1631769#1631769

It appears that neither of the framecounts were correct and the field parity is TFF. From the above post I got put onto DGIndex.exe and DGDecode.dll at http://www.neuron2.net/dgmpgdec/QuickStart.html

I ran DGIndex and updated my AVISynth info script to,

LoadPlugin(plugin_dir+"DGDecode.dll")
LoadPlugin(plugin_dir+"mpasource.dll")

video = MPEG2Source("I:\Aladdin_and_the_King_of_Thieves\Aladdin_and_the_King_of_Thieves_CAP.d2v")
audio = MPASource("I:\Aladdin_and_the_King_of_Thieves\Aladdin_and_the_King_of_Thieves_CAP T01 DELAY -44ms.mpa")
AudioDub(video,audio)

# Get Info (Load file in VirtualDub)
info()

http://www.knology.net/~benrunyan/DGIndex-Updated-FrameCount-Field-Order.jpg

chipzoller
1st January 2007, 03:10
For the field parity, why not just use your own eyes by serving just the video source into vdub and frame-stepping through? That's probably the easiest and most fool-proof way to find out.

rkr1958
6th January 2007, 18:34
Follow-Up Question, but first the details.

1. I'm still working with the source from the capture I described in the initial post of this thread. The capture source is 1:21:45 long and has a 12,000 kbps CBR.

2. I used DGIndex 1.4.8 to generate .d2v project that I used to cleanup and encode. I previewed the entire project in DGIndex and it confirms the length and CBR that I gave above.

3. I've done four encodes (3 with CCE-basic & 1 with TMPGenc-Plus) with average bit rate of ~7250 kbps, minimum bit rate of 500 kbps & maximum of 9500 kbps (CCE-basic) & 8000 kbps (TMPGEnc-Plus). All four encodes have been 2-pass VBR.

4. I'm used CCE-Basic v 2.70.01.14 and TMPGEnc-Plus verison 2.524.63.181.

5. Here is the avs script that I've used to cleanup the source before encoding.

oadPlugin(plugin_dir+"DGDecode.dll")

MPEG2Source("I:\Aladdin_and_the_King_of_Thieves\Aladdin_and_the_King_of_Thieves_CAP.d2v").ConverttoYUY2

# De-Interlace
SeparateFields()

# De-Noise
odd=SelectOdd.Crop(16,0,-8,-8).AddBorders(12,4,12,4,color = color_black).Convolution3D(preset="animeLQ")
evn=SelectEven.Crop(16,0,-8,-8).AddBorders(12,4,12,4,color = color_black).Convolution3D(preset="animeLQ")

# Interlace
Interleave(evn,odd).Weave()

6. Given a video length of 1:21:45 and an average encoder bit rate of ~7259 my expectation was that the encoded video (w/o audio) would be > 4,500,000,000 bytes. However, in all cases the resultant encode came around around 3,900,000,000 bytes, which was approximately 600,000,000 bytes or 480 MB undersized!

7. For two CCE-basic & the one TMPGEnc-Plus I use AVS to frameserve to the encoders. For the forth encode, which used CCE-basic, I open the AVS script in VirtualDub and save that to an AVI file using Panasonic DV codec. I then encoded that AVI. The figure below shows the CCE-basic settings for that encode.

8. As you might anticipate my question is why are all these encodes coming out 480 MB undersized? What am I missing? It's got to be something simple.

http://www.knology.net/~benrunyan/CCE-Encode-Bitrate-Question.jpg

Boulder
6th January 2007, 20:25
Encoder saturation?

rkr1958
6th January 2007, 23:03
Encoder saturation?What's that and is there anything I can do about it?

Boulder
6th January 2007, 23:06
The encoder simply cannot use any more bits on the video. Sharpening the video will make it require more bits so that's a place to start if you don't want to do less denoising/smoothing. Using a higher bitrate quantization matrix is also one choice.

Actually there are a lot better denoisers than the one you use, but all that belongs in the Avisynth usage forum :)