View Full Version : AVI2SVCD and Aspect Ratio Probs
I have a Divx (created using GKnot).
I am trying to convert this to a PAL SVCD.
My Divx is 640 x 320 and I need to get a PAL SVCD 576 x 480 but keep the aspect ratio if possible.
I can convert using TMPGenc but I wanted to use AVI option in DVD2SVCD. This works but I get the wrong aspect ratio.
Is this a bug in DVD2SVCD?
If so, how do i correct it?
Any help greatly appreciated.
need4speed
17th May 2002, 15:23
hi,
I'm new here but have you tried the "advanced" settings (sorry, can't remember which tab)..enabling it the "full DVD" option is avalable from drop-down menu, should be the old "kkep aspect ratio" if I'm not mistaken
gerti67
17th May 2002, 16:57
Hi LM,
indeed this is still a bug with DVD2SVCD as the AVI2SVCD is still in beta stage so far. And you're right the aspect ratio will be wrong in the end. ;)
So you have to edit the AviSynth script and change it manually to get the correct aspect ratio. See these threads for the formulas to use (the first thread is quite long but look at my last post):
http://forum.doom9.org/showthread.php?threadid=21190
http://forum.doom9.org/showthread.php?threadid=23863
This should help you - but if you would have done a search with "DivX aspect" in the VCD&SVCD forums you would have found them also - so please do this the next time or I'll have to give you a strike and I think we both don't like that. ;)
Hope this helps,
Gerti
Thanks. I will try it over the weekend.
paul8883
27th May 2002, 10:16
I just download dvd2svcd latest version, I would like to use it to convert my dv avi file to svcd, but don't know how to activate this option. It seems only accept ifo file from dvd :-(
ipf123
27th May 2002, 12:13
Go to Misc tab and select avi as input source.
DCK21
27th May 2002, 21:10
Hello gerti67,
I read the Official Q&A , and the threads refered to in this one.
I had problems understanding the origing of using 720 for the scaling.
I further google´d and found for example:
very clear study basis:
www.mir.com/DMG/aspect.html
of cours Jukka´s faq (old but interesting)
www.uwasa.fi/~f76998/video/svcd/faq
that points also to EBU
http://www.ebu.ch/pmc_r92-1999.pdf
If we center the speak in the PAL case,
[(702+54/59)(non-square 59:54 pix/line)] x 59 / 54 = 768
being
768 = number of square pixels per line.
and
768/576 = 4/3
So, it seems that we should use 702 and not 720. Well, as it is interesting to for efficiency, we could uso 704 as this is 16 x 44
Then, 704 would go into 480 , then at play time re-scaled to 702 visible samples (droping 1 to each side).
Contrarywise, if we should use 720 then go into 480, at play time we would drop 720-702=18, i.e. 9 samples to the left and 9 to the right, so, we store information in the mpeg that later would be discarded; what a same to lose bitrate that way.
So, anybody would enlight me?
(at least I hope you would appreciate I was trying to do my homework ...)
Thanks,
DCK21<-HAL
gerti67
28th May 2002, 16:00
Hello DCK21,
I really appreciated you homework, as I did read the sources you gave in your post myself some time ago. And I also got headaches reading them again and again. This stuff is always a good entry point for in depth discussions and contrary opinions on how to interpret the standards. ;)
And some time ago there was a long discussion on a German board where some of the ultimate technicians discussed this issue with shh (author of FitCD) as they discovered a resize bug in FitCD 1.03 and the monitor source aspect ratio 1:1 resize to SVCD/DVD destination format.
Here is the link (but it's in German):
http://www.dvd-svcd-forum.de/phorum/ikonboard.cgi?s=3cf37afc6ce2ffff;act=ST;f=12;t=640
and a link from within this thread:
http://www.dvdboard.de/forum/showthread.php?threadid=21834
And I must admit, that although I'm German I could not follow each point and again got headaches. But shh who is really deep into this stuff also discovered the bug and released the new FitCD 1.04 shortly afterwards to correct this issue (it's also mentioned in the readme).
My calculations were based on the fact that SVCD is based on the D1 resolutions which are 720x480 for NTSC and 720x576 for PAL. SVCD uses 480x480 for NTSC and 480x576 for PAL so it is 2/3 the DVD resolution. And you are right there's also the 704x576 (crobbed D1) resolution which should be used when dealing with VCD or half-D1 (352x576) material.
So I thought the DVD Player always resizes the SVCD format back to 720x576 including the overscan area which is not visible (therefore you can crop it also because it is not visible on the TV as described in Q64 of the Q&A). If the DVD Player would scale the SVCD source to 704x576 than additional cropping before would reveal black borders on the left and the right but this is not the fact, so it must scale back to 720x576. And therefore I used this format for padding the 1:1 monitor sources to 720x576 and then correct it with the apropriate pixel aspect ratio for NTSC and PAL.
And if you read the first link you gave carefully you will see that this must be right (I discovered the lines right now and I didn't see them when reading the article some time ago):
Similarly, a PAL SVCD contains on MPEG-2 video stream with 480x576 frames. The frames implicitly are scaled from a source containing 720x576 Rec.601 (59:54) pixels. This is equivalent to a source containing approximately 786.67x576 square pixels.So if you use this you can strip down the calculations to the following formula (based on the statement that 786.67x576 square pixels is equivalent to 720x576(480x576) pixels resolution. So you can pad your 1:1 monitor pixels that are also square to 786.67x576).
correct height = (786.67 / Pixels_X) x Pixels_Y
e.g. (786.67 / 640) x 272 = 334.33 -> so you see it is the same result as in my calculations before
And if you use FitCD 1.04 to check this it will give the same result (FitCD 1.03 gives a false result if the ITU box is unchecked. But it has to be unchecked because monitor pixels are real 1:1 square so the ITU standard does not apply).
So I really think it must be the right calculations.
Hope this helps,
Gerti
DCK21
28th May 2002, 19:15
Thanks gerti67,
but now I have another question,
should I have a properly aspect ratio image presented in a
square pixel device ... (i.e. a divx in a computer display) of
quote:
--------------------------------------------------------------------------------
a source containing approximately 786.67x576 square pixels.
--------------------------------------------------------------------------------
Then
786.67 / 576 is not 4:3
I do not know how to match both things.
Thanks again,
DCK21<-HAL
(probably a kohai looking for a sempai)
http://www.aibudo.com/Sem_Koh/Sem_Koh.html
gerti67
29th May 2002, 01:44
Hi DCK21,
hmm ... sorry, I don't get the point. What's the problem with it?
Why has it to be 4:3 all the time? The basic source we have to deal in DVD conversions is 720x576 (720x480) and this is not a 4:3 aspect ratio either.
You don't have to match both things. One thing is the DAR (Display Aspect Ratio) that describes the frame dimensions. And the other one is the SAR (Sample Aspect Ratio) of the smallest unit. And as a DivX uses a SAR of 1:1 it will be displayed properly on a device that uses a SAR of 1:1 (if the creation of the DivX was done properly). The fact that this is not the correct 4:3 DAR of a TV screen does not matter.
Usually only framegrabber and MPEG stills use a proper 4:3 source aspect ratio DV/DVD/SVCD don't. This is described in the first link you gave quite a few times. And they will show up slightly wrong on a 4:3 TV screen - but what's the point? If you will be really accurate you have to correct nearly all DVD sources then. But there's a catch in it - you don't know if the DVD producers already took this into consideration and if they did correct it or if they didn't care. And to sum up some discussions of some real DVD perfectionists it is a real mess.
So you never can't be sure on that either.
Whew, I think I'm getting headaches again, ;)
Gerti
DCK21
29th May 2002, 10:50
@Gerti,
sorry but I am alwasy getting messy with rescaling ;-) already at school time.
perhaps the following reasoning clarifies the issue:
lets think that we have a DivX sample, as per current Q&A Q62, of 640x272 pixels. Assume we speak only about PAL.
In the computer monitor, assuming pixels of 1millimiter squared, this would be 640mm wide x 272 mm height. Aspect ratio equal 2.35294. We suppose that there we see circles like perfect circles, squares as perfect squares.
Then, we resize (the active image area) to 480x334 pixels for the SVCD, as per the indicated formula [ 334= 720/640*272/54*59 or if it is clearer 334= 720*(272/640)*(59/54) ]
(letterboxing etc. to 480x576)
When the player shows this (the active image area), it changes this to
720x334 pixels (non-square pixels!)
Lets suppose that each TV pixel is 59/54 mm wide and 1 mm height. Then, the active image would be 786.66 mm wide x 334 m height, being the aspect ratio 786/334 = ... aprox 2.35294 Bingo! we have kept the visual aspect ratio (i.e., the displayed aspect ratio that should not be confused with the display area aspect ratio or the pixels themself aspect ratio).
Now, all fits and 720 is the correct number to be used for the scaling.
But, the question again is wheather we should target to 480 wide. As I understood that, this is expanded in the reproduction time to 720, but the TV can only show 702 (or less) samples. Should we not compensate this to save bitrate and then target the resizing to a width of 468 (=480x702/720) and add for vertical black bands up to 480 width? (would this save bitrate?)
thks,
DCK21<-HAL
gerti67
29th May 2002, 18:42
Hi DCK21,
You're absolutely right, if you want to save some bitrate it is not necessary to encode the TV overscan area which is usually not visible on most TV sets. So I mentioned it in one of my posts above: (therefore you can crop it also because it is not visible on the TV as described in Q64 of the Q&A)But you have to consider, that your source is now square pixels and therefore you have to crop 26 pixels from each side.
Again dealing with our 640x272 sample AVI the Avisynth script should look like this in the end:
...
Crop(26,0,588,272)
SimpleResize(448,334)
AddBorders(16,121,16,121)
...
Remember 16 pixels cropped in 480x576 resolution are 24 pixels in 720x576 (because 720/480 = 1.5) and 26.2 pixels in square pixel resolution 786x576 (because 786/480 = 1.6375 => 16 x 1.6375 = 26.2)
It is always possible to combine all the methods described in Q62-64 but I didn't made examples for all combinations as this would just confuse those who just learn this stuff step by step and it would inflate the Q&A too much.
Hope I covered your question,
Gerti
DCK21
29th May 2002, 19:13
Yes, thank you, I think I have it.
May I end proposing some good marks for you to moderators?
Well, seriosly, thanks again.
DCK21<-HAL
dvd2svcd
3rd June 2002, 09:39
http://www.uwasa.fi/~f76998/video/conversion/
pacohaas
3rd June 2002, 10:02
@dvd2svcd: does this mean that future versions will use the ITU-R BT.601 standard? currently I saw that the picture is resized to 480x360 (NTSC) when ITU-R BT.601 says it should be 480x352. I always edit the AVS file and increase my borders to match this, but it would be nice to support this standard.
DCK21
3rd June 2002, 10:15
@DVD2SVCD
Just thank you for this nice clear essential link ...
How could I miss this one from Jukka in my search :eek: ?
DCK21<-HAL
pacohaas
5th June 2002, 13:35
It would be great if DVD2SVCD had a checkbox, like GKnot for the ITU-R BT.601 standard resizing. Here's a very useful link (http://forum.doom9.org/showthread.php?s=&threadid=25842), with multiple links off it on the subject. In fact, currently GKnot calculations are a bit off, but I don't think it will affect SVCD resolutions much, if at all.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.