Forums [Archives] Forums [Archives] (
-   Avisynth Scripting (
-   -   Avisynth: Double converson for better quality? (

MrTibs 06-17-2003 10:01 AM

Double converson for better quality?
I know this has been discussed before but I'm going to ask anyway because I don't believe it myself.

In preparing the sample video for the Script challenge, I had to convert my Huffy capture to Mpeg2 to reduce its size. To do this, I ran it through TMPG CQ100 with a Max bit rate at 2500. The output looked the same [as the input] to me. Now when testing my filtering script, against the original Huffy file and against the Mpeg2 file I got much better compression (about 1/3 the size) with the Mpeg2 source. The end result is that the Mpeg2 source allowed me better KVCD results.

We all know that double compression is BAD but my question is what is happening here? Is this just an issue of bluring or am I making use of TMPG's motion estimation and noise reduction for pre-filtering? (There are some interesting papers on using compression for noise filtering.) Or, perhaps TMPG and much of the testing going on in this forum is optimized for Mpeg2 sources?

What do you guys think?

Grantman 06-17-2003 07:26 PM

Interesting issue... maybe same as Divx?
I have found that converting a Divx movie can sometimes give a strangely high quality in a small file size and with high CQ using the KVCD template. I have even found decent results going UP in resolution.

There may be something very true to the idea that a first pass (if done correctly) with an encoder will render a source file that is easier to work on. This is not the same as 2-pass VBR because the first pass and second pass are on the same source material.

There is a logic that could be found here. Maybe the first encoding acts similar to the LegalClip in that it simplifies the source and removes complexities that would have been outside of the encoder's "sweet spot" for processing?

It would also explain why some Divx movies can be encoded to KVCD very well and others actually get bigger and look worse? It would be dependant upon the parameters of the original Divx encode.

So maybe double compression is not ALWAYS bad.


MrTibs 06-18-2003 10:14 AM

I also have been doing some experiments going up in resolution. Most of my sources are 352x480 so this there really is only one way to go.

I have found that Kwag's amazing matrix has trouble with relatively flat or smooth areas. In scenes where there is high contrast the quality is equal to DVD but in smoother areas (particularly light browns) I will see quite a bit of graininess. To get around this, I've been upping the resolution to shrink the block size. Even with the higher resolution and lower CQ, the overall quality is better.

Or course this may all be due to the way the DVD player deals with the different resolutions. For example, I tested some 352x240 VCD's on a Magnavox DVD-VCR player. The image was very smooth but also very blurry. It made me wonder if it was resizing the frame up to 704x480 before displaying it.

Anyway, I wonder if I should try the DCT filter to archive the same thing as a double encode?

sh0dan 06-18-2003 12:29 PM

You could try looking at DCTFilter - it does a DCT+IDCT on the material, which is close to a compression.

ong001 09-20-2003 12:13 PM

Hi MrTibs

Are you still doing your experiments?

I found your posts here searching for articles on
the funny words "double encoding"

I am now on the KVCD forum thread on k2vcd

I hope this is not a double post.

If you don't mind please have a look at that thread.
I am trying to explain how to get excellent "vcd" quality
using two-step encoding.

With this method i can remove impurities (graininess?)
"without" using any filter!

Because my typing is slow, very slow, it might take me sometime
to explain things

I'll now go over to KVCD forum to do some more explanation,
hope to see you there.


audioslave 10-29-2003 04:12 PM

How do you guys open the MPEG2 file in your scripts? I can't get it to work. I used "MPEG2Source(XXX.m2v)" but VirtualDub says the MPEG2 can't be opened and I can't find any info on this in the AviSynth docs. Please, help me...

nicksteel 10-29-2003 04:13 PM

Download VirturalDub-MPEG2

audioslave 10-29-2003 04:20 PM

Thanks, but that's not my problem. I have that version of VDub. Maybe I was unclear. What I meant was that AviSynth can't open my script with the line I was refering to in my previous post. Any ideas on how I can fix that?

Dialhot 10-29-2003 04:27 PM

MPEG2Source can open only a d2v file, not directly a m2v.

So load your m2v into DVD2AVI, save the project and use that d2v project file as source for your script.

incredible 10-29-2003 04:32 PM

Where does your specific m2v comes from? A SVCD?

Maybe just open it in DVD2AVI without demuxing before and safe it as a project inkl. separated audio, which will also give you an easy to open d2v file for Avisynth.

Try it, I think it should be the best way ...

EDIT: Uops meanwhile typing there was one faster than me ;-)

All times are GMT -5. The time now is 11:31 AM  —  vBulletin Jelsoft Enterprises Ltd

Site design, images and content © 2002-2022 The Digital FAQ,
Forum Software by vBulletin · Copyright © 2022 Jelsoft Enterprises Ltd.