View Full Version : Frame-accurate MPEG2 source filter for x64?
wonkey_monkey
8th August 2018, 21:03
I'm trying to fix some DVD video using Avisynth+ x64 but I have a problem loading the files. I can't find a way to do so with guaranteed frame accuracy.
I've used DGIndex/mpeg2source under x86 and it's always been great, but for what I'm doing I really need to work with x64, and it isn't available. I've tried dgsource and ffmpegsource, but neither can quite be trusted - if I jump to a certain frame, I'm not guaranteed to get the exact frame I asked for. If I step back a bit and advance through it seems to start working properly, but I'm using a lot of temporal filters and I don't want it to mess up on me when I'm least expecting it.
I've tried remuxing the .mkv files made my MakeMKV into .mp4 files and .vob files but they still exhibit the problem.
Are there any other options?
poisondeathray
8th August 2018, 21:13
DGDecode is available for x64 but some iDCT modes are missing
http://avisynth.nl/index.php/AviSynth%2B_x64_plugins
https://www.mediafire.com/download/c0wmemj5jam/DGDecode_3-19-2010.rar
what? did you say dgsource has problems and cannot be trusted? Maybe provide some details or a source so it can be "fixed" ?
for ffmpegsource/ffvideosource, there is a seekmode=0 switch which helps with "vigourous" seeks, but it's slow
I've tried remuxing the .mkv files made my MakeMKV into .mp4 files and .vob files but they still exhibit the problem.
I have found mpeg2 in mkv very, very, very unreliable with many source filters. I always demux to m2v if it's in mkv
Emulgator
8th August 2018, 21:16
Does it happen if you have only the sourcefilter in your chain ?
DGSource should be rocksteady.
wonkey_monkey
8th August 2018, 21:57
Thanks for all your help, but I'm afraid I may have wasted your time :stupid: I was sure it was a source filter problem for various reasons, but I've now been able to reproduce some truly bizarre and, frankly, impossible behaviour from my own filter which is part of the chain.
The reason I believed it was a source filter problem is because I was seeing a similar problem when using mvtools instead of my own filter. Now I wonder if it's actually an Avisynth+ problem, because of the following behaviour:
src=colorbars.converttoyv12.showframenumber
my_filter(src)
Somehow, and I have no idea how, my_filter sometimes returns the wrong frame, but what's really impossible is that sometimes it does so without the framenumber. This should be completely impossible - the filter is never passed a clip which has not had showframenumber applied to it.
mcompensate was also showing a similar off-by-one problem, which I originally put down to my own misunderstanding of it. I will investigate.
poisondeathray
8th August 2018, 23:17
what was "my_filter" ?
did it affect avs classic too, or only avs+ ?
wonkey_monkey
9th August 2018, 19:54
Bug found and squished. I was calling GetFrame/GetReadPtr several times in succession, but not holding on to the PVideoFrames from GetFrame, so I think AviSynth was re-using them and overwriting/re-using the ReadPtrs I had already gathered, which (possibly) explains why I was getting frames from clips that weren't even passed to my filter.
:stupid:
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.