Log in

View Full Version : Re-encoding with AviSynth/x264, MPC-HC standalone filters


jwdaigle
8th December 2010, 05:24
Hello,

I am trying to re-encode using x264/avisynth 2.5, on Windows 7 x86, with MPC-HC standalone filters as the decoder. I get video that looks like some of it is "offset", which gives an eerie colored shadow effect. I have attached a few screenshots of encoded video showing the shadow effect.

My avisynth script is very simple, one line:
DirectShowSource("Original.mkv", fps=23.976, audio=false)



If I use ffdshow as the default filter, I dont get this anomaly.

I prefer to use MPC-HC filters for a variety of reasons.

I have tried several video inputs (vc-1, avc etc), and they all exhibit this behavior.

If I play a video using graphstudio (with MPC-HC filter being the default), the video appears correctly.

Any ideas what could be going on?

Thank you in advance,

Joe

7ekno
8th December 2010, 10:23
DirectShowSource has never been that useful for MKV ...

If you must use DirectShow, try DirectShowSource2(), it requires the avss.dll file from the Haali directory to be in the Avisynth Plugin folder ...

DSS2 is less fickle than DSS and is frame accurate for MKV ...

7ek
PS post screenshots on freebie image upload sites, they are available much faster that way (I can't see them, still pending)

jwdaigle
8th December 2010, 14:33
OK, so heres is what I have found out based on 7ekno's response (:thanks:).

I have used DSS2 instead of DSS, and using MPC filters, the video is normal! Thats cool -

BUT (theres always a but, right?). Encoding is like 1/3 to 1/4 the speed of old DSS.

On a whim, I rebuilt my Win7 machine, and installed only absolutely necessary stuff - minimal install. With DSS, messed up video - with DSS2, normal, correct video.

"its not correct, but at least its fast!" :-)

So, one would wonder why FFDshow works with regular old DSS, and MPC-HC filters dont?

Anyway to speed up DSS2, like maybe larger buffers or something? When I am encoding, the encoding progress is "jerky". Every so often, the encoding pauses, and then continues. Maybe it has to rebuild a bunch of frames?

so, in summary "working" now, but really really slow. My encode will go from 10 hours to like 30 or 40.

Any additional help appreciated.

Joe

jwdaigle
13th December 2010, 01:21
slight bump to see if anyone knows why DirectShowSource doesnt work with MPC-HC, or, alternatively, how to speed up DSS2 to be less than 3x slower than DSS?

Im kind of caught since neither one is really usable

dansrfe
13th December 2010, 01:59
you can try ffms2

jwdaigle
13th December 2010, 04:12
ffms2 seems ideal for encoding - no need to register anything, totally self contained, fast (its same speed or better than mpc-hc), handles 264/vc1/mpeg2, free (:-))

It also seems to claim accurate frame rendering ("on a good day" ? :-))

So is there a downside? Is it more or less stable?

Wow, this seems to be exactly what I have been looking for.

:thanks:

Usedocne
13th December 2010, 05:34
So is there a downside? Is it more or less stable?

http://code.google.com/p/ffmpegsource/
If you're confused by all the different flavors, here's a small explanation:

* Vanilla: standard version.
* -mt: Multithreaded video decoding variant. Should be faster on multi-core computers, but may be unstable.
* -avs64: 64-bit version for use with 64-bit Avisynth.
* -utf8: Variant supporting UTF-8 strings in the API; intended for use with Aegisub. Useless as an Avisynth plugin.

jwdaigle
13th December 2010, 07:23
I used the "vanilla" version - for no other reason than it sounded like the most appropriate for me.

Only (slight) curveball was I didnt know I needed to "index" the file first. First few times I tried, x264 just sat there with blinking cursor for quite a while.

I then tried running ffmsindex.exe on the input file, which created an index file for me.

After that, all was well - let the encoding begin!

Thanks all -

Joe

7ekno
13th December 2010, 07:28
I would have suggested FFMS2 right off the bat, but your inclusion criteria specifically stated:


If I use ffdshow as the default filter, I dont get this anomaly.

I prefer to use MPC-HC filters for a variety of reasons.


FFMS2 = FFDShow decode library ... you then went on to say you preferred MPC-HC filters, so even though nobody does it that way, I thought there must be some secret squirrel reason as to why MPC-HC filters had to be used ;)

7ek

jwdaigle
13th December 2010, 07:37
no worries -

What I meant by my "would prefer" was more like "really dont want to install the whole ffdshow package, but would rather use something like mpc-hc".

Although thats not what I said - my fault :-)

I didnt know ffms existed when I posted the original question.

ffms seems to be perfect for what I want - low footprint, straightforward "just serve up the frames to be encoded with no funny business".

Thanks to all again -

joe