Directshowsource forcibily outputs 25fps, 23.98fps source

This forum is for questions and discussion of all the aspects of handling and cleaning up your footage with Avisynth.
User avatar
rmm21
Joined: Mon Jul 16, 2007 11:55 am
Org Profile

Directshowsource forcibily outputs 25fps, 23.98fps source

Post by rmm21 » Mon Jul 16, 2007 11:57 am

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

User avatar
LantisEscudo
Joined: Thu Mar 08, 2001 5:21 pm
Location: Eastern Massachusetts
Contact:
Org Profile

Post by LantisEscudo » Mon Jul 16, 2007 12:36 pm

Since it's an MKV, I assume you have Haali's Media Splitter installed.

In the Settings for that, under the Options tab, in the Output section, check to see if the "Force fake 25 fps in media type" is set to Yes. That's about the only place in the filter chain that I can think of that forces fps changes.

User avatar
rmm21
Joined: Mon Jul 16, 2007 11:55 am
Org Profile

Post by rmm21 » Mon Jul 16, 2007 7:02 pm

Thanks for the response. :)
Sadly, it says "No".

Jerrilyn.

User avatar
Qyot27
Surreptitious fluffy bunny
Joined: Fri Aug 30, 2002 12:08 pm
Status: Creepin' between the bullfrogs
Location: St. Pete, FL
Contact:
Org Profile

Post by Qyot27 » Mon Jul 16, 2007 8:29 pm

What happens when you take the command-line options and use them strictly through xvid_encraw.exe? Maybe there's something that needs to be addressed there, or MeGUI itself is doing it.

Although if I might ask: since you're outputting to AVI, why are you using MeGUI? I can understand if the version of XviD is newer than Koepi's 1.2 VFW build, but if worse comes to worse it might require just using VirtualDub to do it.

User avatar
rmm21
Joined: Mon Jul 16, 2007 11:55 am
Org Profile

Post by rmm21 » Mon Jul 16, 2007 9:04 pm

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 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. :(

I haven't tried the commandline method through xvid_encraw as it is a bit out of my realm of experience as of yet. I started basic avisynth creation a few weeks back tweaking this and that for each source and up until now that was my only headache. :P

I appreciate the help and suggestions.
Jerrilyn.

User avatar
Qyot27
Surreptitious fluffy bunny
Joined: Fri Aug 30, 2002 12:08 pm
Status: Creepin' between the bullfrogs
Location: St. Pete, FL
Contact:
Org Profile

Post by Qyot27 » Tue Jul 17, 2007 9:39 am

Which version of ffdshow are you using? I seem to remember that older versions had a force-25fps option in their configuration, but I've not seen it lately. Also, what compression format is the original MKV using - I'm guessing either H.264 or WMV3 (WMV9 VCM - in this scenario it's possible to do an extraction to AVI, although I forget what all is actually required).

To check the version number, click on ffdshow's Video decoder configuration (it should be in Start->Programs->ffdshow), and then choose the About screen. The version number will be listed across the top underneath the 'ffdshow video encoder' heading. For instance, mine looks like this:

Image

User avatar
rmm21
Joined: Mon Jul 16, 2007 11:55 am
Org Profile

Post by rmm21 » Tue Jul 17, 2007 12:58 pm

Hi Qyot27, i'm using revision 1325 July 1, 2007. For the mkv compression format, it is an H264 file. This version of ffdshow worked fine up until a few days ago and the previous ffdshow I used was from CCCP and that was functional also. I see that there is a new ffdshow out now.
I might upgrade to that to see what happens. I redid the h264 file and again received another lovely 25fps XVID file with a duration of 22.28minutes.

Jerrilyn.

User avatar
rmm21
Joined: Mon Jul 16, 2007 11:55 am
Org Profile

Post by rmm21 » Wed Jul 18, 2007 6:14 am

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

User avatar
Qyot27
Surreptitious fluffy bunny
Joined: Fri Aug 30, 2002 12:08 pm
Status: Creepin' between the bullfrogs
Location: St. Pete, FL
Contact:
Org Profile

Post by Qyot27 » Wed Jul 18, 2007 11:14 am

rmm21 wrote: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).
Did you check the H.264 file after extracting it? I'm fairly sure that H.264 elementary streams default to 25fps if there's nothing to tell them not to (at least, that's what MKVMergeGUI and MP4Box/YAMB default to if you don't specify a framerate when giving them raw streams like that).

User avatar
rmm21
Joined: Mon Jul 16, 2007 11:55 am
Org Profile

Post by rmm21 » Wed Jul 18, 2007 2:33 pm

Hi Qyot27, thanks for your help. It used to work as is just being left alone in an mkv container. When I tried other avi(23.98fps sources) and NTSC vob files it also produced 25fps output. It might have something to do with xvid. I'll let you know what happens when I re-encode it.
I just spent a bunch of time restoring my OS and downloading 100 Windows updates so it should be later tonight when I give results. Here's hoping. :D

Jerrilyn.

Locked

Return to “AviSynth Help”