PDA

View Full Version : use ffdshow-postprocessing to deblock video via avisync?


Nimo
14th September 2004, 17:25
Just like the thread said.

I have a bad quality mpeg video. So, my plan is going to use ffdshow postprocessing filter to deblock my video first(via avisync) and then, use virtualDub to open deblocked video in order to encode.

Is it possible?
If it possible, what command line should i use?

Thank you!

Manao
14th September 2004, 18:01
Either use the filter BlindPP, from Dgdecode.dll, or transcode your mpeg into lossless huffyuv via ffvfw and load the resulting avi file with DirectShowSource.

In the first case, you'll only have deblocking and deringing enabled. In the second, you'll have more possibilities of postprocessing, but avisynth's own filters can do at least as much as ffdshow ( and often more )

marcellus
14th September 2004, 20:41
Hi,
Why use BlindPP, if it's a mpeg2 file (not mpeg1) he should simply enable post processing in dgdecode.dll (with CPU=1-6 option). That way I think the actual quantization (on every frame basis) in the mpeg file will be taken into acount.
@Nimo
Or, to properly use post processing in ffdshow you should enable ffdshow as system's default directshow mpeg decoder and access the file from avisynth (via DirectShowSource, not AviSource, vfw postprocessing is not working, at least for me). That way ffdshow knows and takes into acount permanently the actual frame quantization, and besides you can easily adjust the sliders in ffdshow for optimal amplitude of post processing. If you convert the file first to huffyuv the quantization information is lost and you can easily over-postprocess the file. Quantization varies from frame to frame so it's better to dering-deblock every frame acordingly.

Manao
14th September 2004, 20:56
marcellus : mpeg1/2 decoding is broken in latest ffdshow ( at least, the GUI reports it as broken ). But if it still working, of course, that way if by far better.

Leak
14th September 2004, 23:45
Originally posted by Manao
marcellus : mpeg1/2 decoding is broken in latest ffdshow ( at least, the GUI reports it as broken ). But if it still working, of course, that way if by far better.

The latest version is

http://prdownloads.sourceforge.net/ffdshow/ffdshow-20040828.exe?download

so you probably have got an older version installed - I've successfully decoded VOB files with it.

np: Themselves - Revenge Of The Fern (Them)

marcellus
14th September 2004, 23:45
Did you try ffdshow 20040828? According to athos in ffdshow development thread:
mpeg-1/mpeg-2 decoding through libmpeg2 seems to work fine in this release, including seeking.
Unfortunately this version has internal avisynth processing broken so I'm using an older ffdshow.ax copied over the latest installation folder and with this hack I'm getting problems in decoding mpeg files. (fortunately Milan fixed avisynth issue already so I'm waiting for a new compile).
But I remember that I enabled with previous versions libavcodec as mpeg1/2 decoder (in spite what GUI says) and as far as I used it it worked fine (though I didn't do an exhaustive check and also I didn't used intensively).

Edit: I see Leak was quicker:o

Manao
15th September 2004, 07:10
Oops, my bad, I was still with the 20040804 version.

Nimo
15th September 2004, 16:55
I think i almost found the way to deblock video before encode. In ffdshow lastest ver. I notice a new programs tab called "makeAVIS". And i try it a little bit and... yes! It's working! But, there's only one problem.

When i use "makeAVIS" prog to simulate avi file (from avs scrip). avi file work properly on wmp9 but it doesn't work with virtualdub. It said "error decompressing video" & "The operation is not supported".

What should i do?

PS. Thank you for everyone suggestion. But i choose this way because i'm not fluently using avs-scrip. And sometime, I have no idea what are you guys are talking about :p And it would be great if you give me some example(about avs-scrip)
Thanks again!

Mug Funky
15th September 2004, 17:44
nimo: that's a cute avatar you've got there... where's it from?

Nimo
16th September 2004, 15:08
Mug Funky : right here www.boyis.com and search for a wallpaper called "Canvas2". You might found some more in here http://www.boyis.com/special/canvas2/index.php also

I think i found the way out by using avisync --> directshowsource again on avi(simulate file) and pass it to virtualDub. like this...

origin mpeg file --> avi simulate file(from ffdshow) --> avs --> virtualDub

As you can see. It took three process in order to encode file, consequently my CPU is not gonna make it.
Any suggestion or some other better method? (without transcode origin mpeg file into a new file if it possible)

PS. Again, please give me some example or some more detail. I'm not a specialist on avs. Thank you !

hartford
17th September 2004, 05:23
Could you tell us what is your Operating System (Win98, W2K, etd)?

Yes, ffdshow is slow, but it is accurate. The speed cannot be increased.

Mug Funky
17th September 2004, 10:15
hang on... ffdshow will do mpeg-1 and mpeg-2 now, so just enable them and you'll be able to go:

Mpeg-1 --> ffdshow deblock, etc --> avisynth via directshowsource --> encoding app.

that should do, shouldn't it? you'll need the latest ffdshow (and it is by no means slow - it's actually the fastest mpeg-4 decoder i've come across, allowing to play full DVD size stuff back in realtime on my piddly 733Mhz. something i couldn't do with either Xvid's native decoder or Divx's crappy one)

Nimo
17th September 2004, 16:31
Sorry, my mistake. I didn't notice that lastest ver of ffdshow can now decoded mpeg.
Now, I can just use directshowsource in avs that's all.
Thank you! everyone!

ADLANCAS
20th September 2004, 22:04
Originally posted by Mug Funky
Mpeg-1 --> ffdshow deblock, etc --> avisynth via directshowsource --> encoding app.
Sorry, I didn't get it.
Could someone explain me how could I make the first part of this sequence (mpeg-1 --> ffdshow) ?

Thanks,

Alexandre

marcellus
21st September 2004, 01:24
@ADLANCAS
Open ffdshow "configuration". In "codecs" tab enable mpeg1/2 decoding (choosing libmpeg2). Also in the "tray" tab enable "show tray icon" box.
Now, open your mpeg file in MPC (but you have to disable first MPC's mpeg internal decoding so it will use ffdshow for decoding). You also can use any other player that uses directshow interface, not vfw. While the file plays double click on ffdshow icon in tray to bring up the realtime ffdshow setting interface. That way you can enable postprocessing (and whatever filters you want) during playing and make your adjustments visually. Do not check "don't save settings to registry" box. When you are satisfied with the output close MPC and right away open the file via avisynth using DirectShowSource.

ADLANCAS
21st September 2004, 02:23
@marcellus

Thanks a lot for your explanation.

Alexandre

Inc
21st September 2004, 10:28
If you got FFdshow, XVID and d2vreader.ax installed, its possible to open in avisynth any d2v source (or mpeg/VOB directly as the encoder for this is included) via directshowsource.
You have to set ffdshows codec at RAW to YV12 and that only ONE ffdshow filtering per Chain is used.

By doing this you can easely use any kind of ffdshows filters.

So avisynths Directshowsource() uses d2vreader.ax to decode the d2v (which will be also! handled via ffdshow RAW YV12) or VOB/Mpeg (via ffdshow mpeg2) incl. the preprocessing via ffdshows filters.

Finally the avisynth script (depending on the colorspace as output) uses in case of YV12 outpur the xvid YV12 decoding engine as we have set ffdshow only to decode ONCE in the filterchain. Thats important if a encoding appl. is used which decodes the input via directshow. If CCE is used, then ist not necessary as CCE opens via vfw and you can set ffdshows fvw interface NOT to decode RAW YV12.

I used that when I made a comparison between mpeg2dec's deblocker and FFdshows internal one.

Psy-Crow
17th July 2008, 14:11
I'm sorry for bumping up this old thread, but I woud like to know, where I can get d2vreader.ax? I've googled, but all I've got is this thread and MeGUI changelog (http://sourceforge.net/project/shownotes.php?release_id=399043&group_id=156112). I also want to process video with ffdshow prioir to avisynth and this seems to be the only way it possible.

clsid
17th July 2008, 14:23
Maybe its real name is D2VSource?
http://sourceforge.net/project/showfiles.php?group_id=205650&package_id=246121&release_id=541235

Psy-Crow
17th July 2008, 15:04
Maybe its real name is D2VSource?
http://sourceforge.net/project/showfiles.php?group_id=205650&package_id=246121&release_id=541235

Oh, man, thats great! Thank you very much!