VideoHelp Forum




+ Reply to Thread
Results 1 to 11 of 11
  1. Member
    Join Date
    Aug 2009
    Location
    England
    Search Comp PM
    Hi all,

    I have recently been given some SD MPEG2 files that I need to re-encode into an Avid Media Composer friendly format. I always use Avanti to convert pretty much anything to DV25 so that was the first thing I tried. This did not work because the dominant field of MPEG2 is upper field first but the dominant field of DV25 is lower field first so it looked really screwy! So I tried a basic AVISynth "swapfields" script but this still doesn't solve the problem. It doesn't look as bad but looks very jerky (like it's been film effected) when imported into avid.

    I have also tried using Virtualdub and the Reverse Field Dominance filter to move the whole frame up one field but this still produces the jerky effect when imported into Avid. The filed are definitely the right order temporally because I can skip through the footage field by field and it is not jumping back and forward, so I know that is right at least.

    Does anyone have any ideas because I'm starting to lose my mind after three days of trying to get this to work?!!!
    Quote Quote  
  2. why not go with a lossless intermediate? try huffyuv RGBa or yuy2 if you don't need the alpha channel. to go to dv25 entails a lossy recode.
    Quote Quote  
  3. Member
    Join Date
    Aug 2009
    Location
    England
    Search Comp PM
    Unfortunately they either produce the same jerky result or will not import into Avid, I don't think it's the codec that's the problem but the fact that the footage has been shot upper field first.

    Also, there are a LOT of files so wanted to re-encode to a native Avid format that will fast import.

    I'm working in a PAL project by the way as well, should probably have mentioned that!
    Quote Quote  
  4. Member
    Join Date
    Jan 2007
    Location
    Republic of Texas
    Search Comp PM
    I also had similar problems with VirtualDub's internal field swapping filters until I downloaded Scott Elliott's Field Reorder filter. That one worked for me.

    You can find it here: http://home.earthlink.net/~tacosalad/video/fldorder.htm

    Give it a try.
    Quote Quote  
  5. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by jayradhart
    I tried a basic AVISynth "swapfields" script but this still doesn't solve the problem.
    Try stickboy's JDL_ReverseFieldDominance function from http://avisynth.org/stickboy/jdl-interlace.avsi.
    Quote Quote  
  6. could you use mediafio in text mode on the mpg and paste the text here?
    Quote Quote  
  7. Be careful with VirtualDub's handling of interlaced YV12 (4:2:0) sources. It does not handle the chroma channels properly. Get your decoder to output YUY2 (4:2:2) instead of YV12 if possible. Otherwise use AviSynth to convert to YUY2:

    Code:
    WhateverSource("filename.ext") #outputs interlaced YV12
    ConvertToYUY2(interlaced=true)
    Or, since VirtualDub is going to convert to RGB for filtering anyway:

    Code:
    WhateverSource("filename.ext") #outputs interlaced YV12
    ConvertToRGB(interlaced=true)
    You can reverse field dominance in VirtualDub by cropping one scanline off the top and then using the resize filter's letterbox option to add one scanline to the bottom.
    Quote Quote  
  8. Member
    Join Date
    Aug 2009
    Location
    England
    Search Comp PM
    Thanks for all the suggestions guys, I'll give them a try and report back.

    Here is the file information from MediaInfo:

    General
    Complete name : C:\Documents and Settings\edit1\Desktop\body sd.MPG
    Format : MPEG-PS
    File size : 137 MiB
    Duration : 2mn 1s
    Overall bit rate : 9 416 Kbps

    Video
    ID : 224 (0xE0)
    Format : MPEG Video
    Format version : Version 2
    Format profile : Main@Main
    Format settings, Matrix : Default
    Duration : 2mn 1s
    Bit rate mode : Variable
    Bit rate : 8 786 Kbps
    Nominal bit rate : 9 100 Kbps
    Width : 720 pixels
    Height : 576 pixels
    Display aspect ratio : 16:9
    Frame rate : 25.000 fps
    Standard : PAL
    Colorimetry : 4:2:0
    Scan type : Interlaced
    Scan order : Top Field First
    Bits/(Pixel*Frame) : 0.847
    Stream size : 128 MiB (93%)

    Audio
    ID : 128 (0x80)
    Format : AC-3
    Format/Info : Audio Coding 3
    Duration : 2mn 1s
    Bit rate mode : Constant
    Bit rate : 256 Kbps
    Channel(s) : 2 channels
    Channel positions : L R
    Sampling rate : 48.0 KHz
    Video delay : -80ms
    Stream size : 3.72 MiB (3%)
    Quote Quote  
  9. Member
    Join Date
    Jan 2007
    Location
    Republic of Texas
    Search Comp PM
    Another bit of advice: try the suggestions with just short, 20 second clips that have a lot of motion (video streams only). That should help you find the best solution quickly.
    Quote Quote  
  10. Member
    Join Date
    Aug 2009
    Location
    England
    Search Comp PM
    I have tried all the suggestions and the best result has come from using AVISynth to Convert the video to YUY2 as jagabo suggested and then use Scott Elliot's short AVISynth script to reorder the fields as filmboss80 suggested. I did not use Virtualdub in the end but put the script into the AVISynth section of Avanti and outputted DV25 so that I can fast import into Avid.

    If anyone is interested Scott Elliot's short AVISynth script to reorder the fields is as follows:

    AviSource(“sourcefile.avi”) #I used DirectShowSource as I have an MPEG2 file, so DirectShowSource("sourcefile.mpg")
    ConvertToYUY2(interlaced=true) #I added this here as described above
    AssumeFrameBased
    ComplementParity
    SeparateFields
    Trim(1,0)
    Weave
    Quote Quote  
  11. You can try this too:

    Code:
    DirectShowSource("sourcefile.mpg")
    ConvertToYUY2(interlaced=true)
    Crop(0,1,-0,-0) #take one scan line off the top
    AddBorders(0,0,0,1)#add one scanline to the bottom
    The video must be in YUY2 or RGB for this to work. You can't crop or add one scanline in YV12.
    Quote Quote  



Similar Threads

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