#201 Big problem



I have found serious problemm with reencoding HD DVD VC1 source - 2 fast 2 furious in MEGUI to x264.

The source has 29.97 and this is what is reported in TS stream configuration like in FFDSHOW settings.
When I make AVISYNTH script using this source it is played good on MEDIA PLAYER CLASSIC, but it has serious problemm with X264.
The commpressed x264 file looks like it is on the speed and ends up in about 0.8 of the time of the final file, the rest is black frames (ffdshow decodes VC1) or middle part of the movie (original vista VC1 codec). The x264 sees about 190 000 frames but the actual movie ends up at about 154000 frame.

When I set the in the script the fps=23.976 the final file does not have black frames and it ends like it should but there is no synchro with sound. X264 sees about 154000 so there are no black frames.

When I am thinking about it I think the avisynth is not sending all the frames of the original stream to X264. It seems 20% frames are discarded so it reports only some of them, but X264 is still informed what is the correct number of them.

I did not had such problemms with 23.976 streams only with this. I know there were previous problemms with memory allocation, so maybe it is caused by this.
The stream has 1920x1080 resolution and high numbers of frames requiring more memory. X264 itself requires 900MB. But I do have 4GB of memory...

I am using Windows VISTA x64 and latest RC4a.


  • Ian Brabham

    Ian Brabham - 2008-11-27

    No contact details. No example script. Very vague description of the problem. How do you expect us to help you?

  • Ian Brabham

    Ian Brabham - 2008-11-27
    • milestone: --> v2.5x
    • summary: Big problemm --> Big problem
    • status: open --> pending
  • Nobody/Anonymous

    Well I try to make it simple
    The source is 1920x1080 at 29.97 codec is VC1.
    For simplification lets assume it is 10minutes long.

    The script is like this

    The film ends at 8 minute (10 minutes are commpressed into 8) and the last 2 minutes are black frames only
    Original vista decoder
    The film ends at 8 minute then the last two minutes are filled with the last 2.5minutes of original 10 minutes film.

    It seems like avisynth is missing some frames providing only 23.976fps to the X264, while reporting correct number of total frames (29.97).
    I have tried to fix the script to this

    But the result is not good either. The final movie is 10 minutes long but there is no synchro with the sound assuming that the frames are dropped without the pattern.
    I am now checking avisynth 2.57.

  • Nobody/Anonymous

    • status: pending --> open
  • Nobody/Anonymous

    I have found the cause.
    I have checked version 2.57 and it has the same issue, so I dig some more. I have removed all the filters, without the effect, so I have to look for more information regarding the file format.

    The source has PULLDOWN technique included in the stream.
    The stream is 23.976, but it contains the information which frames to duplicate to make 29.97.
    FFDSHOW seems to have problemms with AVISYNTH2 when decoding such frames. The Avisynth2 output is only original frame rate 23.976 thus the effect of resynchronization and black frames.

    Anyway when I have removed PULLDOWN and changed the frame rate to 23.976 while remuxing TS stream everything works ok. I have used TSMUXER.

    Anyway, I am not sure which is the responsible for the bug I have found, but I hope you will find the solution for it.

  • Nobody/Anonymous

    More information on PULLDOWN can be found here

    Currently both codec FFDSHOW and original VISTA codec being the part of WMV has this problemm.

  • Ian Brabham

    Ian Brabham - 2008-12-27

    You possibly need ConvertFPS=True to honour the pulldown. However most users of Avisynth will give their eye teeth to be rid of pulldown and have access to original 24 fps full progressive frames.

    Given your processing filters, "FluxsmoothST, Resize and fft3dGPU", and the vague symptoms you are expressing. I suspect you really have a 23.976fps progressive stream. Have you tried fps=23.976 instead of 29.97?

    You should refer your issue to Doom9's Forum, Avisynth Usage (http://forum.doom9.org/forumdisplay.php?f=33) or perhaps the VC1 (New and alternative video codecs) or MeGUI sub-forums. The people over there will have experience processing your type of stream with the tools you mention, I do not and am unable to help you further.

  • Ian Brabham

    Ian Brabham - 2008-12-27
    • status: open --> pending-postponed
  • Nobody/Anonymous

    Thank you very much for the response.
    I have solved the problemm.
    I needed to remux TS stream with removing the pulldown.
    It seems that removing the pulldown also required delay the audio stream by exactly 1001ms.
    After this everything is working fine.

    What I do not understand with AVISYNTH is why it did not treat the stream as 29.97 if this was output from FFDSHOW.
    If FFDSHOW is able to duplicate some frames to make 29.97 in players why it did not do the same with avisynth???

    Avisynth wrongly recongises the stream as 29.97 but does not receive the duplicated frames, so in reality it is only 23.976.

    I hope I make myslef clear

  • Nobody/Anonymous

    • status: pending-postponed --> open-postponed
  • Ian Brabham

    Ian Brabham - 2009-07-24
    • status: open-postponed --> closed-postponed

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks