#195 Final video frames absent from MPEG-2 I-frame 4:2:2

v2.5x
closed-works-for-me
Ian Brabham
5
2008-08-13
2008-06-25
csdesigns
No

I regularly capture 720x480i sources from an AJA LSe capture card to MPEG-2 4:2:2 all I-frame program stream mezzanine source files. I then use these for later transcoding. In instances where I need to concatenate two or more sources into a single file, I like to use AVISynth. Unfortunately all of my tests, with both AVISynth 2.5.6 and 2.5.8 RC2, have shown that the last frames of the source are not being flushed and thus I am left with transcodes that are shorter than they should be.

With 2.5.6, it was the last 7 frames from each source that were not flushed. With 2.5.8 RC2, it appears to be the last 6 frames that are not flushed. This is the case whether or not I try to source a single .mpg, or multiple .mpg's with either aligned or unaligned joins. I should also note that this issue does NOT happen when I am sourcing two 4:2:0 MPEG-2 files. I have tested this with MPEG-2 decoders from MainConcept, LibAVCodec, and LibMPEG2.

I have provided a couple of sample files for this case, although as I mentioned you should be able to replicate from just sourcing a single MPEG-2 I-frame 4:2:2 file. Any help/resolutions that could be provided would be greatly appreciated.

Discussion

  • csdesigns
    csdesigns
    2008-06-25

    Logged In: YES
    user_id=2128440
    Originator: YES

    I should say that I can provide sample files if requested. My first attempt to do so resulted in an upload crash, even though the total size was only ~6MBs.

     
  • Logged In: YES
    user_id=591008
    Originator: NO

    How are you loading the mpeg-2 in AviSynth. Did you try DGIndex/DGDecode?

     
  • csdesigns
    csdesigns
    2008-06-30

    Logged In: YES
    user_id=2128440
    Originator: YES

    DirectShowSource("")

    Using either FFDShow or MainConcept. I need to be able to load the .mpg directly without converting to a .d2v file or anything like that. If there is a better way to load a MPEG-2 source directly, I'd love to hear it and any suggestions would be greatly appreciated. Thanks.

     
  • Ian Brabham
    Ian Brabham
    2008-07-03

    • labels: --> Documentation
     
  • Ian Brabham
    Ian Brabham
    2008-07-03

    Logged In: YES
    user_id=673887
    Originator: NO

    Some DirectShow Splitters lie thru their teeth about the properties of the streams they provide (particularly the length).

    DirectShowSource() has a FrameCount=n option to override any incorrect stream duration. (If you set it to high the last frame is repeated thru to the specified length).

    DGIndex+MPEG2Source is the preferred way to serve MPEG2 streams into Avisynth. And yes you need to create a .D2V index for you Mpeg2 stream precisely because it needs the exact framecount, not some random guess you will get otherwise.

     
  • Ian Brabham
    Ian Brabham
    2008-07-29

    Logged In: YES
    user_id=673887
    Originator: NO

    Problem seems resolved, marked it pending to see if we get any further response.

     
  • Ian Brabham
    Ian Brabham
    2008-07-29

    • assigned_to: nobody --> ianb1957
    • status: open --> pending-works-for-me
     
  • Logged In: YES
    user_id=1312539
    Originator: NO

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
    • status: pending-works-for-me --> closed-works-for-me