Log in

View Full Version : AVI2SVCD (PAL) -- Clipping, border, frame selection problems


marco75
19th April 2005, 14:50
What I am trying to do:
=======================
Converting two AVIs into one SVCD (PAL)

Input files:
file length video resolution frames/s bitrate audio bitrate samples
1 21:33 XviD 512 x 384 23.976 760 kbps MP3 128 kbps 48kHz
2 21:35 XviD 512 x 384 23.976 731 kbps MP3 133 kbps 48kHz


At first, I tried appending the files using NanDub, (to make them into one AVI) but it complains the video streams differ.

So I use the AVI2SVCD bitrate sizing trick:
AVI2SVCD -> [CD Image] -> No Image
AVI2SVCD -> [Bitrate] -> Between 0 and 50 mins. Use 1 CD size 370
(That number confused me... it's not MB, but minutes x 10... why?)
This converts each file into a MPEG, which can then (theoretically) be burned to a SVCD using Nero 5.5, without the MPEG2 encoder plug-in.

Alas, there are clipping and border problems:
1) When I use [Frameserver] -> Avisynth setup -> Bilinear Resize, the
TMPGEnc Plus preview window shows the video is tall and skinny, with black borders on the left and right. Is that normal? Would the final output have black borders?

2) I append the following to my DVD2SVCD\avisynth.ini

[AVISYNTH_BilinearResize_nosideborders]
0=Import(!RoBaConditional.avs)
1=BilinearResize(^BorderLeft+^BorderRight+^TargetWidth,^TargetHeight)
2=AddBorders(0,^BorderTop,0,^BorderBottom)
!RoBaConditional.avs=C:\Programs\DVD2SVCD\Tylo\RoBaConditional.avs

[AVISYNTH_LanczosResize_nosideborders]
0=Import(!RoBaConditional.avs)
1=LanczosResize(^BorderLeft+^BorderRight+^TargetWidth,^TargetHeight)
2=AddBorders(0,^BorderTop,0,^BorderBottom)
!RoBaConditional.avs=C:\Programs\DVD2SVCD\Tylo\RoBaConditional.avs

[AVISYNTH_BicubicResize_nosideborders]
0=BicubicResize(^BorderLeft+^BorderRight+^TargetWidth,^TargetHeight,^b_value,^c_value)
2=AddBorders(0,^BorderTop,0,^BorderBottom)
^b_value=0.0
^c_value=0.6

I then select
[Frameserver] -> Avisynth setup -> BilinearResize_nosideborders

The encode goes fine until TMPGEnc coughs up the following error message:

The resolution of the video is illegal

> The windows size needs to be set between 8x8 and 4088x4088.
> The width and height of window needs to be multiple of 8.

3) Finally I tried appending this to DVD2SVCD\avisynth.ini:

[AVISYNTH_BilinearResize_to_PAL]
0=BilinearResize(480,576)

But then I get a video that's cropped by 1/16 of total height/width.
But only when you play the SVCD on a DVD player! When I play the same SVCD in PowerDVD, you see the full frame.

Doing an encode with this last method I get more bizarre effects:

i) The second episode (bbMPEG_Muxed_File00.mpg) has audio that is about twice the normal speed, while the video plays at the normal rate.

ii) The videos are cut off a few seconds early once they are burned to SVCD; The bbMPEG_Muxed_File00.mpg file plays for the full length.

Questions:
==========
First of all, how do I know if AVI2SVCD is producing PAL or NTSC output?
The interface is rather ambigious on this point.
I know, in [Conversion] tab, there's a [ ] NTSC to PAL tickbox, but I don't know what that's supposed to mean for AVI2SVCD. AVI are neither NTSC or PAL, so why isn't that tickbox grayed out?

What are the correct avisynth settings in the [Frameserver] tab?

The input aspect ratio is 512 x 384, which comes out to 4 : 3 exactly. So why does DVD2SVCD add black side borders if the output ratio is the same?

How do I prevent Nero truncating the episodes?

Finally, is the Nero 5.5 MPEG2 encoding plugin worth getting? It's only $15, but I'm wondering if it causes its own host of problems.
Are there any other AVI to SVCD converters people care to reccommend? DVD2SVCD is making me very confused and sucking up all my free time... and I kinda hit the wall with it, after some early successes.

Thanks to anyone taking time to answer my questions. I have kept all the encoding output, so let me know if you need additional information.

Venom_IL
19th April 2005, 18:05
* AVI files are usually in NTSC or PAL framerate, which determines the output format - 23.976 or 29.97 FPS AVI's produce NTSC unless NTSC to PAL is ticked and whereas 25 FPS AVI's produce PAL, unless you use a custom PAL to NTSC avisynth script (several of which you can find floating around the forum)

there are no 'correct' settings for the frameserver tab. please refer to doom9's DVD2SVCD guide. basically lanzcos > bicubic > bilinear > simple regarding potential quality, but the more potent a resizer is the more time consuming it is. I remember there was some eason one should use bilinear for SVCD's, i use lanzcos for DVD's anyhow. of course you should choose the resizer with the "nosideborders" suffix in the appropriate AVI2X cases (explanation in the sticky). the reason why you get sideborders if you don't use it, even though the movie has 4:3 resolution is, again, explained in the sticky.

no, the nero encode plugin is definitely NOT worth buying IMO.. you have freeware that does much better work. in fact, you don't even need nero for the authoring, you can use the free IFOEDIT, REJIG, DVDAUTHORGUI and others

there are tools similar to DVD2SVCD such as DIKO, The film machine and AVI2DVD but but my personal perference is D2S .. keep in mind that far less people would be able to help you around here if you use any of the mentioned programs.. if you make the right chioce ( ;) ), post your dvd2svcd_log.txt and AviSynth_Script_file.avs contents here so we could try to help you. also, try dragging AviSynth_Script_file.avs to media player and see how the movie plays (if at all)

Good luck

Nick
19th April 2005, 20:05
OK a few things spring to mind.

1) there is a slight problem with AVI resizing with this build. If you select 16:9, borders added - Encode as 4:3, it will work out. Basically any AVI with 1:1 PAR such as the ones you are converting, will resize correctly for 4:3 output using this setting. Use this instead of the trick instead of the avisynth.ini trick as some people are having problems with this.

2) With regards CD sizes, in fact the 800 or 370 or whatever IS im megabytes. SVCD uses a means of writing to CD which forgoes error correction data. This allows you to get 800MB on an 80min (ie normally 700MB) CD. So to get 2 files on one disk, use 400 for no menu or about 390 to leaves some room for a simple menu.

3) @ Venom_IL in fact, you don't even need nero for the authoring, you can use the free IFOEDIT, REJIG, DVDAUTHORGUI and others

Umm, we're talking SVCD here :D

Venom_IL
19th April 2005, 23:23
Originally posted by Nick
OK a few things spring to mind.
3) @ Venom_IL

Umm, we're talking SVCD here :D

bah ! damn those fixations, damn them to hell :(

of course, my obvious mistake doesn't change the fact with regards to S/VCD's.. just replace the programs i listed with VCDEasy Freeware version (pretty old but exists somewhere) and probably some other tools you could easily find floating around.. in any case D2S will do the authoring for you most of the time (using its free commandline tools)

marco75
20th April 2005, 02:19
Originally posted by Nick
1) there is a slight problem with AVI resizing with this build.
If you select 16:9, borders added - Encode as 4:3, it will work out. Basically any AVI with 1:1 PAR such as the ones you are converting, will resize correctly for 4:3 output using this setting.

You mean, in AVI2SVCD,
[Conversion] -> Aspect ratio out -> 16:9 (borders added, encoded as 4:3)
[x] NTSC to PAL

[Frameserver] -> Avisynth setup -> Bilinear Resize


Use this instead of the trick instead of the avisynth.ini trick as some people are having problems with this.

Yes, the avisynth.ini [resize_noborders] settings causes TMPEnc to complain about illegal video size (must be multiple of 8). Would be nice if TMPEnc used its own judgment and adjusted the window size down to be a multiple of 8 instead of stopping cold.

I still don't understand why BilinearResize(480,576) causes the window to be clipped on all 4 sides.

Thanks a lot for your reply. I look forward to AVI resizing getting fixed in a future release.

Nick
20th April 2005, 09:30
1) Yes, that's what I mean. However, do you need NTSC2PAL - most players will play NTSC SVCD's even in PAL regions.

2) WRT your resize script of ...resize(480,576) - this should work.
I suspect you have done this without the NTSC2PAL box checked. The difference between PAL and NTSC is primarily framerate, not resolution. However, SVCD specifications set different allowable resolutions for different framerates. Your AVI files are at an NTSC framerate of 23.976, so AVI2SVCD makes a NTSC SVCD at the same framerate. However, only (480x480) resolution is supported at that framerate. If you make an NTSC disc ar 480x576 it is outside the standard and so your player may make a mess of it.

Checking the NTSC2PAL box in AVI2SVCD not only makes the video 480x576, it also converts the framerate to 25fps(PAL). This conversion can cause problems, so if standard-compliant NTSC discs play on your player, it's possibly best avoided.