comparison DOCS/documentation.html @ 6811:76595595dcb0

Reviewed Filter section, added limit parameter to cropdetect, not only SDL supports expand.
author diego
date Fri, 26 Jul 2002 03:24:24 +0000
parents f7cd3a7aaa13
children 91d6e1365427
comparison
equal deleted inserted replaced
6810:a4ed4e0464ba 6811:76595595dcb0
1062 <P><A NAME=2.6><B>2.6. Video filters</B></A></P> 1062 <P><A NAME=2.6><B>2.6. Video filters</B></A></P>
1063 1063
1064 1064
1065 <P><A NAME=2.6.1><B>2.6.1. Overview</B></A></P> 1065 <P><A NAME=2.6.1><B>2.6.1. Overview</B></A></P>
1066 1066
1067 <P>Both <B>MPlayer</B> and <B>MEncoder</B> supports using a universal 1067 <P>Both <B>MPlayer</B> and <B>MEncoder</B> support using a universal
1068 video filter layer, which comprises of numerous plugins - listed and 1068 video filter layer, which comprises numerous plugins that are listed and
1069 explained below. These plugins can perform various actions on the image, 1069 explained below. These plugins can perform various actions on the image,
1070 such as rescale, crop black borders (useful not only for encoding but for 1070 such as rescaling, cropping black borders (useful not only for encoding but
1071 playing too, since black borders increase bus usage, and cropping these 1071 for playback, too, since black borders increase bus usage and cropping these
1072 can boost playing speed on slow boards), expand image (for SVCDs).</P> 1072 can boost playback speed on slow boards) and expanding the image (for SVCDs).</P>
1073 1073
1074 <P>With this filter layer it's possible to perform fast image format conversion 1074 <P>With this filter layer it's possible to perform fast image format conversion
1075 between the various RGB and YUV when necessary. This enables for example 1075 between the various RGB and YUV formats when necessary. This enables for
1076 playing RGB data on <CODE>xv</CODE> and <CODE>xmga</CODE> outputs, amongst 1076 example playing RGB data on <CODE>xv</CODE> and <CODE>xmga</CODE> video output
1077 others. (see the <A HREF="#2.6.11">Scale</A> filter)</P> 1077 drivers among other things (see the <A HREF="#2.6.11">Scale</A> filter).</P>
1078 1078
1079 <P>The layer also does <B>Direct Rendering</B> between the plugins, to 1079 <P>The filter layer also does <B>Direct Rendering</B> between the plugins, to
1080 maximize the speed. 1080 maximize the speed.
1081 1081
1082 <P>Note that the postprocessing code is now also a part of the layer. It 1082 <P>Note that the postprocessing code is now also a part of the layer. It
1083 will be explained below.</P> 1083 will be explained below.</P>
1084 1084
1087 <P><CODE>&nbsp;&nbsp;mplayer/mencoder -vop filter1,filter2,filter3,...</CODE> 1087 <P><CODE>&nbsp;&nbsp;mplayer/mencoder -vop filter1,filter2,filter3,...</CODE>
1088 </P> 1088 </P>
1089 1089
1090 <P>This sets up a filter pipeline (you can use any number of filters). Their 1090 <P>This sets up a filter pipeline (you can use any number of filters). Their
1091 parameters are optional and if omitted, some of them are set to default 1091 parameters are optional and if omitted, some of them are set to default
1092 values, like <CODE>x</CODE> and <CODE>y</CODE> are both set to the center of 1092 values, e.g. <CODE>x</CODE> and <CODE>y</CODE> are both set to the center of
1093 the screen, and <CODE>width</CODE> and <CODE>height</CODE>> will be set to 1093 the screen and <CODE>width</CODE> and <CODE>height</CODE>> will be set to
1094 the movie's width and height.</P> 1094 the width and height of the movie.</P>
1095 1095
1096 <P>Filters are queued starting from libvo, so <CODE>filter1</CODE> will be the 1096 <P>Filters are queued starting from libvo, so <CODE>filter1</CODE> will be the
1097 last called filter (after that libvo comes, or when using <B>MEncoder</B>, 1097 last filter called (after that comes libvo, or when using <B>MEncoder</B>,
1098 encoding).</P> 1098 encoding).</P>
1099 1099
1100 <P>You can get the list of available video filters with the<BR> 1100 <P>You can get the list of available video filters with the command</P>
1101 "<CODE>mplayer -vop help</CODE>" command line.</P> 1101
1102 <P>&nbsp;&nbsp;<CODE>mplayer -vop help</CODE></P>
1102 1103
1103 1104
1104 <P><A NAME=2.6.3><B>2.6.3. Crop</B></A></P> 1105 <P><A NAME=2.6.3><B>2.6.3. Crop</B></A></P>
1105 1106
1106 <P><B><U>Description</U></B>:</P> 1107 <P><B><U>Description</U></B>:</P>
1107 1108
1108 <P>Crops the given part of the image, and discards the rest. Useful for 1109 <P>Crops the given part of the image and discards the rest. Useful for removing
1109 removing black bands of widescreen movies.</P> 1110 black bands from widescreen movies.</P>
1110 1111
1111 <P><B><U>Usage</U></B>:</P> 1112 <P><B><U>Usage</U></B>:</P>
1112 1113
1113 <P><CODE>&nbsp;&nbsp;-vop crop[=width:height:x:y]</CODE></P> 1114 <P><CODE>&nbsp;&nbsp;-vop crop[=width:height:x:y]</CODE></P>
1114 1115
1115 1116
1116 <P><A NAME=2.6.4><B>2.6.4. Expand</B></A></P> 1117 <P><A NAME=2.6.4><B>2.6.4. Expand</B></A></P>
1117 1118
1118 <P><B><U>Description</U></B>:</P> 1119 <P><B><U>Description</U></B>:</P>
1119 1120
1120 <P>Expands (NOT scales) movie resolution to the given value, and places the 1121 <P>Expands (<B>not</B> scales) movie resolution to the given value and places
1121 unscaled original to <CODE>x</CODE> <CODE>y</CODE>. For movies not containing 1122 the unscaled original at coordinates <CODE>x</CODE> <CODE>y</CODE>. For movies
1122 black bands, this can be used to add them. This is good when creating SVCDs, 1123 not containing black bands, this can be used to add them. This is good when
1123 or using with the 1124 creating SVCDs or for placing subtitles or the OSD in these bands.</P>
1124 <A HREF="video.html#2.3.1.4">SDL video output</A> which can place
1125 subtitles in these bands.</P>
1126 1125
1127 <P><B><U>Usage</U></B>:</P> 1126 <P><B><U>Usage</U></B>:</P>
1128 1127
1129 <P><CODE>&nbsp;&nbsp;-vop expand[=width:height:x:y]</CODE></P> 1128 <P><CODE>&nbsp;&nbsp;-vop expand[=width:height:x:y]</CODE></P>
1130 1129
1145 1144
1146 <P><A NAME=2.6.6><B>2.6.6. Flip</B></A></P> 1145 <P><A NAME=2.6.6><B>2.6.6. Flip</B></A></P>
1147 1146
1148 <P><B><U>Description</U></B>:</P> 1147 <P><B><U>Description</U></B>:</P>
1149 1148
1150 <P>Simply flips image. Useful for some old codecs which can output only 1149 <P>Simply flips the image upside down. Useful for some old codecs which can only
1151 flipped image (these are autodetected).</P> 1150 output a flipped image (these are autodetected).</P>
1152 1151
1153 <P><B><U>Usage</U></B>:</P> 1152 <P><B><U>Usage</U></B>:</P>
1154 1153
1155 <P><CODE>&nbsp;&nbsp;-vop flip</CODE></P> 1154 <P><CODE>&nbsp;&nbsp;-vop flip</CODE></P>
1156 1155
1157 1156
1158 <P><A NAME=2.6.7><B>2.6.7. Format</B></A></P> 1157 <P><A NAME=2.6.7><B>2.6.7. Format</B></A></P>
1159 1158
1160 <P><B><U>Description</U></B>:</P> 1159 <P><B><U>Description</U></B>:</P>
1161 1160
1162 <P>This filter is NOT image format converter. It just forces the next filter 1161 <P>This filter is <B>not</B> an image format converter. It just forces the next
1163 (or libvo) which image format to use. Useful for cards with slow YV12, like 1162 filter (or libvo) to use the given format. Useful for cards with slow YV12,
1164 tdfx and Savage4. For real conversion, use the <CODE>Scale</CODE> filter.</P> 1163 like tdfx and Savage4. For real conversion, use the scale filter.</P>
1165 1164
1166 <P><B><U>Usage</U></B>:</P> 1165 <P><B><U>Usage</U></B>:</P>
1167 1166
1168 <P><CODE>&nbsp;&nbsp;-vop format[=format]</CODE> (where 1167 <P><CODE>&nbsp;&nbsp;-vop format[=format]</CODE> (where
1169 <CODE>format</CODE> can be for example: rgb32, yuy2, etc...)</P> 1168 <CODE>format</CODE> can be for example: rgb32, yuy2, etc...)</P>
1186 1185
1187 <P><B><U>Description</U></B>:</P> 1186 <P><B><U>Description</U></B>:</P>
1188 1187
1189 <P>Performs RGB 24/32 <-> BGR 24/32 colorspace conversion (default behavior) 1188 <P>Performs RGB 24/32 <-> BGR 24/32 colorspace conversion (default behavior)
1190 or RGB 24/32 <-> RGB 24/32 conversion with R<->B swapping (with the 'swap' 1189 or RGB 24/32 <-> RGB 24/32 conversion with R<->B swapping (with the 'swap'
1191 option)</P> 1190 option).</P>
1192 1191
1193 <P><B><U>Usage</U></B>:</P> 1192 <P><B><U>Usage</U></B>:</P>
1194 1193
1195 <P><CODE>&nbsp;&nbsp;-vop rgb2bgr[=swap]</CODE></P> 1194 <P><CODE>&nbsp;&nbsp;-vop rgb2bgr[=swap]</CODE></P>
1196 1195
1197 1196
1198 <P><A NAME=2.6.10><B>2.6.10. Rotate</B></A></P> 1197 <P><A NAME=2.6.10><B>2.6.10. Rotate</B></A></P>
1199 1198
1200 <P><B><U>Description</U></B>:</P> 1199 <P><B><U>Description</U></B>:</P>
1201 1200
1202 <P>Rotates (flips) image. Parameter 'x' (values: 0-3) controls horizontal and 1201 <P>Rotates (flips) the image. The parameter <CODE>x</CODE> (values: 0-3)
1203 vertical mirroring.</P> 1202 controls horizontal and vertical mirroring.</P>
1204 1203
1205 <P><B><U>Usage</U></B>:</P> 1204 <P><B><U>Usage</U></B>:</P>
1206 1205
1207 <P><CODE>&nbsp;&nbsp;-vop rotate[=x]</CODE></P> 1206 <P><CODE>&nbsp;&nbsp;-vop rotate[=x]</CODE></P>
1208 1207
1213 1212
1214 <P>Scales the image with the software scaler (slow). You can adjust the 1213 <P>Scales the image with the software scaler (slow). You can adjust the
1215 quality of the scaler with the <CODE>-sws</CODE> option, see the man page. 1214 quality of the scaler with the <CODE>-sws</CODE> option, see the man page.
1216 Nice quality implies speed loss.</P> 1215 Nice quality implies speed loss.</P>
1217 1216
1218 <P><B>NOTE</B>: calling this filter with no options means <B>colorspace 1217 <P><B>Note:</B> Calling this filter with no options means <B>colorspace
1219 conversion</B>! This is useful for codecs which can't output in the needed 1218 conversion</B>! This is useful for codecs which can't output in the needed
1220 format for the specified video output device. These are hopefully 1219 format for the specified video output device. These are hopefully
1221 autodetected and scale filter is called to convert. In other cases, you 1220 autodetected and scale filter is called to convert. In other cases, you
1222 can use it manually.</P> 1221 can use it manually.</P>
1223 1222
1261 1260
1262 <P><A NAME=2.6.15><B>2.6.15. Cropdetect</B></A></P> 1261 <P><A NAME=2.6.15><B>2.6.15. Cropdetect</B></A></P>
1263 1262
1264 <P><B><U>Description</U></B>:</P> 1263 <P><B><U>Description</U></B>:</P>
1265 1264
1266 <P>Calculates needed cropping parameters. It will print the recommended -vop 1265 <P>Calculates necessary cropping parameters. It will print the recommended
1267 option to stdout.</P> 1266 <CODE>-vop crop</CODE> parameters to stdout. You can adjust the threshold of
1267 what is detected as border and what as picture with the <CODE>limit</CODE>
1268 parameter. <CODE>limit</CODE> is a number from 0 to 255 that defaults to 24.
1269 At 0 it detects everything as picture, at 255 everything as border.</P>
1268 1270
1269 <P><B><U>Usage</U></B>:</P> 1271 <P><B><U>Usage</U></B>:</P>
1270 1272
1271 <P><CODE>&nbsp;&nbsp;-vop cropdetect</CODE></P> 1273 <P><CODE>&nbsp;&nbsp;-vop cropdetect[=limit]</CODE></P>
1272 1274
1273 1275
1274 <P><B><A NAME=3>3. Usage</A></B></P> 1276 <P><B><A NAME=3>3. Usage</A></B></P>
1275 1277
1276 <P><B><A NAME=3.1>3.1. Command line</A></B></P> 1278 <P><B><A NAME=3.1>3.1. Command line</A></B></P>