1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Directshowsource forcibily outputs 25fps, 23.98fps source

Discussion in 'DivX / XviD' started by rmm21, Jul 16, 2007.

  1. rmm21

    rmm21 Member

    Joined:
    Jul 16, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    11
    Hi all, i've browsed these forums many times looking for information but now I really need help.

    Recently, I have successfully encoded my videos to XVID using the latest Megui and latest Avisynth but up until two or three days ago i've noticed that they are all being converted to 25fps, regardless of original source fps, even though previously every one of them was giving output of 23.98fps which is what I wanted.

    I tested to see if it was the video source by using a previous video I encoded last week that came out earlier to 23.98fps(same fps and total number of frames as original source), but ended up now(using the same exact script with same XVID profiles in MeGui)with a 25fps video file, even though I haven't changed anything and am using only this basic script:

    DirectShowSource("C:\Documents and Settings\mymovies\Recording01.mkv",fps=23.9759856527702,audio=false)
    ConvertToYV12()
    Lanczos4resize(640,368)
    MSharpen(1,60,true,false,false)

    Here is what the test.avs I did showed for the original non-XVID video:
    Frame: 16860 of 33720
    Time: 00:11:43:201 of 00:23:26:403
    ColorSpace: YUY2
    Width: 704 pixels, Height: 480 pixels
    Frames per second: 23.9760 (10000000/417083)
    FieldBased (Separated) Video: NO
    Parity: Bottom Field First
    Video Pitch: 1408 bytes
    Has Audio: NO
    CPU detected: x87 MMX ISSE SSE SSE2

    Here is what the test.avs for the new 25fps video gave:
    Frame: 16860 of 33720
    Time: 00:11:14:400 of 00:22:28:800
    ColorSpace: YUY2
    Width: 640 pixels, Height: 368 pixels
    Frames per second: 25.0000 (25/1)
    FieldBased (Separated) Video: NO
    Parity: Bottom Field First
    Video Pitch: 1280 bytes
    Has Audio: NO
    CPU detected: x87 MMX ISSE SSE SSE2

    The duration for each video is different as well:
    Duration(Original non-XVID 23.98fps): 23:26:40minutes
    Duration(New XVID 25fps): 22:28:80minutes

    I viewed both videos using Media Player Classic and, as an example, at 02:36minutes in the original non-XVID 23.98fps file, the same scene shows up now earlier in the new XVID 25fps file at 02:29minutes. Strange but the 25fps video seems while watching to progress visually faster, I believe.

    Playing the newly encoded 25fps XVID video in Media Player Classic gives a frame rate between 24.98-25.02fps(different fps from original but same total number of frames as original source). The older 23.98fps encoded non-XVID and XVID videos when played both stay around 23.98fps. Neither show when playing in Media Player Classic under statistics any frames being dropped.

    The same video's mp3 muxed in fine with no audio sync issues at that 23.98fps but at the now 25fps it becomes also gradually unsynced as all the newest encoded videos.
    I don't understand why the PAL fps is being forced. I've uninstalled and reinstalled the latest XVID codec, Megui and all tools, Avisynth(all new filters), FFDshow, and DirectX(latest), but the same thing happens. As you can see in my script, i've never had to use assumefps/changefps/convertfps in Avisynth to get 23.98fps with the same video I did before using the above script worked perfectly before as it is. I did add for variation convertfps=true and it still output 25fps.

    Does anyone know why this is happening and what I could of changed unknowingly to get 25fps output?

    Thanks, Jerrilyn.


    P.S. I re-encoded the file and watched it's creation in the MeGui information window during both passes and suprisingly it showed 33719 frames total and 23.26minutes being processed for both passes but the output file was again only 22.28minutes but 33720 frames.
    Here is the MeGui Log for the new 25fps XVID:

    Looking for job processor for job...
    Processor found!

    ------------------------------------------------------

    Starting job job1 at 10:02:01 AM
    Starting preprocessing of job...
    Preprocessing finished!
    encoder commandline:
    -i "C:\Documents and Settings\mymovies\Recording01.avs" -pass1 "C:\Documents and Settings\mymovies\Recording01.stats" -bitrate 1300 -kboost 100 -ostrength 0 -oimprove 0 -odegrade 10 -clow 5 -overhead 0 -turbo -max_key_interval 240 -nopacked -qmatrix "C:\Program Files\megui\extra\Didees SixOfNine.cqm" -nochromame -imin 3 -imax 5 -pmin 3 -pmax 5 -noclosed_gop -bquant_ratio 100 -bquant_offset 0 -bmax 3 -threads 0
    successfully started encoding
    Processing ended at 10:25:41 AM
    ----------------------

    Log for job job1

    xvid_encraw - raw mpeg4 bitstream encoder written by Christoph Lampert 2002-2003

    Trying to retrieve width and height from input header
    xvidcore build version: xvid-1.2.0-dev
    Bitstream version: 1.2.-127
    Detected CPU flags: ASM MMX MMXEXT SSE SSE2 TSC
    Detected 1 cpus, using 1 threads.

    Tot: enctime(ms) =405248.00, length(bytes) = 458147148
    Avg: enctime(ms) = 12.02, fps = 83.21, length(bytes) = 13586
    I frames: 751 frames, size = 47319/35536794, quants = 2 / 2.00 / 2
    P frames: 11592 frames, size = 21972/254699966, quants = 2 / 2.00 / 2
    B frames: 21346 frames, size = 7866/167910200, quants = 2 / 2.00 / 2
    N frames: 31 frames, size = 6/ 188

    ----------------------
    Starting postprocessing of job...
    Job completed successfully and deletion of intermediate files is activated
    Postprocessing finished!
    End of log for job1
    -------------------------------------------------------

    Looking for job processor for job...
    Processor found!


    ------------------------------------------------------

    Starting job job2 at 10:25:41 AM
    Starting preprocessing of job...
    Preprocessing finished!
    encoder commandline:
    -i "C:\Documents and Settings\mymovies\Recording01.avs" -pass2 "C:\Documents and Settings\mymovies\Recording01.stats" -bitrate 1300 -kboost 100 -ostrength 0 -oimprove 0 -odegrade 10 -clow 5 -overhead 0 -max_key_interval 240 -nopacked -vhqmode 4 -qmatrix "C:\Program Files\megui\extra\Didees SixOfNine.cqm" -imin 3 -imax 5 -pmin 3 -pmax 5 -noclosed_gop -bvhq -bquant_ratio 100 -bquant_offset 0 -bmax 3 -threads 0 -avi "C:\Documents and Settings\mymovies\Recording01.avi"
    successfully started encoding
    Processing ended at 11:10:32 AM
    ----------------------

    Log for job job2

    xvid_encraw - raw mpeg4 bitstream encoder written by Christoph Lampert 2002-2003

    Trying to retrieve width and height from input header
    xvidcore build version: xvid-1.2.0-dev
    Bitstream version: 1.2.-127
    Detected CPU flags: ASM MMX MMXEXT SSE SSE2 TSC
    Detected 1 cpus, using 1 threads.

    Tot: enctime(ms) =1697945.00, length(bytes) = 219077936
    Avg: enctime(ms) = 50.35, fps = 19.86, length(bytes) = 6496
    I frames: 751 frames, size = 33878/25442938, quants = 3 / 3.00 / 3
    P frames: 11592 frames, size = 7814/90580812, quants = 2 / 4.36 / 5
    B frames: 21346 frames, size = 4827/103054000, quants = 2 / 3.44 / 4
    N frames: 31 frames, size = 6/ 186
    desired video bitrate of this job: 1300 kbit/s - obtained video bitrate (approximate): 1250 kbit/s
    ----------------------
    Starting postprocessing of job...
    Job completed successfully and deletion of intermediate files is activated
    Postprocessing finished!
    End of log for job2
    -------------------------------------------------------
     
  2. rmm21

    rmm21 Member

    Joined:
    Jul 16, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    11
    I should of mentioned that I also tried virtualdubmod, feeding it several vob and avi files(at 23.98fps originally), and was also given forced output of 25fps. I also checked Haali Media Splitter
    under options and output to see if "force fake 25fps" was enabled and it wasn't.
    I can't imagine what would of changed just within the last few days to prevent the same successful 23.98fps file outputs i've had for the past several weeks using MeGui predominately.

    Jerrilyn.
     
  3. MysticE

    MysticE Active member

    Joined:
    Nov 15, 2003
    Messages:
    2,787
    Likes Received:
    0
    Trophy Points:
    66
    An interesting problem, I just converted an AVI to a 23.98m2v, then used VdubMod Surround 1.6.0.0 to convert both to Xvid with everything left at default.
    ----------------------------

    These numbers came from MPC.

    An m2v 23.98 file (converted from from the Original listed below)
    Video: MPEG2 Video 720x480 (16:9) 23.98fps 8000Kbps

    After Xvid conversion
    Video: XVID 720x480 23.98fps 678Kbps

    The original AVI
    Video: DivX 5 484x264 23.98fps 564Kbps
    Audio: MPEG Audio Layer 3 48000Hz stereo 80Kbps

    The above original re-encoded to Xvid
    Video: XVID 484x264 23.98fps 364Kbps
    Audio: MPEG Audio Layer 3 48000Hz stereo 80Kbps

    Don't know why you could not get the same results. Using Super C, with MEncoder to convert to Xvid/Divx, I notice it always defaults to 25fps, but that can be changed.

    I'm no script expert but maybe you should look to revise this line as I've never seen it in any of the script generators I use:

    DirectShowSource("C:\Documents and Settings\mymovies\Recording01.mkv",fps=23.9759856527702,audio=false)

    Maybe substitute FPS=23.98? Or delete it and try using AssumeFPS or ChangeFPS later in the script.
     
    Last edited: Jul 17, 2007
  4. rmm21

    rmm21 Member

    Joined:
    Jul 16, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    11
    Hi MysticE, thanks for the suggestion. I'll give Assumefps or Changefps a try(most likely Assumefps). I'll let you know how it turns out.

    Jerrilyn
     
  5. rmm21

    rmm21 Member

    Joined:
    Jul 16, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    11
    Here's an update: I unstalled every multimedia related program on my computer(Avisynth, FFdshow, Haali Media Splitter, MeGui, Vobsub, CCCP remnants, latest XVID codec, mkvtoolnix, etc...), cleaned temp and registries, defragmented hard drive, and re-downloaded the programs I needed: Avisynth257, MeGui w/.net 2, Mkvtoolnix, Mkvextractgui, and Gabest mkv splitter.
    No FFdshow or Haalimedia Splitter anywhere on my computer.

    I used Mkvextractgui to recreate the same files I needed to encode(that H264 file I am trying to convert to XVID) just in case of some weird anomaly in the source which, just to recall, produced a perfect 23.98fps XVID last week at the same exact duration as the original.

    Installed MeGui, created new avs, let it go for about an hour using XVID profile 30%, and yahooooo, was given, from a 23.98fps H264 source file, a shiny new f-ing 25fps XVID file at 22.28minutes in duration(original was 23.26minutes long FYI).

    I think when I say this sucks it's hardly touching what I feel. :sweat:

    I would say that my computer has a big problem with Directshow which is for some reason dropping frames.
    Jerrilyn.
     
  6. shiroh

    shiroh Guest

    if its vfr you can force it with this.
    directshowsource("E:\blah.mkv", 23.976, convertfps=true)

    but seems not. this will drop the extra frames. but that seems not the problenm here
     

Share This Page