<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.videolan.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Morty</id>
	<title>VideoLAN Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.videolan.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Morty"/>
	<link rel="alternate" type="text/html" href="https://wiki.videolan.org/Special:Contributions/Morty/"/>
	<updated>2026-11-04T15:42:10Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Transcode&amp;diff=15788</id>
		<title>Transcode</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Transcode&amp;diff=15788"/>
		<updated>2010-03-27T09:09:57Z</updated>

		<summary type="html">&lt;p&gt;Morty: /* Example script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Transcoding is the process of taking a video file and changing it to a different format or bitrate.&lt;br /&gt;
&lt;br /&gt;
Transcoding in VLC copies the movie to a new file in a different format, so you end up with both  the original and new files. This means you need to have enough space on your hard drive to store this extra file. You should also have a reasonably fast computer, as transcoding can be very slow.&lt;br /&gt;
&lt;br /&gt;
In VLC, transcoding is exactly the same as [[streaming]] accross a network, except that the output is sent to a file instead of a network.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Transcoding with the Wizard ==&lt;br /&gt;
&lt;br /&gt;
VLC includes a transcoding and streaming wizard. To transcode a file, just select the transcode option. You will then be asked what format to convert to: you can give a video [[codec]], an audio codec and a [[container]] format. Only some container formats can support some codecs - look [http://www.videolan.org/streaming/features.html here] to see what supports what.&lt;br /&gt;
&lt;br /&gt;
{{doc|http://www.videolan.org/doc/streaming-howto/en/ch02.html}}&lt;br /&gt;
&lt;br /&gt;
== Transcoding with the Command Prompt ==&lt;br /&gt;
&lt;br /&gt;
The most flexible way to transcode with vlc is using a [[command prompt]] to start vlc. Transcoding works the same as [[streaming]]. For example, the following command changes an [[asf]] file to an [[MPEG-2]] file: &lt;br /&gt;
:vlc &amp;quot;C:\Movies\Your File.asf&amp;quot; :sout=&#039;#transcode{vcodec=mp2v,vb=4096,acodec=mp2a,ab=192,scale=1,channels=2,deinterlace,audio-sync}:std{access=file, mux=ps,dst=&amp;quot;C:\Movies\Your File Output.ps.mpg&amp;quot;}&#039;&lt;br /&gt;
The access=file instructs vlc to store the output in a file (and not stream it), and the dst is the location of the new (output) file.&lt;br /&gt;
&lt;br /&gt;
* Note 1: If you are running VLC on [[Mac OS X]], you should use clivlc instead of VLC to avoid possible Bus error problems.&lt;br /&gt;
* Note 2: old VLC releases, maybe up to 0.8.6* included, use &amp;quot;url&amp;quot; instead of &amp;quot;dst&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Transcoding takes quite a while, so it&#039;s advisable to use an option like &#039;&#039;&#039;--stop-time=30&#039;&#039;&#039; to only encode the first 30 seconds - this means you can check the file has transcoded correctly, and that the output is of a suitable quality. (Note: On [[Mac OS X]] this trick doesn&#039;t seem to work. Just press ctrl-c after a while, VLC will properly write out the already transcoded segment)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The transcode statement can contain &#039;&#039;&#039;vcodec&#039;&#039;&#039; and &#039;&#039;&#039;vb&#039;&#039;&#039; to change the video codec and &#039;&#039;&#039;acodec&#039;&#039;&#039; and &#039;&#039;&#039;ab&#039;&#039;&#039; to change the audio codec. If vcodec is missing, the video codec will stay the same (same for acodec).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Common additional options to use are &#039;&#039;&#039;audio-sync&#039;&#039;&#039; (to make sure the audio is in sync correctly) and &#039;&#039;&#039;deinterlace&#039;&#039;&#039; (to increase quality slightly on interlaced video).&lt;br /&gt;
===Under MS Windows===&lt;br /&gt;
the syntax on windows is slightly different:&lt;br /&gt;
&lt;br /&gt;
:C:\Program Files\VideoLAN\VLC&amp;gt;vlc -vvv &amp;quot;D:\688497.flv&amp;quot; --sout=#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128,deinterlace}:standard{access=file,mux=ts,dst=&amp;quot;D:\asd.mpg&amp;quot;}&lt;br /&gt;
(Note: old VLC releases, maybe up to 0.8.6* included, use &amp;quot;url&amp;quot; instead of &amp;quot;dst&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
(Note: due to command line parsing, at times, especially within single and double quote blocks, a backslash may have to be escaped by using a double backslash so that a filename would be D:\\path\\to\\file.mpg)&lt;br /&gt;
&lt;br /&gt;
===Completely non-interactive transcoding===&lt;br /&gt;
For completely non-interactive transcoding (such as the case necessary when running under [[Mac OS X]]), the above example could be rewritten as&lt;br /&gt;
:vlc -I dummy &amp;quot;C:\Movies\Your File.asf&amp;quot; :sout=&#039;#transcode{vcodec=mp2v,vb=4096,acodec=mp2a,ab=192,scale=1,channels=2,deinterlace,audio-sync}:std{access=file, mux=ps,dst=&amp;quot;C:\Movies\Your File Output.ps.mpg&amp;quot;}&#039; vlc://quit&lt;br /&gt;
The two extra options are&lt;br /&gt;
;-I dummy: Disables the graphical interface&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;vlc://quit&amp;lt;/nowiki&amp;gt;: Quit VLC after transcoding&lt;br /&gt;
If transcoding from a DVD, it is also necessary to use the dvdsimple:// notation instead of the dvd:// notation, in order to avoid interacting with the DVD menu system (which is quite impossible without the graphical interface).&lt;br /&gt;
&lt;br /&gt;
{{doc|http://www.videolan.org/doc/streaming-howto/en/ch03.html}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Canvas and Padding ==&lt;br /&gt;
&#039;&#039;&#039;The canvas and padding options changed since Version 0.9. Most examples in the wiki are broken.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;transcode{vcodec=mp2v,vfilter=canvas{width=640,height=480}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other options:&lt;br /&gt;
* aspect=4:3 : Aspect ratio&lt;br /&gt;
* padd: &lt;br /&gt;
** true: Pad with black bars &lt;br /&gt;
** false: crop video&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;transcode{vcodec=mp2v,vfilter=croppadd{cropttop=20,cropbottom=30,paddleft=100}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
crop or pad top, left, right or bottom in pixels.&lt;br /&gt;
&lt;br /&gt;
Avoid using width and hight parameters! These are apllied before the vfilter and might result in unwanted results.&lt;br /&gt;
&lt;br /&gt;
== Non-Interactive Batch Transcoding (Windows)==&lt;br /&gt;
To transcode several files without user interaction create a batch file in the folder where the files are contained and this line to the batch file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for %%a in (*.FILE_EXT) do cmd /c &amp;quot;PATH_TO_VLC&amp;quot; -I dummy -vvv %%a --sout=#transcode{vcodec=VIDEO_CODEC,vb=VIDEO_BITRATE,scale=1,acodec=AUDIO_CODEC,ab=AUDIO_BITRATE,channels=6}:standard{access=file,mux=MUXER,dst=%%a.OUTPUT_EXT} vlc://quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cmd /c makes the script wait to finish transcoding before starting the next transcode.&lt;br /&gt;
&lt;br /&gt;
An alternative method is to use VB Script. This example will transcode all files from one folder to another. It will also wait for each file to finish transcoding before starting the next. Create the script transcode.vbs, in the VLC installation folder, default &amp;quot;C:\Program Files\VideoLAN\VLC&amp;quot;. Change the strSource and strTarget in the example to match your requirements. Start a &amp;quot;DOS Box&amp;quot;, Start - Run - cmd then change to the VLC folder and run the script &amp;quot;cscript transcode.vbs&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
This example was tested on Microsoft Windows Script host 5.6 running on XP Pro SP2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;&lt;br /&gt;
&#039; based on code from:http://episteme.arstechnica.com/eve/forums/a/tpc/f/12009443/m/516001349831&lt;br /&gt;
&#039;&lt;br /&gt;
&#039;&lt;br /&gt;
&#039;&lt;br /&gt;
Dim objFSO, objShell, strSource, strTarget, strOldName, strNewName&lt;br /&gt;
&#039;&lt;br /&gt;
set objFSO = CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)&lt;br /&gt;
&#039;&lt;br /&gt;
&#039; Set up starting folders&lt;br /&gt;
&#039;&lt;br /&gt;
strSource = &amp;quot;O:\&amp;quot;&lt;br /&gt;
strTarget = &amp;quot;N:\&amp;quot;&lt;br /&gt;
&#039;&lt;br /&gt;
call RecurseDir(strSource, strTarget)&lt;br /&gt;
&#039;&lt;br /&gt;
&#039; // Recursively copy all files and folders&lt;br /&gt;
&#039;&lt;br /&gt;
Sub RecurseDir(strSource, strTarget)&lt;br /&gt;
	wscript.echo &amp;quot;source: &amp;quot; &amp;amp; strSource &amp;amp; &amp;quot; target: &amp;quot;&amp;amp; strTarget&lt;br /&gt;
&#039;&lt;br /&gt;
	Dim strTempSource, strTempTarget&lt;br /&gt;
&#039;&lt;br /&gt;
	Set strTempSource = objFSO.GetFolder(strSource)&lt;br /&gt;
&#039;&lt;br /&gt;
	Wscript.Echo &amp;quot;Begin Value: &amp;quot; &amp;amp; strTarget&lt;br /&gt;
&#039;    &lt;br /&gt;
	If Not objFSO.FolderExists(strTarget) Then&lt;br /&gt;
&#039;        Wscript.Echo &amp;quot;No Folder! Creating folder [&amp;quot; &amp;amp; strTarget &amp;amp; &amp;quot;]&amp;quot;&lt;br /&gt;
		objFSO.CreateFolder(strTarget)&lt;br /&gt;
	Else&lt;br /&gt;
		Wscript.Echo &amp;quot;Folder exists! &amp;quot; &amp;amp; strTempTarget&lt;br /&gt;
	End If&lt;br /&gt;
&#039;&lt;br /&gt;
	Set strTempTarget = objFSO.GetFolder(strTarget)&lt;br /&gt;
&#039; ** Copy files from current directory to target&lt;br /&gt;
	For each file in strTempSource.files&lt;br /&gt;
		strOldName = strSource &amp;amp; &amp;quot;\&amp;quot; &amp;amp; file.name&lt;br /&gt;
		strNewName = strTempTarget &amp;amp; &amp;quot;\&amp;quot; &amp;amp; Mid(file.name, 1, InstrRev(file.name, &amp;quot;.&amp;quot;)) &amp;amp; &amp;quot;ts&amp;quot;&lt;br /&gt;
&#039;&lt;br /&gt;
		If Not objFSO.FileExists(strNewName) Then&lt;br /&gt;
			Set objShell = CreateObject(&amp;quot;WScript.Shell&amp;quot;)&lt;br /&gt;
&#039;&lt;br /&gt;
			Wscript.Echo &amp;quot;Transcoding file: &amp;quot; &amp;amp; strOldName &amp;amp; &amp;quot; to &amp;quot; &amp;amp; strNewName&lt;br /&gt;
&#039;		&lt;br /&gt;
			Select Case Right(strOldName, 3) &lt;br /&gt;
				Case &amp;quot;avi&amp;quot; &lt;br /&gt;
					wscript.echo &amp;quot;vlc file://&amp;quot;&amp;quot;&amp;quot; &amp;amp; strOldName &amp;amp; &amp;quot;&amp;quot;&amp;quot; :sout=#duplicate{dst=std{access=file,mux=ts,dst=&amp;quot;&amp;quot;&amp;quot; &amp;amp; strNewName &amp;amp; &amp;quot;&amp;quot;&amp;quot;}} vlc://quit&amp;quot;&lt;br /&gt;
					objShell.Run &amp;quot;vlc file://&amp;quot;&amp;quot;&amp;quot; &amp;amp; strOldName &amp;amp; &amp;quot;&amp;quot;&amp;quot; :sout=#duplicate{dst=std{access=file,mux=ts,dst=&amp;quot;&amp;quot;&amp;quot; &amp;amp; strNewName &amp;amp; &amp;quot;&amp;quot;&amp;quot;}} vlc://quit&amp;quot;, 1, True&lt;br /&gt;
				Case &amp;quot;mp4&amp;quot;&lt;br /&gt;
					wscript.echo &amp;quot;vlc file://&amp;quot;&amp;quot;&amp;quot; &amp;amp; strOldName &amp;amp; &amp;quot;&amp;quot;&amp;quot; :sout=#transcode{vcodec=mp2v,vb=1024,scale=1,acodec=mp2a,ab=192,channels=2}:duplicate{dst=std{access=file,mux=ts,dst=&amp;quot;&amp;quot;&amp;quot; &amp;amp; strNewName &amp;amp; &amp;quot;&amp;quot;&amp;quot;}} vlc://quit&amp;quot;&lt;br /&gt;
					objShell.Run &amp;quot;vlc file://&amp;quot;&amp;quot;&amp;quot; &amp;amp; strOldName &amp;amp; &amp;quot;&amp;quot;&amp;quot; :sout=#transcode{vcodec=mp2v,vb=1024,scale=1,acodec=mp2a,ab=192,channels=2}:duplicate{dst=std{access=file,mux=ts,dst=&amp;quot;&amp;quot;&amp;quot; &amp;amp; strNewName &amp;amp; &amp;quot;&amp;quot;&amp;quot;}} vlc://quit&amp;quot;, 1, True&lt;br /&gt;
			End Select &lt;br /&gt;
&#039;&lt;br /&gt;
			Set objShell = Nothing&lt;br /&gt;
		End If&lt;br /&gt;
	Next&lt;br /&gt;
&#039; ** For each subfolder of current dir, copy files to target and recurse its subdirs&lt;br /&gt;
	For each subdir in strTempSource.subfolders&lt;br /&gt;
	  Wscript.Echo subdir.path&lt;br /&gt;
  	call RecurseDir(subdir.path, strTempTarget &amp;amp; &amp;quot;\&amp;quot; &amp;amp; subdir.name)&lt;br /&gt;
	Next&lt;br /&gt;
End Sub&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Non-Interactive Batch Transcoding (Linux)==&lt;br /&gt;
To transcode several files without user interaction create a bash script in the folder where the files are contained and add these lines to the bash script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
vcodec=&amp;quot;VIDEO_CODEC&amp;quot; &lt;br /&gt;
acodec=&amp;quot;AUDIO_CODEC&amp;quot; &lt;br /&gt;
bitrate=&amp;quot;VIDEO_BITRATE&amp;quot; &lt;br /&gt;
arate=&amp;quot;AUDIO_BITRATE&amp;quot; &lt;br /&gt;
ext=&amp;quot;OUTPUT_EXT&amp;quot; &lt;br /&gt;
mux=&amp;quot;MUXER&amp;quot; &lt;br /&gt;
vlc=&amp;quot;PATH_TO_VLC&amp;quot; &lt;br /&gt;
fmt=&amp;quot;INPUT_EXT&amp;quot; &lt;br /&gt;
&lt;br /&gt;
for a in *$fmt; do &lt;br /&gt;
$vlc -I dummy -vvv &amp;quot;$a&amp;quot; --sout &amp;quot;#transcode{vcodec=$vcodec,vb=$bitrate,acodec=$acodec,ab=$arate,channels=6}:standard{mux=$mux,dst=\&amp;quot;$a.$ext\&amp;quot;,access=file}&amp;quot;vlc://quit &lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Non-Interactive Merge/Transcode (Windows)===&lt;br /&gt;
&lt;br /&gt;
If you have more than one source files that need to be merged and transcoded resulting in a single out put file create a batch script with the following line in it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;PATH_TO_VLC&amp;quot; -vvv FILE1.EXT FILE2.EXT FILE3.EXT ETC.ETC --sout-keep --sout=#gather{} --sout=#transcode{vcodec=h264,vb=1024,scale=1,acodec=mp4a,ab=192,channels=6}:standard{access=file,mux=ts,dst=out.mpg} --sout-all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example script===&lt;br /&gt;
&#039;&#039;&#039;The canvas and cropping must be adjusted for VLC versions newer then 0.9.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As an example, here is a bash script that will take a &amp;lt;tt&amp;gt;.mpg&amp;lt;/tt&amp;gt; file as generated by an DVB capture device and transcode it into an MPEG4 file using the h.264 codec. Copy it to a file, for example &amp;lt;tt&amp;gt;dvb2mp4&amp;lt;/tt&amp;gt;, and make it executable. It should work on any operating system that has bash, including windows if [http://www.cygwin.com Cygwin] is installed. It uses the cropping parameters proposed at [[Wikipedia:Overscan_amounts]] adapted so that the dimensions are divisible by 16 for better encoding.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#&lt;br /&gt;
# Transcode DVB TV signals to h.264-encoded MP4 files using VLC&lt;br /&gt;
# Wout.Mertens@gmail.com&lt;br /&gt;
&lt;br /&gt;
#### Defaults, please edit for your settings ####&lt;br /&gt;
&lt;br /&gt;
# VLC location, here is the Mac OS X example&lt;br /&gt;
VLC=/Applications/VLC.app/Contents/MacOS/clivlc&lt;br /&gt;
# Other possibilities: (Remove the # to activate)&lt;br /&gt;
#VLC=/usr/bin/vlc&lt;br /&gt;
#VLC=/usr/local/bin/vlc&lt;br /&gt;
&lt;br /&gt;
# 16:9 or 4:3&lt;br /&gt;
aspect=16:9&lt;br /&gt;
&lt;br /&gt;
# PAL (Europe) or NTSC (US)&lt;br /&gt;
src=PAL&lt;br /&gt;
&lt;br /&gt;
# video bitrate&lt;br /&gt;
bitrate=1024&lt;br /&gt;
&lt;br /&gt;
# audio bitrate&lt;br /&gt;
arate=128&lt;br /&gt;
&lt;br /&gt;
# cropping?&lt;br /&gt;
crop=yes&lt;br /&gt;
&lt;br /&gt;
# Deinterlace?&lt;br /&gt;
deint=yes&lt;br /&gt;
&lt;br /&gt;
#### Program, do not change below this line ####&lt;br /&gt;
usage() {&lt;br /&gt;
	cat 1&amp;gt;&amp;amp;2 &amp;lt;&amp;lt;EOF&lt;br /&gt;
Usage: $0 [-swpncC] [-b &amp;lt;rate&amp;gt;] [-a &amp;lt;rate&amp;gt;] &amp;lt;DVB source .mpg&amp;gt; &amp;lt;MP4 output file&amp;gt;&lt;br /&gt;
	-s	4:3 aspect ratio (default=$aspect)&lt;br /&gt;
	-w	16:9 aspect ratio&lt;br /&gt;
	-p	PAL (720x576) input (default=$src)&lt;br /&gt;
	-n	NTSC (720x480) input&lt;br /&gt;
	-c	Crop borders (default=$crop)&lt;br /&gt;
	-C	Do not crop borders&lt;br /&gt;
	-d	Perform de-interlacing (default=$deint)&lt;br /&gt;
	-D	Do not perform de-interlacing&lt;br /&gt;
	-b	video bitrate kb/s (default=$bitrate)&lt;br /&gt;
	-a	audio bitrate kb/s (default=$arate)&lt;br /&gt;
EOF&lt;br /&gt;
	exit 1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
error() {&lt;br /&gt;
	echo &amp;quot;ERROR: $*&amp;quot; 1&amp;gt;&amp;amp;2&lt;br /&gt;
	exit 2&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
while getopts &#039;swpncCb:a:h&#039; opt; do&lt;br /&gt;
	case $opt in&lt;br /&gt;
		s) aspect=4:3 ;;&lt;br /&gt;
		w) aspect=16:9 ;;&lt;br /&gt;
		p) src=PAL ;;&lt;br /&gt;
		n) src=NTSC ;;&lt;br /&gt;
		c) crop=yes ;;&lt;br /&gt;
		C) crop=no ;;&lt;br /&gt;
		d) deint=yes ;;&lt;br /&gt;
		D) deint=no ;;&lt;br /&gt;
		b) bitrate=$OPTARG ;;&lt;br /&gt;
		a) arate=$OPTARG ;;&lt;br /&gt;
		h) usage ;;&lt;br /&gt;
		*) echo &amp;quot;Unknown option $opt&amp;quot; 1&amp;gt;&amp;amp;2; usage ;;&lt;br /&gt;
	esac&lt;br /&gt;
done&lt;br /&gt;
shift $(( $OPTIND - 1 ))&lt;br /&gt;
&lt;br /&gt;
[ $# -ne 2 ] &amp;amp;&amp;amp; usage&lt;br /&gt;
&lt;br /&gt;
infile=&amp;quot;$1&amp;quot;&lt;br /&gt;
outfile=&amp;quot;$2&amp;quot;&lt;br /&gt;
case $outfile in&lt;br /&gt;
	*.mp4|*.MP4) : ;;&lt;br /&gt;
	*) outfile=&amp;quot;$outfile.mp4&amp;quot; ;;&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
[ -r &amp;quot;$infile&amp;quot; ] || error &amp;quot;Can&#039;t read from $infile&amp;quot;&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$src,$aspect,$crop&amp;quot; in&lt;br /&gt;
	PAL,16:9,yes) sizestr=&amp;quot;cropleft=31,cropright=31,croptop=16,cropbottom=16,width=960,height=544&amp;quot; ;;&lt;br /&gt;
	PAL,4:3,yes)  sizestr=&amp;quot;cropleft=31,cropright=31,croptop=16,cropbottom=16,width=720,height=544&amp;quot; ;;&lt;br /&gt;
	NTSC,16:9,yes) sizestr=&amp;quot;cropleft=30,cropright=30,croptop=17,cropbottom=17,width=800,height=448&amp;quot; ;;&lt;br /&gt;
	NTSC,4:3,yes) sizestr=&amp;quot;cropleft=26,cropright=26,croptop=17,cropbottom=17,width=608,height=448&amp;quot; ;;&lt;br /&gt;
	PAL,16:9,no) sizestr=&amp;quot;width=1024,height=576&amp;quot; ;;&lt;br /&gt;
	PAL,4:3,no) sizestr=&amp;quot;width=768,height=576&amp;quot; ;;&lt;br /&gt;
	NTSC,16:9,no) sizestr=&amp;quot;width=800,height=448&amp;quot; ;;&lt;br /&gt;
	NTSC,4:3,no) sizestr=&amp;quot;width=608,height=448&amp;quot; ;;&lt;br /&gt;
	*) error &amp;quot;Could not handle $src,$aspect,$crop. This shouldn&#039;t happen!&amp;quot; ;;&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$deint&amp;quot; = &amp;quot;yes&amp;quot; ]; then&lt;br /&gt;
	deintstr=&amp;quot;,deinterlace=enable&amp;quot;&lt;br /&gt;
else&lt;br /&gt;
	deintstr=&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# Let&#039;s do it&lt;br /&gt;
echo &amp;quot;Input file: $infile&amp;quot;&lt;br /&gt;
echo &amp;quot;Output file: $outfile&amp;quot;&lt;br /&gt;
echo &amp;quot;Encoding at $bitrate+$arate kb/s, input $src, $aspect, cropping $crop, de-interlace $deint&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
echo &#039;&amp;gt;&amp;gt;&amp;gt;&#039; $VLC -I dummy &amp;quot;$infile&amp;quot; --sout &amp;quot;#transcode{$sizestr$deintstr,vcodec=h264,vb=$bitrate,acodec=mp4a,ab=$arate}:standard{mux=mp4,dst=\&amp;quot;$outfile\&amp;quot;,access=file}&amp;quot; vlc://quit&lt;br /&gt;
echo&lt;br /&gt;
$VLC -I dummy &amp;quot;$infile&amp;quot; --sout &amp;quot;#transcode{$sizestr$deintstr,vcodec=h264,vb=$bitrate,acodec=mp4a,ab=$arate}:standard{mux=mp4,dst=\&amp;quot;$outfile\&amp;quot;,access=file}&amp;quot; vlc://quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Insert non-formatted text here&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Morty</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Documentation:Modules&amp;diff=15787</id>
		<title>Documentation:Modules</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Documentation:Modules&amp;diff=15787"/>
		<updated>2010-03-27T09:07:17Z</updated>

		<summary type="html">&lt;p&gt;Morty: Bad  is better then no documentation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&lt;br /&gt;
This page lists most of the modules present in the official VLC source code. Understanding these pages might require that you know about VLC and its command line usage. It is recommended that you read the other [[Documentation:Documentation|documentation]] first.&lt;br /&gt;
&lt;br /&gt;
To list all the available modules in your VLC build, use:&lt;br /&gt;
 % &#039;&#039;&#039;vlc --list&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To list a module&#039;s configuration options, use:&lt;br /&gt;
 % &#039;&#039;&#039;vlc -p &amp;lt;modulename&amp;gt; --advanced --help-verbose&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Interfaces ==&lt;br /&gt;
&lt;br /&gt;
=== Graphical ===&lt;br /&gt;
&lt;br /&gt;
*[[Documentation:Modules/wxWidgets|wxWidgets]]&lt;br /&gt;
*[[Documentation:Modules/skins2|Skins2]]&lt;br /&gt;
*[[Documentation:Modules/Qt4|Qt4]]&lt;br /&gt;
*[[Documentation:Modules/macosx_gui|Mac OS X]]&lt;br /&gt;
*[[Documentation:Modules/beos_gui|BeOS]]&lt;br /&gt;
*[[Documentation:Modules/wince|Windows CE]]&lt;br /&gt;
&lt;br /&gt;
=== Text ===&lt;br /&gt;
&lt;br /&gt;
*[[Documentation:Modules/rc|remote control (rc)]]&lt;br /&gt;
*[[Documentation:Modules/telnet|telnet]]&lt;br /&gt;
*[[Documentation:Modules/ncurses|ncurses]]&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
*[[Documentation:Modules/http_intf|HTTP]]&lt;br /&gt;
*[[Documentation:Modules/hotkeys|Hotkeys]]&lt;br /&gt;
*[[Documentation:Modules/lirc|lirc]]&lt;br /&gt;
*[[Documentation:Modules/osc|osc]]&lt;br /&gt;
*[[Documentation:Modules/wiimote|Wiimote]]&lt;br /&gt;
&lt;br /&gt;
== Outputs ==&lt;br /&gt;
&lt;br /&gt;
=== Audio Output ===&lt;br /&gt;
&lt;br /&gt;
*[[Documentation:Modules/directx_aout|DirectX]]&lt;br /&gt;
*[[Documentation:Modules/waveout|waveout]]&lt;br /&gt;
*[[Documentation:Modules/portaudio|portaudio]]&lt;br /&gt;
*[[Documentation:Modules/sdl_aout|SDL]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[[Documentation:Modules/auhal|AUHAL]]&lt;br /&gt;
*[[Documentation:Modules/jack|jack]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[[Documentation:Modules/alsa|Alsa]]&lt;br /&gt;
*[[Documentation:Modules/oss|OSS]]&lt;br /&gt;
*[[Documentation:Modules/arts|aRts]]&lt;br /&gt;
*[[Documentation:Modules/esd|esound]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[[Documentation:Modules/file_aout|file]]&lt;br /&gt;
&lt;br /&gt;
=== Video Output ===&lt;br /&gt;
*[[Documentation:Modules/direct3d|Direct3D]]&lt;br /&gt;
*[[Documentation:Modules/directx_vout|DirectX]]&lt;br /&gt;
*[[Documentation:Modules/wingdi|Windows GDI]]&lt;br /&gt;
*[[Documentation:Modules/glwin32|OpenGL for windows]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[[Documentation:Modules/opengl|OpenGL]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[[Documentation:Modules/xvideo|XVideo]]&lt;br /&gt;
*[[Documentation:Modules/x11|X11]]&lt;br /&gt;
*[[Documentation:Modules/glx|OpenGL (GLX)]]&lt;br /&gt;
*[[Documentation:Modules/fb|Framebuffer]]&lt;br /&gt;
*[[Documentation:Modules/directfb|Direct framebuffer]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[[Documentation:Modules/sdl_vout|SDL]]&lt;br /&gt;
*[[Documentation:Modules/caca|Colored ASCII Art]]&lt;br /&gt;
*[[Documentation:Modules/aa|ASCII Art]]&lt;br /&gt;
*[[Documentation:Modules/image|Image]]&lt;br /&gt;
&lt;br /&gt;
=== Stream Output ===&lt;br /&gt;
&lt;br /&gt;
*[[Documentation:Modules/standard|Standard (std)]]&lt;br /&gt;
*[[Documentation:Modules/transcode|Transcode]]&lt;br /&gt;
*[[Documentation:Modules/duplicate|Duplicate]]&lt;br /&gt;
*[[Documentation:Modules/rtp|RTP]]&lt;br /&gt;
*[[Documentation:Modules/es|Elementary Stream (es)]]&lt;br /&gt;
*[[Documentation:Modules/display|Display]]&lt;br /&gt;
*[[Documentation:Modules/dummy_sout|Dummy]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[[Documentation:Modules/bridge-out|Bridge Out]]&lt;br /&gt;
*[[Documentation:Modules/bridge-in|Bridge In]]&lt;br /&gt;
*[[Documentation:Modules/mosaic-bridge|Mosaic Bridge]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[[Documentation:Modules/autodel|Autodel]]&lt;br /&gt;
*[[Documentation:Modules/gather|Gather]]&lt;br /&gt;
*[[Documentation:Modules/description|Description]]&lt;br /&gt;
*[[Documentation:Modules/switcher|Switcher]]&lt;br /&gt;
*[[Documentation:Modules/transrate|Transrate]]&lt;br /&gt;
&lt;br /&gt;
== Filters ==&lt;br /&gt;
&lt;br /&gt;
=== Audio Filters ===&lt;br /&gt;
&lt;br /&gt;
=== Video Filters ===&lt;br /&gt;
&lt;br /&gt;
*[[Documentation:Modules/adjust|Adjust]]&lt;br /&gt;
*[[Documentation:Modules/gradient|Gradient]]&lt;br /&gt;
*[[Documentation:Modules/invert|Invert]]&lt;br /&gt;
*[[Documentation:Modules/wave|Wave]]&lt;br /&gt;
*[[Documentation:Modules/ripple|Ripple]]&lt;br /&gt;
*[[Documentation:Modules/motionblur|Motion Blur]]&lt;br /&gt;
*[[Documentation:Modules/psychedelic|Psychedelic]]&lt;br /&gt;
*[[Documentation:Modules/noise|Noise]]&lt;br /&gt;
*[[Documentation:Modules/colorthres|Color Threshold]]&lt;br /&gt;
*[[Documentation:Modules/rotate|Rotate]]&lt;br /&gt;
*[[Documentation:Modules/extract|Extract]]&lt;br /&gt;
*[[Documentation:Modules/erase|Logo Erase]]&lt;br /&gt;
*[[Documentation:Modules/gaussianblur|Gaussian Blur]]&lt;br /&gt;
*[[Documentation:Modules/sharpen|Sharpen]]&lt;br /&gt;
*[[Documentation:Modules/atmo|AtmoLight]]&lt;br /&gt;
&lt;br /&gt;
The following video filters are for use in transcode only:&lt;br /&gt;
*[[Transcode#Canvas_and_Padding|Crop Padd]]&lt;br /&gt;
*[[Transcode#Canvas_and_Padding|Canvas]]&lt;br /&gt;
&lt;br /&gt;
The following video filters are for use in the mosaic framework only:&lt;br /&gt;
*[[Documentation:Modules/bluescreen|Blue Screen]]&lt;br /&gt;
*[[Documentation:Modules/alphamask|Alpha mask]]&lt;br /&gt;
&lt;br /&gt;
=== Video Sub-Filters ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[[Documentation:Modules/marq|Marq]]&lt;br /&gt;
*[[Documentation:Modules/rss|RSS]]&lt;br /&gt;
*[[Documentation:Modules/logo|Logo]]&lt;br /&gt;
*[[Documentation:Modules/mosaic|Mosaic]]&lt;br /&gt;
*[[Documentation:Modules/time|Time]] (up to 0.8.6)&lt;br /&gt;
&lt;br /&gt;
=== Video Output Filters ===&lt;br /&gt;
&lt;br /&gt;
*[[Documentation:Modules/deinterlace|Deinterlace]]&lt;br /&gt;
*[[Documentation:Modules/transform|Transform]]&lt;br /&gt;
*[[Documentation:Modules/wall|Wall]]&lt;br /&gt;
*[[Documentation:Modules/crop|Crop]]&lt;br /&gt;
*[[Documentation:Modules/panoramix|Panoramix]]&lt;br /&gt;
*[[Documentation:Modules/clone|Clone]]&lt;br /&gt;
*[[Documentation:Modules/logo|Logo]]&lt;br /&gt;
*[[Documentation:Modules/magnify|Magnify]]&lt;br /&gt;
*[[Documentation:Modules/puzzle|Puzzle]]&lt;br /&gt;
*[[Documentation:Modules/distort|Distort]] (up to 0.8.6)&lt;br /&gt;
&lt;br /&gt;
=== Visualizations ===&lt;br /&gt;
&lt;br /&gt;
*[[Documentation:Modules/visualizer|Visualizer]]&lt;br /&gt;
*[[Documentation:Modules/goom|Goom]]&lt;br /&gt;
*[[Documentation:Modules/galaktos|Galaktos]]&lt;br /&gt;
&lt;br /&gt;
=== Access Filters ===&lt;br /&gt;
*[[Documentation:Modules/timeshift|Timeshift]]&lt;br /&gt;
*[[Documentation:Modules/record|Record]]&lt;br /&gt;
*[[Documentation:Modules/dump|Dump]]&lt;br /&gt;
*[[Documentation:Modules/bandwidth|Bandwidth]]&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
=== Accesses ===&lt;br /&gt;
*[[Documentation:Modules/file|File Input]] - for reading local files&lt;br /&gt;
*[[Documentation:Modules/directory|Directory]]&lt;br /&gt;
*[[Documentation:Modules/dvdnav|DVDnav Input]]&lt;br /&gt;
*[[Documentation:Modules/dvdread|DVDRead Input]] - DVD without menu support&lt;br /&gt;
*[[Documentation:Modules/vcd|VCD]]&lt;br /&gt;
*[[Documentation:Modules/http|HTTP Input]]&lt;br /&gt;
*[[Documentation:Modules/ftp|FTP Input]]&lt;br /&gt;
*[[Documentation:Modules/udp|UDP/RTP Input]]&lt;br /&gt;
*[[Documentation:Modules/rtsp|RTSP]] - &lt;br /&gt;
*[[Documentation:Modules/rtmp|RTMP]] - Real Time Media Player&lt;br /&gt;
*[[Documentation:Modules/mms|MMS]] - reading from the MicroSoft Media Server&lt;br /&gt;
*[[Documentation:Modules/screen|Screen Input]] - grabbing the currently active screen&lt;br /&gt;
*[[Documentation:Modules/fake|Fake]] - presents a static image as a video stream&lt;br /&gt;
*[[Documentation:Modules/rawvid|Raw Video]] - streams of bitmap images&lt;br /&gt;
*[[Documentation:Modules/mkv|Matroska stream]]&lt;br /&gt;
*[[Documentation:Modules/h264|H.264 Video]]&lt;br /&gt;
*[[Documentation:Modules/pvr|IVTV MPEG Encoding Card Input]]&lt;br /&gt;
&lt;br /&gt;
Linux specific:&lt;br /&gt;
*[[Documentation:Modules/dv|DV]]&lt;br /&gt;
*[[Documentation:Modules/dvb|DVB Input]]&lt;br /&gt;
*[[Documentation:Modules/pvr|PVR]]&lt;br /&gt;
*[[Documentation:Modules/v4l|Video4Linux (v4l)]]&lt;br /&gt;
*[[Documentation:Modules/v4l2|Video4Linux2 (v4l2)]]&lt;br /&gt;
*[[Dc1394|Dc 1394]] FIXME: shouldn&#039;t link outside of Documentation:Modules/&lt;br /&gt;
Windows specific:&lt;br /&gt;
*[[Documentation:Modules/bda|BDA]]&lt;br /&gt;
*[[Documentation:Modules/dshow|DirectShow]]&lt;br /&gt;
Mac OS X specific:&lt;br /&gt;
*[[Documentation:Modules/eyetv|EyeTV]] - reads DVB streams from the proprietary EyeTV.app; requires a plugin&lt;br /&gt;
*[[Documentation:Modules/qtkit|QTKit]] - reads uncompressed video from internal iSights&lt;br /&gt;
&lt;br /&gt;
=== Access Outputs ===&lt;br /&gt;
&lt;br /&gt;
=== Codecs ===&lt;br /&gt;
&lt;br /&gt;
==== Audio ====&lt;br /&gt;
==== Video ====&lt;br /&gt;
==== Subtitles ====&lt;br /&gt;
&lt;br /&gt;
=== Demuxers ===&lt;br /&gt;
==== Playlist ====&lt;br /&gt;
*[[Documentation:Modules/m3u-open|m3u]]&lt;br /&gt;
*[[Documentation:Modules/pls-open|pls]]&lt;br /&gt;
*[[Documentation:Modules/b4s-open|b4s]]&lt;br /&gt;
*[[Documentation:Modules/dvb-open|dvb]]&lt;br /&gt;
*[[Documentation:Modules/podcast|podcast]]&lt;br /&gt;
*[[Documentation:Modules/xspf-open|XSPF]]&lt;br /&gt;
*[[Documentation:Modules/shout-winamp|Winamp Shoutcast]]&lt;br /&gt;
*[[Documentation:Modules/asx-open|ASX]]&lt;br /&gt;
*[[Documentation:Modules/sgimb|sgimb]]&lt;br /&gt;
*[[Documentation:Modules/qtl|QTL]]&lt;br /&gt;
*[[Documentation:Modules/gvi|gvi]]&lt;br /&gt;
&lt;br /&gt;
=== Muxers ===&lt;br /&gt;
&lt;br /&gt;
=== Service Discovery ===&lt;br /&gt;
&lt;br /&gt;
*[[Documentation:Modules/sap|SAP]]&lt;br /&gt;
*[[Documentation:Modules/shout|Shoutcast]]&lt;br /&gt;
*[[Documentation:Modules/podcast_sd|Podcast]]&lt;br /&gt;
*[[Documentation:Modules/hal|HAL]]&lt;br /&gt;
*[[Documentation:Modules/daap|DAAP]]&lt;br /&gt;
*[[Documentation:Modules/bonjour|Bonjour]]&lt;br /&gt;
*[[Documentation:Modules/upnp_intel|UPnP (intel)]]&lt;br /&gt;
*[[Documentation:Modules/upnp_cc|UPnP (cyberlink)]]&lt;br /&gt;
&lt;br /&gt;
=== Misc ===&lt;br /&gt;
*[[Documentation:Modules/netsync|netsync]]&lt;br /&gt;
*[[Documentation:Modules/motion_control|motion control]]&lt;br /&gt;
&lt;br /&gt;
{{Documentation}}&lt;/div&gt;</summary>
		<author><name>Morty</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Transcode&amp;diff=15786</id>
		<title>Transcode</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Transcode&amp;diff=15786"/>
		<updated>2010-03-27T09:04:22Z</updated>

		<summary type="html">&lt;p&gt;Morty: Added Canvas and Padding&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Transcoding is the process of taking a video file and changing it to a different format or bitrate.&lt;br /&gt;
&lt;br /&gt;
Transcoding in VLC copies the movie to a new file in a different format, so you end up with both  the original and new files. This means you need to have enough space on your hard drive to store this extra file. You should also have a reasonably fast computer, as transcoding can be very slow.&lt;br /&gt;
&lt;br /&gt;
In VLC, transcoding is exactly the same as [[streaming]] accross a network, except that the output is sent to a file instead of a network.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Transcoding with the Wizard ==&lt;br /&gt;
&lt;br /&gt;
VLC includes a transcoding and streaming wizard. To transcode a file, just select the transcode option. You will then be asked what format to convert to: you can give a video [[codec]], an audio codec and a [[container]] format. Only some container formats can support some codecs - look [http://www.videolan.org/streaming/features.html here] to see what supports what.&lt;br /&gt;
&lt;br /&gt;
{{doc|http://www.videolan.org/doc/streaming-howto/en/ch02.html}}&lt;br /&gt;
&lt;br /&gt;
== Transcoding with the Command Prompt ==&lt;br /&gt;
&lt;br /&gt;
The most flexible way to transcode with vlc is using a [[command prompt]] to start vlc. Transcoding works the same as [[streaming]]. For example, the following command changes an [[asf]] file to an [[MPEG-2]] file: &lt;br /&gt;
:vlc &amp;quot;C:\Movies\Your File.asf&amp;quot; :sout=&#039;#transcode{vcodec=mp2v,vb=4096,acodec=mp2a,ab=192,scale=1,channels=2,deinterlace,audio-sync}:std{access=file, mux=ps,dst=&amp;quot;C:\Movies\Your File Output.ps.mpg&amp;quot;}&#039;&lt;br /&gt;
The access=file instructs vlc to store the output in a file (and not stream it), and the dst is the location of the new (output) file.&lt;br /&gt;
&lt;br /&gt;
* Note 1: If you are running VLC on [[Mac OS X]], you should use clivlc instead of VLC to avoid possible Bus error problems.&lt;br /&gt;
* Note 2: old VLC releases, maybe up to 0.8.6* included, use &amp;quot;url&amp;quot; instead of &amp;quot;dst&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Transcoding takes quite a while, so it&#039;s advisable to use an option like &#039;&#039;&#039;--stop-time=30&#039;&#039;&#039; to only encode the first 30 seconds - this means you can check the file has transcoded correctly, and that the output is of a suitable quality. (Note: On [[Mac OS X]] this trick doesn&#039;t seem to work. Just press ctrl-c after a while, VLC will properly write out the already transcoded segment)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The transcode statement can contain &#039;&#039;&#039;vcodec&#039;&#039;&#039; and &#039;&#039;&#039;vb&#039;&#039;&#039; to change the video codec and &#039;&#039;&#039;acodec&#039;&#039;&#039; and &#039;&#039;&#039;ab&#039;&#039;&#039; to change the audio codec. If vcodec is missing, the video codec will stay the same (same for acodec).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Common additional options to use are &#039;&#039;&#039;audio-sync&#039;&#039;&#039; (to make sure the audio is in sync correctly) and &#039;&#039;&#039;deinterlace&#039;&#039;&#039; (to increase quality slightly on interlaced video).&lt;br /&gt;
===Under MS Windows===&lt;br /&gt;
the syntax on windows is slightly different:&lt;br /&gt;
&lt;br /&gt;
:C:\Program Files\VideoLAN\VLC&amp;gt;vlc -vvv &amp;quot;D:\688497.flv&amp;quot; --sout=#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128,deinterlace}:standard{access=file,mux=ts,dst=&amp;quot;D:\asd.mpg&amp;quot;}&lt;br /&gt;
(Note: old VLC releases, maybe up to 0.8.6* included, use &amp;quot;url&amp;quot; instead of &amp;quot;dst&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
(Note: due to command line parsing, at times, especially within single and double quote blocks, a backslash may have to be escaped by using a double backslash so that a filename would be D:\\path\\to\\file.mpg)&lt;br /&gt;
&lt;br /&gt;
===Completely non-interactive transcoding===&lt;br /&gt;
For completely non-interactive transcoding (such as the case necessary when running under [[Mac OS X]]), the above example could be rewritten as&lt;br /&gt;
:vlc -I dummy &amp;quot;C:\Movies\Your File.asf&amp;quot; :sout=&#039;#transcode{vcodec=mp2v,vb=4096,acodec=mp2a,ab=192,scale=1,channels=2,deinterlace,audio-sync}:std{access=file, mux=ps,dst=&amp;quot;C:\Movies\Your File Output.ps.mpg&amp;quot;}&#039; vlc://quit&lt;br /&gt;
The two extra options are&lt;br /&gt;
;-I dummy: Disables the graphical interface&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;vlc://quit&amp;lt;/nowiki&amp;gt;: Quit VLC after transcoding&lt;br /&gt;
If transcoding from a DVD, it is also necessary to use the dvdsimple:// notation instead of the dvd:// notation, in order to avoid interacting with the DVD menu system (which is quite impossible without the graphical interface).&lt;br /&gt;
&lt;br /&gt;
{{doc|http://www.videolan.org/doc/streaming-howto/en/ch03.html}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Canvas and Padding ==&lt;br /&gt;
&#039;&#039;&#039;The canvas and padding options changed since Version 0.9. Most examples in the wiki are broken.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;transcode{vcodec=mp2v,vfilter=canvas{width=640,height=480}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other options:&lt;br /&gt;
* aspect=4:3 : Aspect ratio&lt;br /&gt;
* padd: &lt;br /&gt;
** true: Pad with black bars &lt;br /&gt;
** false: crop video&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;transcode{vcodec=mp2v,vfilter=croppadd{cropttop=20,cropbottom=30,paddleft=100}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
crop or pad top, left, right or bottom in pixels.&lt;br /&gt;
&lt;br /&gt;
Avoid using width and hight parameters! These are apllied before the vfilter and might result in unwanted results.&lt;br /&gt;
&lt;br /&gt;
== Non-Interactive Batch Transcoding (Windows)==&lt;br /&gt;
To transcode several files without user interaction create a batch file in the folder where the files are contained and this line to the batch file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for %%a in (*.FILE_EXT) do cmd /c &amp;quot;PATH_TO_VLC&amp;quot; -I dummy -vvv %%a --sout=#transcode{vcodec=VIDEO_CODEC,vb=VIDEO_BITRATE,scale=1,acodec=AUDIO_CODEC,ab=AUDIO_BITRATE,channels=6}:standard{access=file,mux=MUXER,dst=%%a.OUTPUT_EXT} vlc://quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cmd /c makes the script wait to finish transcoding before starting the next transcode.&lt;br /&gt;
&lt;br /&gt;
An alternative method is to use VB Script. This example will transcode all files from one folder to another. It will also wait for each file to finish transcoding before starting the next. Create the script transcode.vbs, in the VLC installation folder, default &amp;quot;C:\Program Files\VideoLAN\VLC&amp;quot;. Change the strSource and strTarget in the example to match your requirements. Start a &amp;quot;DOS Box&amp;quot;, Start - Run - cmd then change to the VLC folder and run the script &amp;quot;cscript transcode.vbs&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
This example was tested on Microsoft Windows Script host 5.6 running on XP Pro SP2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;&lt;br /&gt;
&#039; based on code from:http://episteme.arstechnica.com/eve/forums/a/tpc/f/12009443/m/516001349831&lt;br /&gt;
&#039;&lt;br /&gt;
&#039;&lt;br /&gt;
&#039;&lt;br /&gt;
Dim objFSO, objShell, strSource, strTarget, strOldName, strNewName&lt;br /&gt;
&#039;&lt;br /&gt;
set objFSO = CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)&lt;br /&gt;
&#039;&lt;br /&gt;
&#039; Set up starting folders&lt;br /&gt;
&#039;&lt;br /&gt;
strSource = &amp;quot;O:\&amp;quot;&lt;br /&gt;
strTarget = &amp;quot;N:\&amp;quot;&lt;br /&gt;
&#039;&lt;br /&gt;
call RecurseDir(strSource, strTarget)&lt;br /&gt;
&#039;&lt;br /&gt;
&#039; // Recursively copy all files and folders&lt;br /&gt;
&#039;&lt;br /&gt;
Sub RecurseDir(strSource, strTarget)&lt;br /&gt;
	wscript.echo &amp;quot;source: &amp;quot; &amp;amp; strSource &amp;amp; &amp;quot; target: &amp;quot;&amp;amp; strTarget&lt;br /&gt;
&#039;&lt;br /&gt;
	Dim strTempSource, strTempTarget&lt;br /&gt;
&#039;&lt;br /&gt;
	Set strTempSource = objFSO.GetFolder(strSource)&lt;br /&gt;
&#039;&lt;br /&gt;
	Wscript.Echo &amp;quot;Begin Value: &amp;quot; &amp;amp; strTarget&lt;br /&gt;
&#039;    &lt;br /&gt;
	If Not objFSO.FolderExists(strTarget) Then&lt;br /&gt;
&#039;        Wscript.Echo &amp;quot;No Folder! Creating folder [&amp;quot; &amp;amp; strTarget &amp;amp; &amp;quot;]&amp;quot;&lt;br /&gt;
		objFSO.CreateFolder(strTarget)&lt;br /&gt;
	Else&lt;br /&gt;
		Wscript.Echo &amp;quot;Folder exists! &amp;quot; &amp;amp; strTempTarget&lt;br /&gt;
	End If&lt;br /&gt;
&#039;&lt;br /&gt;
	Set strTempTarget = objFSO.GetFolder(strTarget)&lt;br /&gt;
&#039; ** Copy files from current directory to target&lt;br /&gt;
	For each file in strTempSource.files&lt;br /&gt;
		strOldName = strSource &amp;amp; &amp;quot;\&amp;quot; &amp;amp; file.name&lt;br /&gt;
		strNewName = strTempTarget &amp;amp; &amp;quot;\&amp;quot; &amp;amp; Mid(file.name, 1, InstrRev(file.name, &amp;quot;.&amp;quot;)) &amp;amp; &amp;quot;ts&amp;quot;&lt;br /&gt;
&#039;&lt;br /&gt;
		If Not objFSO.FileExists(strNewName) Then&lt;br /&gt;
			Set objShell = CreateObject(&amp;quot;WScript.Shell&amp;quot;)&lt;br /&gt;
&#039;&lt;br /&gt;
			Wscript.Echo &amp;quot;Transcoding file: &amp;quot; &amp;amp; strOldName &amp;amp; &amp;quot; to &amp;quot; &amp;amp; strNewName&lt;br /&gt;
&#039;		&lt;br /&gt;
			Select Case Right(strOldName, 3) &lt;br /&gt;
				Case &amp;quot;avi&amp;quot; &lt;br /&gt;
					wscript.echo &amp;quot;vlc file://&amp;quot;&amp;quot;&amp;quot; &amp;amp; strOldName &amp;amp; &amp;quot;&amp;quot;&amp;quot; :sout=#duplicate{dst=std{access=file,mux=ts,dst=&amp;quot;&amp;quot;&amp;quot; &amp;amp; strNewName &amp;amp; &amp;quot;&amp;quot;&amp;quot;}} vlc://quit&amp;quot;&lt;br /&gt;
					objShell.Run &amp;quot;vlc file://&amp;quot;&amp;quot;&amp;quot; &amp;amp; strOldName &amp;amp; &amp;quot;&amp;quot;&amp;quot; :sout=#duplicate{dst=std{access=file,mux=ts,dst=&amp;quot;&amp;quot;&amp;quot; &amp;amp; strNewName &amp;amp; &amp;quot;&amp;quot;&amp;quot;}} vlc://quit&amp;quot;, 1, True&lt;br /&gt;
				Case &amp;quot;mp4&amp;quot;&lt;br /&gt;
					wscript.echo &amp;quot;vlc file://&amp;quot;&amp;quot;&amp;quot; &amp;amp; strOldName &amp;amp; &amp;quot;&amp;quot;&amp;quot; :sout=#transcode{vcodec=mp2v,vb=1024,scale=1,acodec=mp2a,ab=192,channels=2}:duplicate{dst=std{access=file,mux=ts,dst=&amp;quot;&amp;quot;&amp;quot; &amp;amp; strNewName &amp;amp; &amp;quot;&amp;quot;&amp;quot;}} vlc://quit&amp;quot;&lt;br /&gt;
					objShell.Run &amp;quot;vlc file://&amp;quot;&amp;quot;&amp;quot; &amp;amp; strOldName &amp;amp; &amp;quot;&amp;quot;&amp;quot; :sout=#transcode{vcodec=mp2v,vb=1024,scale=1,acodec=mp2a,ab=192,channels=2}:duplicate{dst=std{access=file,mux=ts,dst=&amp;quot;&amp;quot;&amp;quot; &amp;amp; strNewName &amp;amp; &amp;quot;&amp;quot;&amp;quot;}} vlc://quit&amp;quot;, 1, True&lt;br /&gt;
			End Select &lt;br /&gt;
&#039;&lt;br /&gt;
			Set objShell = Nothing&lt;br /&gt;
		End If&lt;br /&gt;
	Next&lt;br /&gt;
&#039; ** For each subfolder of current dir, copy files to target and recurse its subdirs&lt;br /&gt;
	For each subdir in strTempSource.subfolders&lt;br /&gt;
	  Wscript.Echo subdir.path&lt;br /&gt;
  	call RecurseDir(subdir.path, strTempTarget &amp;amp; &amp;quot;\&amp;quot; &amp;amp; subdir.name)&lt;br /&gt;
	Next&lt;br /&gt;
End Sub&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Non-Interactive Batch Transcoding (Linux)==&lt;br /&gt;
To transcode several files without user interaction create a bash script in the folder where the files are contained and add these lines to the bash script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
vcodec=&amp;quot;VIDEO_CODEC&amp;quot; &lt;br /&gt;
acodec=&amp;quot;AUDIO_CODEC&amp;quot; &lt;br /&gt;
bitrate=&amp;quot;VIDEO_BITRATE&amp;quot; &lt;br /&gt;
arate=&amp;quot;AUDIO_BITRATE&amp;quot; &lt;br /&gt;
ext=&amp;quot;OUTPUT_EXT&amp;quot; &lt;br /&gt;
mux=&amp;quot;MUXER&amp;quot; &lt;br /&gt;
vlc=&amp;quot;PATH_TO_VLC&amp;quot; &lt;br /&gt;
fmt=&amp;quot;INPUT_EXT&amp;quot; &lt;br /&gt;
&lt;br /&gt;
for a in *$fmt; do &lt;br /&gt;
$vlc -I dummy -vvv &amp;quot;$a&amp;quot; --sout &amp;quot;#transcode{vcodec=$vcodec,vb=$bitrate,acodec=$acodec,ab=$arate,channels=6}:standard{mux=$mux,dst=\&amp;quot;$a.$ext\&amp;quot;,access=file}&amp;quot;vlc://quit &lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Non-Interactive Merge/Transcode (Windows)===&lt;br /&gt;
&lt;br /&gt;
If you have more than one source files that need to be merged and transcoded resulting in a single out put file create a batch script with the following line in it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;PATH_TO_VLC&amp;quot; -vvv FILE1.EXT FILE2.EXT FILE3.EXT ETC.ETC --sout-keep --sout=#gather{} --sout=#transcode{vcodec=h264,vb=1024,scale=1,acodec=mp4a,ab=192,channels=6}:standard{access=file,mux=ts,dst=out.mpg} --sout-all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example script===&lt;br /&gt;
As an example, here is a bash script that will take a &amp;lt;tt&amp;gt;.mpg&amp;lt;/tt&amp;gt; file as generated by an DVB capture device and transcode it into an MPEG4 file using the h.264 codec. Copy it to a file, for example &amp;lt;tt&amp;gt;dvb2mp4&amp;lt;/tt&amp;gt;, and make it executable. It should work on any operating system that has bash, including windows if [http://www.cygwin.com Cygwin] is installed. It uses the cropping parameters proposed at [[Wikipedia:Overscan_amounts]] adapted so that the dimensions are divisible by 16 for better encoding.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#&lt;br /&gt;
# Transcode DVB TV signals to h.264-encoded MP4 files using VLC&lt;br /&gt;
# Wout.Mertens@gmail.com&lt;br /&gt;
&lt;br /&gt;
#### Defaults, please edit for your settings ####&lt;br /&gt;
&lt;br /&gt;
# VLC location, here is the Mac OS X example&lt;br /&gt;
VLC=/Applications/VLC.app/Contents/MacOS/clivlc&lt;br /&gt;
# Other possibilities: (Remove the # to activate)&lt;br /&gt;
#VLC=/usr/bin/vlc&lt;br /&gt;
#VLC=/usr/local/bin/vlc&lt;br /&gt;
&lt;br /&gt;
# 16:9 or 4:3&lt;br /&gt;
aspect=16:9&lt;br /&gt;
&lt;br /&gt;
# PAL (Europe) or NTSC (US)&lt;br /&gt;
src=PAL&lt;br /&gt;
&lt;br /&gt;
# video bitrate&lt;br /&gt;
bitrate=1024&lt;br /&gt;
&lt;br /&gt;
# audio bitrate&lt;br /&gt;
arate=128&lt;br /&gt;
&lt;br /&gt;
# cropping?&lt;br /&gt;
crop=yes&lt;br /&gt;
&lt;br /&gt;
# Deinterlace?&lt;br /&gt;
deint=yes&lt;br /&gt;
&lt;br /&gt;
#### Program, do not change below this line ####&lt;br /&gt;
usage() {&lt;br /&gt;
	cat 1&amp;gt;&amp;amp;2 &amp;lt;&amp;lt;EOF&lt;br /&gt;
Usage: $0 [-swpncC] [-b &amp;lt;rate&amp;gt;] [-a &amp;lt;rate&amp;gt;] &amp;lt;DVB source .mpg&amp;gt; &amp;lt;MP4 output file&amp;gt;&lt;br /&gt;
	-s	4:3 aspect ratio (default=$aspect)&lt;br /&gt;
	-w	16:9 aspect ratio&lt;br /&gt;
	-p	PAL (720x576) input (default=$src)&lt;br /&gt;
	-n	NTSC (720x480) input&lt;br /&gt;
	-c	Crop borders (default=$crop)&lt;br /&gt;
	-C	Do not crop borders&lt;br /&gt;
	-d	Perform de-interlacing (default=$deint)&lt;br /&gt;
	-D	Do not perform de-interlacing&lt;br /&gt;
	-b	video bitrate kb/s (default=$bitrate)&lt;br /&gt;
	-a	audio bitrate kb/s (default=$arate)&lt;br /&gt;
EOF&lt;br /&gt;
	exit 1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
error() {&lt;br /&gt;
	echo &amp;quot;ERROR: $*&amp;quot; 1&amp;gt;&amp;amp;2&lt;br /&gt;
	exit 2&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
while getopts &#039;swpncCb:a:h&#039; opt; do&lt;br /&gt;
	case $opt in&lt;br /&gt;
		s) aspect=4:3 ;;&lt;br /&gt;
		w) aspect=16:9 ;;&lt;br /&gt;
		p) src=PAL ;;&lt;br /&gt;
		n) src=NTSC ;;&lt;br /&gt;
		c) crop=yes ;;&lt;br /&gt;
		C) crop=no ;;&lt;br /&gt;
		d) deint=yes ;;&lt;br /&gt;
		D) deint=no ;;&lt;br /&gt;
		b) bitrate=$OPTARG ;;&lt;br /&gt;
		a) arate=$OPTARG ;;&lt;br /&gt;
		h) usage ;;&lt;br /&gt;
		*) echo &amp;quot;Unknown option $opt&amp;quot; 1&amp;gt;&amp;amp;2; usage ;;&lt;br /&gt;
	esac&lt;br /&gt;
done&lt;br /&gt;
shift $(( $OPTIND - 1 ))&lt;br /&gt;
&lt;br /&gt;
[ $# -ne 2 ] &amp;amp;&amp;amp; usage&lt;br /&gt;
&lt;br /&gt;
infile=&amp;quot;$1&amp;quot;&lt;br /&gt;
outfile=&amp;quot;$2&amp;quot;&lt;br /&gt;
case $outfile in&lt;br /&gt;
	*.mp4|*.MP4) : ;;&lt;br /&gt;
	*) outfile=&amp;quot;$outfile.mp4&amp;quot; ;;&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
[ -r &amp;quot;$infile&amp;quot; ] || error &amp;quot;Can&#039;t read from $infile&amp;quot;&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$src,$aspect,$crop&amp;quot; in&lt;br /&gt;
	PAL,16:9,yes) sizestr=&amp;quot;cropleft=31,cropright=31,croptop=16,cropbottom=16,width=960,height=544&amp;quot; ;;&lt;br /&gt;
	PAL,4:3,yes)  sizestr=&amp;quot;cropleft=31,cropright=31,croptop=16,cropbottom=16,width=720,height=544&amp;quot; ;;&lt;br /&gt;
	NTSC,16:9,yes) sizestr=&amp;quot;cropleft=30,cropright=30,croptop=17,cropbottom=17,width=800,height=448&amp;quot; ;;&lt;br /&gt;
	NTSC,4:3,yes) sizestr=&amp;quot;cropleft=26,cropright=26,croptop=17,cropbottom=17,width=608,height=448&amp;quot; ;;&lt;br /&gt;
	PAL,16:9,no) sizestr=&amp;quot;width=1024,height=576&amp;quot; ;;&lt;br /&gt;
	PAL,4:3,no) sizestr=&amp;quot;width=768,height=576&amp;quot; ;;&lt;br /&gt;
	NTSC,16:9,no) sizestr=&amp;quot;width=800,height=448&amp;quot; ;;&lt;br /&gt;
	NTSC,4:3,no) sizestr=&amp;quot;width=608,height=448&amp;quot; ;;&lt;br /&gt;
	*) error &amp;quot;Could not handle $src,$aspect,$crop. This shouldn&#039;t happen!&amp;quot; ;;&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$deint&amp;quot; = &amp;quot;yes&amp;quot; ]; then&lt;br /&gt;
	deintstr=&amp;quot;,deinterlace=enable&amp;quot;&lt;br /&gt;
else&lt;br /&gt;
	deintstr=&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# Let&#039;s do it&lt;br /&gt;
echo &amp;quot;Input file: $infile&amp;quot;&lt;br /&gt;
echo &amp;quot;Output file: $outfile&amp;quot;&lt;br /&gt;
echo &amp;quot;Encoding at $bitrate+$arate kb/s, input $src, $aspect, cropping $crop, de-interlace $deint&amp;quot;&lt;br /&gt;
echo&lt;br /&gt;
echo &#039;&amp;gt;&amp;gt;&amp;gt;&#039; $VLC -I dummy &amp;quot;$infile&amp;quot; --sout &amp;quot;#transcode{$sizestr$deintstr,vcodec=h264,vb=$bitrate,acodec=mp4a,ab=$arate}:standard{mux=mp4,dst=\&amp;quot;$outfile\&amp;quot;,access=file}&amp;quot; vlc://quit&lt;br /&gt;
echo&lt;br /&gt;
$VLC -I dummy &amp;quot;$infile&amp;quot; --sout &amp;quot;#transcode{$sizestr$deintstr,vcodec=h264,vb=$bitrate,acodec=mp4a,ab=$arate}:standard{mux=mp4,dst=\&amp;quot;$outfile\&amp;quot;,access=file}&amp;quot; vlc://quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;/div&gt;</summary>
		<author><name>Morty</name></author>
	</entry>
</feed>