View Full Version : DirectShowSource gives slow-mo MPEG-2
aklendathu
16th January 2004, 11:04
I recently encoded some MPEG-2 DVD-compliant movies by using AVISynth to frameserv TMPEGEnc. Since the source files cannot be properly read in by AVISource (MPEG-1, MPEG-4 movies) I used DirectShowSource instead. However, the resulting MPEG-2 file (and DVD) plays back in slow motion (audio too). I am specifying fps in the DirectShowSource command and am also using an AssumeFPS(29.97,true) command at the end
of the script.
Has anybody else encountered this problem ? Or is it because of something I've done wrong? I've tried bumping up the priority of the DirectShow Filter in TMPEGEnc, but no luck. Do I need to do a ConvertToRGB() or something similar ? I think the output of the DirectShowSource() is in YUY2 color space.
TIA for your comments/suggestions,
Pedro.
sh0dan
16th January 2004, 11:10
:script:
Are you sure the framerate delivered is 29.97?
Some DirectShow MPEG2 decoders bob the material and make it double framerate.
BTW - you should use DVD2AVI and import using MPEG2DEC3. Read some FAQ's on how to do that.
mf
16th January 2004, 11:18
Also, if your source is <100% film, DirectShow decoders will output VFR (using force film for the film parts), and DirectShowSource can't handle those well.
aklendathu
16th January 2004, 12:27
Originally posted by sh0dan
:script:
Are you sure the framerate delivered is 29.97?
Some DirectShow MPEG2 decoders bob the material and make it double framerate.
BTW - you should use DVD2AVI and import using MPEG2DEC3. Read some FAQ's on how to do that.
@Sh0dan:
if I open the AVS script in VirtualDUB I get 29.97 as the framerate in Video Properties.
The problematic files are MPEG-1 (NTSC 29.97fps) and MPEG-4 (PAL 25fps) - Can I use DVD2AVI and MPEG2DEC3 as you mention ?
@mf:
None of the input files have Film content.
sh0dan
16th January 2004, 13:12
Please - please post your script!
You implied MPEG2 material in your first post, but MPEG1 material in your second. MPEG2DEC3 can only open MPEG2.
Virtual Dub cannot open MPEG2, but only MPEG1. It does however NOT use Directshow, but it's own parser/decoder, so Directshow might do something else than Vdub.
aklendathu
16th January 2004, 15:30
Originally posted by aklendathu
I recently encoded some MPEG-2 DVD-compliant movies by using AVISynth to frameserv TMPEGEnc. Since the source files cannot be properly read in by AVISource (MPEG-1, MPEG-4 movies) I used DirectShowSource instead. However, the resulting MPEG-2 file (and DVD) plays back in slow motion (audio too). I am specifying fps in the DirectShowSource command and am also using an AssumeFPS(29.97,true) command at the end of the script.
Well, maybe I didn't express myself correctly, but the initial post did mention MPEG-1 and MPEG-2 source files.
One of the scripts I used was:
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MPAsource.dll")
DirectShowSource("D:\...\test-MPEG-1.mpg",fps=29.97,audio=true)
AssumeSamplerate(44100)
CacheAudio()
ResampleAudio(48000)
AssumeFPS(29.97, true)
This file plays OK in Graphedit. However, MPEG-2 encoding in TMPEGenc gives the problems I described in my original post.
aklendathu
16th January 2004, 15:34
Originally posted by aklendathu
Well, maybe I didn't express myself correctly, but the initial post did mention MPEG-1 and MPEG-2 source files.
Oops, I meant MPEG-1 and MPEG-4.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.