VideoHelp Forum




+ Reply to Thread
Results 1 to 14 of 14
  1. Member rkr1958's Avatar
    Join Date
    Feb 2002
    Location
    Huntsville, AL, USA
    Search Comp PM
    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.

    Originally Posted by AVISynth Info Script
    LoadPlugin(plugin_dir+"MPEGDecoder.dll")
    MPEGSource("I:\Aladdin_and_the_King_of_Thieves\Ala ddin_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?



    Quote Quote  
  2. Hi-

    1. VDub
    2. VDub

    I don't know how you'd confirm the frame count short of counting all the frames yourself. Maybe there are some undecodable frames at the beginning that VDub counts and TMPGEnc doesn't. Anyway, you're a bit out of date with that script. You should be using DGDecode.dll and MPEG2Source after making a D2V using DGIndex:

    http://www.neuron2.net/dgmpgdec/QuickStart.html

    Also, Aladdin is a movie, I guess, and should be IVTC'd back to 23.976fps

    It's an easy matter to confirm the field order. Add this to the script, open in VDub, find a place in the video with motion/movement, and advance a frame at a time:

    AssumeBFF()
    SeparateFields()

    If it plays smoothly, it's BFF. If it plays jerky/stuttery, it's TFF. Now make it:

    AssumeTFF()
    SeparateFields()

    Should be the opposite of what you found before. If it plays jerky, it's really BFF.
    Quote Quote  
  3. I agree with manono that the old MPEGDecoder.dll is prone to problems. That is likely the source of the frame count problem.

    I have a Hauppauge WinTV PVR-250 and it always records top field first.
    Quote Quote  
  4. Member rkr1958's Avatar
    Join Date
    Feb 2002
    Location
    Huntsville, AL, USA
    Search Comp PM
    @manono & jagaboThanks for putting me onto DGIndex & MPEG2Source. I ran DGIndex on the CAP video file and updated my AVISynth script.
    Originally Posted by Updated AVISynth Info Script
    LoadPlugin(plugin_dir+"DGDecode.dll")
    LoadPlugin(plugin_dir+"mpasource.dll")

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

    # Get Info (Load file in VirtualDub)
    info()
    As you can see, VirtualDub now shows a framecount of 147013 & field parity of TFF. I assume this is the correct framecount & field order. Thanks again.



    Quote Quote  
  5. Darn, I was wrong on both my answers. I guess the MPEGDecoder.dll messed up my first answer, and maybe both of them. I've never used it, so I didn't know just how screwy it was. I'm happy I was able to contribute something to the discussion. And I'm glad jagabo was around to set me straight.

    I don't guess you tried out the AssumeTFF/SeparateFields trick to get the field order. You can also get it by opening the cap in DGIndex and running the Preview. The new Information screen will show it. AviSynth's Info command won't always get it right, as I found out recently, in another thread.
    Quote Quote  
  6. Member rkr1958's Avatar
    Join Date
    Feb 2002
    Location
    Huntsville, AL, USA
    Search Comp PM
    Originally Posted by manono
    I don't guess you tried out the AssumeTFF/SeparateFields trick to get the field order. You can also get it by opening the cap in DGIndex and running the Preview. The new Information screen will show it. AviSynth's Info command won't always get it right, as I found out recently, in another thread.
    I did try it. AssumeTFF if smooth & AssumeBFF is jerky. So it's TFF. Also, I did see a block in the Preview window for field order, however, it remained blank after the processing finished in DGIndex.
    Quote Quote  
  7. however, it remained blank after the processing finished in DGIndex.

    I hope you didn't Force Film in DGIndex. If you run the Preview (File->Preview) with Video->Field Operation set for Honor Pulldown Flags, then it'll show the field order.
    Quote Quote  
  8. Member rkr1958's Avatar
    Join Date
    Feb 2002
    Location
    Huntsville, AL, USA
    Search Comp PM
    Originally Posted by manono
    however, it remained blank after the processing finished in DGIndex.

    I hope you didn't Force Film in DGIndex. If you run the Preview (File->Preview) with Video->Field Operation set for Honor Pulldown Flags, then it'll show the field order.
    I ran the default which is Honor Pulldown Flags. Ah ... I see ... I get that in Preview ... it shows field order = TOP.
    Quote Quote  
  9. Member rkr1958's Avatar
    Join Date
    Feb 2002
    Location
    Huntsville, AL, USA
    Search Comp PM
    Originally Posted by manono
    It's an easy matter to confirm the field order. Add this to the script, open in VDub, find a place in the video with motion/movement, and advance a frame at a time:

    AssumeBFF()
    SeparateFields()

    If it plays smoothly, it's BFF. If it plays jerky/stuttery, it's TFF. Now make it:

    AssumeTFF()
    SeparateFields()

    Should be the opposite of what you found before. If it plays jerky, it's really BFF.
    @manon, thanks for your help. Your suggestion got me playing around with some AVS scripts to confirm field order. One suggestion I have is instead of SeparateFields() try a bob, such as eedibob(), which gives you full-height "frames" instead of half-height frames. This was easier for me to see smooth versus jerky playback in VirtualDub. Here's is the script that I used,
    Originally Posted by [url=https://www.videohelp.com/tools?tool=Avisynth
    AVISynth[/url] Script]# Import / Load needed plugins
    Import(plugin_dir+"mvbob.avs")
    LoadPlugin(plugin_dir+"DGDecode.dll")

    # Load D2V video
    MPEG2Source("video.d2v")

    # Set field dominance (try both & see which one is smooth and which one is jerky)
    # AssumeTFF()
    # AssumeBFF()

    # Seperate into "fields" using a simple bob
    # Note video is treated as full-height frames at twice the original framerate
    eedibob()

    # Get Info (Load file in VirtualDub)
    # info()
    Quote Quote  
  10. You can use AVISynth's build in Bob() filter for quick field order tests:

    Code:
    MPEG2Source("video.d2v")
    AssumeTFF() #or AssumeBFF()
    Bob()
    I made a template file for VirtualDubMod so I don't have to manually create an AVS file each time:

    Code:
    #ASYNTHER TFF Test
    DirectShowSource("%f")
    AssumeTFF()
    Bob()
    Quote Quote  
  11. You can use AVISynth's build in Bob() filter for quick field order tests:

    Hehe, yeah, no kidding.

    I purposely didn't mention bobbing because, 1) I thought just playing the fields would be enough to show the jerkiness to you, and, 2) I didn't want to needlessly complicate matters. But I didn't give you enough credit for what you know, rkr1958. And Bob will work just as well, although don't ever use it when you actually need a Bob filter for something, as it's not so good. Me, when checking field order and when filtering I usually use LeakKernelBob (part of the LeakKernelDeint package) as it's fast and good. Anything EEIDE, while top quality, is slow as all get out, and overkill for just checking the field order, although very useful (if you have time to spare) when filtering.
    Quote Quote  
  12. Member rkr1958's Avatar
    Join Date
    Feb 2002
    Location
    Huntsville, AL, USA
    Search Comp PM
    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.

    Originally Posted by [url=https://www.videohelp.com/tools?tool=Avisynth
    AVISynth[/url] Script]LoadPlugin(plugin_dir+"DGDecode.dll")

    MPEG2Source("I:\Aladdin_and_the_King_of_Thieves\Al addin_and_the_King_of_Thieves_CAP.d2v").ConverttoY UY2

    # 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.



    Quote Quote  
  13. My guess is that you've "saturated the codec". Run your MPV or M2V through BitRate Viewer and check the Q-Level. I think it'll probably be below 2. That's a very high bitrate you're giving it. You've given it all the quality it can get. Plus you've made it more compressible by smoothing the hell out of it.

    If you want to boost the size, either lay off the denoising/smoothing, or use a much better quantisation matrix, or both.

    And as I said in my first post, you should probably IVTC the thing, instead of keeping it interlaced (which you're going about the wrong way, but that's a subject for another thread).
    Quote Quote  
  14. Member rkr1958's Avatar
    Join Date
    Feb 2002
    Location
    Huntsville, AL, USA
    Search Comp PM
    @manono, thanks for your help.

    Originally Posted by manono
    My guess is that you've "saturated the codec". Run your MPV or M2V through BitRate Viewer and check the Q-Level. I think it'll probably be below 2. That's a very high bitrate you're giving it. You've given it all the quality it can get. Plus you've made it more compressible by smoothing the hell out of it.

    If you want to boost the size, either lay off the denoising/smoothing, or use a much better quantisation matrix, or both.
    Q level, average = 2.05 & peak = 7.34. Bitrate, average = 5838 & peak = 8859. Is saturating the codec good or bad? Is it telling me that what I'm getting is the highest quality that I can get? If I lay off the denosining/smoothing, wouldn't that degrade qaulity?

    Originally Posted by manono
    And as I said in my first post, you should probably IVTC the thing, instead of keeping it interlaced (which you're going about the wrong way, but that's a subject for another thread).
    How would you IVTC the video? Would you do it in AVISynth or the encoder? Can you give me or point me to the necessary AVISynth commands and / or encoder options?
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!