Log in

View Full Version : Low Bitrate MAF Encodes using CCE and Tylo's 1 pass Plug-in


Pages : 1 2 3 [4]

r6d2
21st November 2003, 02:20
When CDs where invented, they had 74 minute capacity.

With floppys, magnetic in nature, they managed to double the capacity on each generation by increasing the density of the material.

CDs are optical in nature and mechanics only allowed for some optimization on track width and thus improve capacity to 80, 90 and 99 minutes in one layer.

CDs were originally used primarily for music, and that size was quite enough for most applications. They even designed the inner hole to fit your finger. ;)

When consumer burners came out, other uses were given to CD media. Including movie encodes. One CD can fit 798-MB of video data, including headers and file system structure.

You usually cannot fit a 90 or 120 movie in 1 CD without heavy cropping (like the one done by FACAR), filtering, custom matrices and big GOP tricks. All those tricks make the movie lose quality, even though the quantization you measure afterwards may be still low, it's a quantization for a very different source than the original.

I really find it pointless to stick to the arbitrary 80 min CD sizes instead of preserving quality. If CDs would have been created as 100 min originally, all our encodes would have at least 25% more quality. I don't think we should let the music industry historical decisions to decide which quality your encodes will have. ;)

It's like if there was only small sized clothes and we would still buy and use anyway, looking terribly ridiculous when you are bigger sizes. :)

The Edge
21st November 2003, 10:31
Just reading all this last night and look forward to testing it all.
I notice the SemiAutoCropAndResize.avs is not compatible with Avisynth 2.53. Seems to work fine under 2.52. Am I correct in saying this?

I only had a few minutes to use this yesterday. The error was in line 80 of the avs which is:

(ResizeMethod == 2) ? BicubicResize(NewDestinationWidth, NewDestinationHeight, Bicubic_b_Value, Bicubic_c_Value) : NOP()

Maybe I messed up here so I'll double check later night and re-read the posts. Cheers.

Edge

Edit: typo

Crackhead
21st November 2003, 11:08
Coz I hate it to have the movie being interrupted somewhere and changing the cd...
second, what r6d2 says about quality is absolutely right, but IMHO i don't see any great difference on tv, so i think it's not worth "wasting" one more cd-r:D

but don't want to start any kind of religious discussion here:D :rolleyes: (i think we already had enough of them:D )

so @ manolito: did you apply any filters in pre and postresize.avs, cause i tried the changes you suggested and it works really great.

manolito
21st November 2003, 15:40
Thanks for the replies, I'm glad I was wrong assuming that noone is interested in low bitrate encodes anymore.

I should have done that in my first post, but here comes a BIG thank you to the people in this forum. I am not new to computers, but this DVD stuff is still quite foreign to me (got my first DVD Rom about three months ago). I tried to do my homework before posting here, and it is amazing how much I learned from reading older posts. I'm especially grateful to DDogg, r6d2 and Tylo, you guys are great!

@r6d2 and crackhead:
You both have a point, but I have to admit that I am a very lazy person, so if I can avoid changing a CD in the middle of a movie I will try to do that. And let's be honest, if our priority was to get first rate quality encodes we would all have a DVD burner and do our DVD backups with one of the "one click" programs. A few days ago I saw a + burner for a little over 90 Euros.

What got me hooked to the DVD2SVCD stuff was the challenge, trying to push the limit (getting too pathetic now....)

And a final word about this "quality vs. size" thing: Most of my former girlfriends told me that both are equally important!


Okay, let's get serious again. Last night I did a 1 CD encode of "Chocolat". The movie is 1 hour and 57 minutes long, AR is 1.85 : 1. I used FACAR's QMF functions with the two modifications described in my previous post, CCE settings also as described. I got a Q of 39, and for me it is impossible to tell the difference to the original DVD. At first I thought I could recognize the SVCD by the slight flickering of the characters during the end credits, but this was just interlace flicker which was present in the DVD also. Of course this is only true for watching the film on a regular TV set, but this is what I usually do.


@The Edge:
SemiAutoCropAndResize is obsolete, you should upgrade to FACAR. I do not know if FACAR has problems with AviSynth 2.53 (isn't 2.53 still beta?)

@Crackhead
I edited Pre- and Postresize.avs according to the following post by DDogg (I think it is in the FACAR thread):

-----------------------------------------------------------
Actually the idea behind QMF is to avoid overcompression by lightly applying the
relevant filters to the appropriate level of action. Same would be said for KWAG's MAF.
QMF or MAF is not the culprit, the overzealous use of filters in them is. But as a
matter of personal practice I quit using either because using your Pre and Post setup
is soooo nice with a light filter application like:

PreResize -
undot()
ASharp(1,4)#costs "Q", but I really like the contrast increase
Fluxsmooth(5,5)

[bilinear resizing]

PostResize -
#deen() occasionally. It actually seems to be better post resize
TemporalSoften(3,5,5,10,2) #normally use this

Helps compression greatly without it being noticable to me. If that doesn't work I
just increase space/disks.
----------------------------------------------------------------

I totally agree with DDogg that these filter settings can be used universally. Compared to using no filters at all it lowered my Q by 16, encoding speed dropped to 44% of the speed without filters.


My other favorite filter setup is the modified QMF stuff described above. It made my Q drop by 21 while encoding speed was 63%. Of course the effect of this QMF filtering depends on the kind of material you are encoding. Maybe some more tweaking the thresholds might be useful, but I think Jsquares values do work very well.


Another thing I noticed: When using the QMF filter I had to increase the "Adjust Q" value in Tylo's plugin quite a bit. For version 2.70 RC2 I could go up to 3.2 before I got any slightly oversized encodes, and for version 3.00 I use a value of 2.6 now.



OK, if anyone is interested I could post my test results with all the different filters. I tested the following scripts:

1. Reference: FACAR without filters
2. MAF script by KWAG (The official KVCD optimal script modified for FACAR)
3. MAF script by DDogg (first post in this thread, modified for FACAR)
4. Pre- and Postresize by DDogg (see above) included in FACAR
5. QMF Ultralow Benchmark 1 by DDogg (also modified for FACAR)
6. QMF functions by r6d2 and DDogg included in FACAR
a: Bilinear on medium- and high motion bands
b: Bilinear on all three bands
c: Original thresholds (Homie Fr)
d: Modified thresholds (Jsquare)
7. QMF with BlindPP with and without Deen (posted by DDogg in this thread, modified for FACAR)


IMHO the two scripts that stand out are No. 4 and No. 6bd. No. 7 with Deen is for those real hopeless encodes, but it's sure nice to have it.

Crackhead
21st November 2003, 16:00
^^ sure i'm interested about your test results!
i did some test myself these days and facar W ddogg's post/preresize-filtering w/o qmf gave me the best results, but i will try your suggestions later today and see how it goes!
Originally posted by manolito
And a final word about this "quality vs. size" thing: Most of my former girlfriends told me that both are equally important!Good to know btw, will keep this in mind:D:rolleyes: lol

r6d2
21st November 2003, 23:44
Originally posted by manolito
@r6d2 and crackhead:
You both have a point, but I have to admit that I am a very lazy person, so if I can avoid changing a CD in the middle of a movie I will try to do that.
Interesting. Then the music industry turned out defining the lazyness threshold of mankind too! Smart guys. Will they have thought of that? :D:D:D
And let's be honest, if our priority was to get first rate quality encodes we would all have a DVD burner and do our DVD backups with one of the "one click" programs.
That is the extreme lazyness indeed ;), and as you say it presents no challenge whatsoever. Actually, that has refrained me from buying a DVD burner. :)

You have a point, but I actually encode SVCDs on CDs for my portable player when I travel. I always have the originals at home.
And a final word about this "quality vs. size" thing: Most of my former girlfriends told me that both are equally important!
LOL. And what does the latter one think? :D:D:D

Wilbert
22nd November 2003, 16:07
I only had a few minutes to use this yesterday. The error was in line 80 of the avs which is:

(ResizeMethod == 2) ? BicubicResize(NewDestinationWidth, NewDestinationHeight, Bicubic_b_Value, Bicubic_c_Value) : NOP()

Apperently the nop function doesn't work in AviSynth v2.53. A work around:

http://forum.doom9.org/showthread.php?s=&threadid=65093&highlight=nop

DDogg
22nd November 2003, 18:19
Just for the record, my purpose in doing a lot of this time consuming grind testing was not for the purpose of a 1cd SVCD. Rather it was to accumulate the data and experience to establish certain personal benchmarks to be used later when putting multiple movies on a DVD of equal quality. As the OPV'ers know, equal space has nothing to do with equal quality due to the compression characteristics of the source as well as simple things like aspect ratio and length.

This predictive ability of OPV encoding seems nearly magical to me :)

One of the things most interesting to me was how much intrinsic information is available by doing just one 1% pass at Q32 Min 300 Max 2584 (or whatever your personal values are).

What I mean is, just looking at the filesize from that one pass tells me just about everything I want to know. If it is much bigger that 7250-7500 KB then I know to try additional filters up to my personal opinion of "max filtering acceptable to me". At that stage, if filesize is larger than 7250-7500 KB (in the case of an SVCD 1CD encode), I know the encode it not practical for one disk and increment/increase space.

It is important to note that those value quoted above are just those that work for me when the target is one 700/80 CD. The same thing could be established and work for a 2200kb, or whatever xx KB space, allocation for DVD.

Creating your own personal criteria is just the result of a one time set of tests, accumulating the data, and establishing your personal benchmark. After that data is finalized in your head, it is replicatable and reusable for future encodes involving that X amount of space. Things like chosen resolution, the compressibility of a particular source, length of source, aspect ratio, etc., are all automatically encompassed and do not need to be thought about. I like simple things where you need to take the time and allocate mind space to learn it just once. After that you just reuse that knowledge in a tool users manner without much thought or effort.

In the case of multiple movies on one DVD, the same method, can be used to know what space needs to be allocated for each source so that a similar Q is achieved for each. You do that by doing multiple iterations of the 1% sample with all your sources that need to be fit into the X KB of total space. Multiplying each resulting sample filesize by 100 yields an approximate space requirement for each source. Eventually, and without too much trouble, you will find a common Q that will encode each source at the same quality *and* fit the available space.

Because sampling is not 100% accurate, the last source you wish to put on the available space may require a sizing pass to shoehorn it in to that available space. In other words, if the first X sources ran over or under a bit, you use the ability of CCE to do a final resizing pass where it reuses the VAF information file created in the first pass. This ability of CCE to reuse the VAF sets it apart from other encoders and becomes very valuable in this situation. The second pass is deadly accurate and only needs to be performed on the last movie to be fit in the available space (assuming the adjustment does not break the 10% rule).

Knowing in advance this acceptable Q and the required space needed saves one hell of a lot of wasted time and effort. That's a beautiful thing to me. Yes, I do realize that makes me some kind of an encoding nerd without a life :D

Did this all make any sense, or am I rambling again? :D

Also, pardon my multiple edits. I got on a roll.

Van the man
1st December 2003, 13:57
hi!
Looks like this is a great way to do svcd's on 1cd.
But when I tried to do a svcd with the MAF,there is no picture on the final file,I can only hear the sound.Is there something I am doing wrong? and where?
the muxing and all that stuff is doing good,but when I open the file I can only hear the sound :confused:

Hope to get some help :)

Van the man

EDIT: I tried to open the file in Tmpeg.It worked fine.So is there something wrong with CCE?

Crackhead
1st December 2003, 15:02
did you try to watch it with wmp?
if so, try with powerdvd or zoomplayer or whatever player you have!
with wmp you may need a codec which isn't included in windows beforehand..

Van the man
2nd December 2003, 01:03
yeah,I tried to watch with wmp and powerdvd.But no luck.I also tried to burn the image and test on my dvd but still no picture,only sound.