PDA

View Full Version : Divx to Svcd....what do you suggest?


TheeeGod 3
24th April 2002, 07:13
hey gang,
i came across a bunch of divx (avi) movies and i want to convert them to svcd format. I wanted to know what you guys (the experts) suggest i do with the settings. their pixels vary as follows:
- 720 x 352
- 576 x 256
- 704 x 336
- 512 x 224
- 720 x 480
- 512 x 384 (anime)
- 640 x 272
- 512 x 272
- 352 x 240
- 512 x 288 (anime)

The avi's are in pretty good quality. They are not as good as dvd's but one cant tell the difference unless when one looks real real close to the compueter screen. Little blotches appear on certain parts but nothing to complain about. I wanted to know whether i should play around with temporal smoother. I have never used it before so i wanted to see what you guys recommend. I was thinking about using 4 pass vbr with a max of 2530 and max average of 2350 and an audio bitrate of 224. Should i increase the max to 2600 and droop the audio since my source isn't a dvd? or should i just increase the minimum (which is regularly 300 for me) to, let's say, a 1000? or maybe use 5 passes instead of 4? and since the sizes vary so much, should i tamper around with the avisynth script or let dvd2svcd automatically resize them? And what about mark's "sharpen" method? would that provide better results even though it is cbr? And what special or any out of the ordinary settings for anime, i.e. image quality priority, anti-noise filter, etc?

sorry if i'm asking so many questions but i just wanted to know what the experts think should be done to get the best quality picture possible....and thnaks in advance for reading

pacohaas
24th April 2002, 21:51
Originally posted by TheeeGod 3
or maybe use 5 passes instead of 4?
and since the sizes vary so much, should i tamper around with the avisynth script or let dvd2svcd automatically resize them?

I'll try to answer what I can:
1. 5 passes will be better than 4, but the difference between 5 and 4 won't be nearly as big as the difference between 2 and 3, if you got all the time in the world, make it 5 or 6, it couldn't hurt.

2. as for the resizing, avi2svcd doesn't do AVI resizing correctly all the time, so I suggest definately editing the script. Personally, I would use Gknot to get the best resize for a width at or slightly under 480 and go from there. for example, Gknot tells you that there will be zero aspect ratio skew with 476 x 166 so you use that for your resize in avisynth, then addborders to fill it up to 480x480

and your 352x240 file, i believe you'll be better off using bilinear resizin for this since you're upsizing (but i might have it backwards, search the forum, it's here somewhere) Because the quality of upsizing might not be so great, you might just want to addborders to fill it up to 480x480. Your picture will be in the middle of the TV though with some pretty big black borders on all sides.

good luck

gerti67
25th April 2002, 02:18
Hi TheeeGod 3,

as pacohaas already mentioned, the DivX(AVI) resizing to SVCD is not always correct with the "AVI2SVCD" feature. Because I only did 1 or 2 very short DivX conversion with D2S only for curiosity reasons - I can only give a little help on the correct resizing part:

Here are the correct formulas to use with the AviSynth script:

Assuming your AVI has the following dimensions: PixelsX x PixelsY (e.g. 640 x 272 Pixels).

So you have to calculate the correct resize parameters this way for your SVCD to be displayed correctly on your TV set:

- AnyResize(480,((720/PixelsX)*PixelsY)/(54/59)) for PAL
- This would be AnyResize(480,334) for the 640 x 272 AVI

- AnyResize(480,((720/PixelsX)*PixelsY)/(11/10)) for NTSC
- This would be AnyResize(480,278) for the 640 x 272 AVI

Then just use the AddBorders(0,top,0,bottom) statement to fill up your calculated vertical resolution to 576 for PAL and 480 for NTSC.

That's all. ;)

You can read more on that in here - watch my last post:

http://forum.doom9.org/showthread.php?s=&threadid=21190

Greetings,
Gerti

P.S. You should always round up/down to even numbers - this might not be absolutely correct then but this little aspect ratio error is usually not visible. And it is better if they can be divided by 4 or even better by 16.

TheeeGod 3
25th April 2002, 06:20
thnx guys for your help

@pacohaas
i will definitely use 6 passes since yime is not a issue. Do you think raising the bitrate from 2530 to 2600 will provide any visible improvement when doing 6 passes?

@ gerti
i will use the method you told me for resizing. pretty clever :cool: no need for extra programs. would you recommend that i do a simple/bilinear/bicubic resize? and can you also please show me a smaple script, before and after it has been tampered with? i have never manually altered script files, but with your help i bet it would be easy ;)

and again thank you guys for your help :)

ric1234
29th April 2002, 19:55
Hi all,
I have always wondered something about resizing and Divx...

Say I have a 640x480 divx, I was wondering if the best would not be to make a xvcd with 480 lines in order to keep the number of lines unchanged and adjust only the width of the pictures ?
Because what's the point of upsizing ? I think I would prefer to have a little less in resolution bacause :
1- I don't loose quality by upsizing
2- it gives me more bitrate per pixel

Big question is : would CCE accept a 480 lines resolution ?
Second big question : would dvd2svcd accept a non SVCD resolution for the whole process ?

I read this from Dvd2svcd in another thread :
"Huge problem. CCE will not accept all types of resize. However, I have in the next version 3 sizes to choose from: DVD (full size), SVCD, and VCD (half size)"
in http://forum.doom9.org/showthread.php?s=&threadid=23821

What about an option to "Keep same number of lines as in source material" if possible of course ?

Thanks
Ric

mava70
28th May 2002, 11:34
I suggest:

1) take your car
2) go to your nearest dvd rental
3) rent the same DVD as your DIVX movies
4) encode with DVD2SVCD
5) delete your original Divx file

There are no comparison in quality between SVCD encoded
from original source and converted one.

Marco

josiba
2nd June 2002, 00:16
You are right mava70, but how could I have The Lord of the Rings for example if it wasn't in Divx?
How on earth could I wait until the DVD arrived to Europe? I can't. So I have Divx, so I convert to SVCD.

Americans are so lucky to have DVDs much earlier. Even when movies are in theaters all over Europe, they already have the DVD! It's not fair :(

chainsaw135
2nd June 2002, 04:58
hey i'm still waiting for lord of the rings hahaha


"I'll try to answer what I can:
1. 5 passes will be better than 4, but the difference between 5 and 4 won't be nearly as big as the difference between 2 and 3, if you got all the time in the world, make it 5 or 6, it couldn't hurt."


Man that statement could not be more true, i always use 5 pass i notice enough difference to make it worth wild seems 2 be good enough specially if you like me use sharpen and bicubic methods.

titvs
28th June 2002, 00:12
Hi all.

It's my first time i post here in this great forum populated with experts ;) One can learn pretty much by reading the posts in here.
I also have some questions about resizing divx AVI material like TheeeGod3 posted. The difference is that i would like to do a non uniform resizing (changing the aspect ratio) to reduce the "almost closed eyes" effect :p or 16:2 aspect ratio ;)
I read gerti67 post but i think those formulas are for a uniform resize.
For instance, i have avi material at the resolution 640x272.
Using gerti67 formulas the calculated resolution would be:

XptoResize(480,334)

And then the AddBorders statement until it fills up the vertical resolution (btw, the amount to put in the top and bottom is half of the value need to reach 576? In this case would it be AddBorders(0,121,0,121) 121 = (576-334)/2 )

But say i want to increase the vertical resolution by 40 pixels, the Resize statement would be:

XptoResize(480,374) and then
AddBorders(0,101,0,101) ?

I know i cant change the aspect ratio too much or the actors will look like aliens :)
What do you think of this? Give me you oppinions :)

Thanks for your attention

Titvs

gerti67
28th June 2002, 17:12
Hi titvs,

and welcome to the forum. :)

These formulas (it's also a bit more detailed in the Q&A - Q62) are especially to maintain the correct display aspect ratio of DivX/AVI sources so that they will show up correctly on your TV set when converting them to SVCD.

So you really don't need to add another 40 pixels to it - just try it. ;) It will absolutely look the same - no stretched or shrinked faces, etc on your TV/standalone combo.

A "uniform" resize with the correct aspect ratio for viewing on PC would be 720x306 for your 640x272 AVI - so you see I already added the correct amount of extra lines to make it show correctly in the TV based scaling "world".

See a more detailed description in my second last post in the thread I already mentioned above if not already done.

Hope this helps,
Gerti

Daagar
28th June 2002, 23:57
Just to point this out, since it confused me at first: Gerti's post above is saying 704x306 is the correct resize _for your PC_. An important piece of info. For a 4:3 NTSC TV, the correct resize is actually 704x272.

If you simply use FitCD, it will correctly make all these calculations for you.

gerti67
29th June 2002, 02:19
Hi Daagar,

...Gerti's post above is saying 704x306 is the correct resize _for your PC_...Really? - Did I? - Guess not. To make it more clear, I was speaking of his AVI source which is 640x272 pixels and if you would upsize it to a width of 720 pixels in the PC based "world" you have to stretch the height of 272 pixels with the same scaling factor which is 1.125 in this case so you would get an AVI with 720x306 pixels which also has maintained the correct aspect ratio for viewing on your PC monitor.

Why virtually upsizing to 720 pixels width? - Because it's the correct "base" when going to convert to SVCD (704/352 is the correct base width when going for VCD). It just makes calculations a bit easier IMHO so you now only have to calculate the needed vertical "lines" for the TV based "world" which equal the height in pixels in the PC based "world". And as we know that a PAL "pixel" (line would be more appropriate) has 54/59 of the height of a PC based pixel, you can now calculate the correct number of lines:

=> 306 / (54/59) = 334 - That's it.

So the correct values for resizing to a PAL SVCD would be:

AnyResize(480,334)

And for NTSC it would be:

AnyResize(480,278)

And FitCD 1.04 gives me the exact same results, it's a good tool but IMHO it is way to confusing for a "Newbie" with this huge amount of switches and boxes to play with - in fact you really have to know what to do and where to go for IMHO to get the script you want to have.

Hope, it's a bit clearer now, as I didn't point out that the 720x306 upsizing was only a virtual step in between the calculations to which I refered in my first post in this thread.

Greetings,
Gerti

titvs
29th June 2002, 04:30
Thanks for your explanations Gerti :)
I read your post in Q&A and understood what you wrote.
I will try to convert some DivX material with your tecnic and see the results. But i think they will be fine ;)
The AVI2SVCD module performs a resize which leaves large black borders and the movie is a strip in the middle of the screen :p

Thanks for your help Gerti.

Titvs

titvs
30th June 2002, 04:03
Hei Gerty, i noticed in the change log of DVD2SVCD 1.0.9 Build 3 that the resize algorithms were changed, thanks to you :)
I think its not necessary to perform the change in the avisynth script now. Or is it? :)

Titvs

Daagar
30th June 2002, 23:39
Sorry Gerti, my bad. I deal with the 704x480 resolution a lot, and to go from a 640x272 source, you'd resize to 704x272. I completely missed the fact that you were talking about standard DVD resolutions of 720x480, not 704x480! So yes, of course, your resize is correct. Doh!

gerti67
1st July 2002, 11:41
Hi titvs,

from my experience, it is still necessary to use the resize, as I still have AVIs/DivX where the resizing of AVI2SVCD is defaulting to 480x576 for PAL and I have to manually correct the resize values in the Avisynth script window.

I already mailed this to dvd2svcd and I think he is working on it.

So I would suggest you still tick the "Edit as part of Video encoding" to see if the values are default or correctly calculated ones. If the later is the case just hit "OK" - so you must still wait till the encoding process starts.

Hope this helps,
Gerti

gerti67
2nd July 2002, 18:13
Hi again,

I just want to update you all on this AVI/DivX resize issue I still had with DivX5 movies I had done for testing the AVI2SVCD feature - they were always resized wrong (to 480x576) regardless of any setting for the aspect ratio I chose from the pulldown in "Conversion" tab or a lot of other settings I tried to get around this.

Now I did some more testing and it seems that the error only occurs if you are using some of the built-in new features of the DivX5 Pro codec - especially when cropping and resizing with the advanced settings of the codec instead of doing the cropping and resizing with a different app (VirtualDub, TMPGEnc) - if you use the new Pro features, the AVI file header is not the same as if done the other way round.

In fact the "size" params within the "avih" part of the header are set to the source resolution of the movie (720x576 in my case) and only the "size" params of the "strl|strh|strf" part contain the resized values which were 640x272 in my case. So the resize went wrong as it seems DVD2SVCD tries to read the params from the "avih" part of the header.

So I can say it is safe to use the AVI2SVCD feature on AVI/DivXs which weren't created with these "Pro" features together with DVD2SVCD and nearly all other codecs (CinePak, Indeo, DivX3, Divx4, ...) as I did quite some testing with them now - and I think dvd2svcd can correct this rare "bug" with the DivX5 in future builds (I already mailed him my results).

Hope this makes things more clear now,
Gerti

Edit:

I forgot to mention - after loading the AVI in "Conversion" tab select the proper "Aspect ratio" from the pulldown box. It's "16:9 (borders added, encoded as 4:3)" to create a correctly resized AVI for your SVCDs and viewing on a 4:3 TV set and use "4:3 (No borders, encoded as 4:3)" to create a anamorphic SVCD from your AVI source.