1From Gerhard Monzel AT sap.com
2Date: Mon, 21 Jan 2002 09:36:34 +0100
3
4While producing mpeg videos, you have to give special attention to the
5desired image size of your output video (this is a big difference to
6avi-encoding). Because mpegs, especially VCD and SVCD can be played in
7consumer players, there are some restrictions in "resizing" !
8Usually image sizes for VCDs are 352x240 (NTSC) or 352x288 (PAL), for
9SVCD 480x40 (NTSC) or 480x576 (PAL) -> some consumer players can play VCD
10sized videos as SVCDs too and vice versa.
11
12As a further difference to AVIs, the aspect ratio of the video is stored
13in header of the mpeg-videos. Therefore most players (pc and consumer
14players) will display the right image proportions no matter what X/Y dimensions
15your video is encoded.
16
17In your case of a 720x576 vob in 16:9 aspect ratio, you should use
18480x576 as destination image format (PAL) and (force) apsect ratio to 16:9.
19
20The resulting video will look like expected on PCs with e.g. mplayer,
21which will honore the aspect ratio, but many consumer players have problems
22switching to 16:9 format in VCD/SVCD mode -> in this case you need a resizer
23capable of generating black bars on top/bottom of your video.
24
25This can't be done with the trancode resizer, but with the internal mpeg-
26module resizer (I mean -y mpeg not -y mpeg2enc). You can also mix the resizer
27of transcode with the resizer of the mpeg-module too.
28
29On base of this knoweledge you will concluse, that following options
30should produce a "original" looking picture on a 4:3 aspect ratio:
31
32"-B 5 -y mpeg -F s,3 ..."
33
34"-B 5"   => 720x416 (formats image near to 16:9),
35
36"-F s,3" => 480x576 (formats image to SVCD size with black bars on top
37(80 pixels) and botton (80 pixels), so it will look well on 4:3 display.
38
39Because of using only high speed resizing options, the transcoding
40process will run in better speed than using zoom or other slow rescaling
41options. Unfortunately transcode itself can't handle black bars for output
42video (in AVI world there is no need of this feature and transcode begans as
43AVI transcoding tool). Of cause this described solution won't work
44with other export modules e.g. "mpeg2enc" (it lacks of internal black bar
45resizer).
46
47There is no suggestion to calculate filesize for mpegs with variable bitrate
48(usually used in SVCD mode), because filesize depends on kind of your
49source video (luminances, motion etc.) and the quality value (quant_value)
50you are using while encoding. Only the max. possible size is known by the
51max. bitrate restriction for SVCD and the count of frames.
52to avoid problems with oversized mpeg-files (won't fit on CD), the mpeg-
53encoder module can forced to split the encoded file in several parts.
54The size per part in MB is given by the "max_file_size"-Parameter used in
55conjunction with a user-profile
56(-> remember option -F s,3,<name of user-profile>, where this profile may
57look like:
58max_file_size = 700
59...
60
61The encoding speed in SVCD-mode varies in a wide range, because of the
62big influence of bitrate control method: the encoder calculates the actual
63bitrate for all frames of one GOP (group of pictures) and if the max.
64bitrate limit is exceeded, the whole GOP will be encoded again with a higher
65quantizer value until bitrate fit into limit. Bitrate (for SVCDS) depends
66mainly from "quant_value" (lower value / better quality -> higher
67bitrate). In conclusion higher quality leads often to lower speed, so it's
68your decision what is more worth for you :-)
69But there there are some tricks to reduce bitrate for mpeg-2 typed streams
70without loosing much quality:
71- use of parameter "qscale_type = 0" in your own user-profile (worth to try)
72- use image size 352x288 instead 480x576, but with smaller "quant_value"
73  (3-5) in your user-profile
74  (most consumer SVCD players have no problem to play such sized streams)
75maximum effect results in combination of both hints.
76
77To observe actual bitrate during encoding you should set transcode option
78"-q 2", so you can run short encoding turns to find out the best quant_value
79settings.
80
81To test the maximum encoding speed you should use option -F 1,3
82so you'll see how much the SVCD bitrate control will drop speed.
83
84Common problems:
85----------------
86Green artefacts may be caused from wrong resizing too, please try with
87options of the above description.
88
89Using "-V" option (needed to encode mpegs) will force import modules to
90use internal YUV-format instead of RGB.
91
92But there are several different YUV-Formats and for example some of it
93has swapped chroma (UV-) components.
94
95Weird color on encoded mpegs is not a bug, therefore you can use the "-k"
96option to "reswap" the croma components.
97
98
99_______________________________________________
100transcode-users mailing list
101transcode-users@theorie.physik.uni-goettingen.de
102http://www.theorie.physik.uni-goettingen.de/mailman/listinfo/transcode-users
103
104
105