<?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=Jeffab</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=Jeffab"/>
	<link rel="alternate" type="text/html" href="https://wiki.videolan.org/Special:Contributions/Jeffab/"/>
	<updated>2026-11-04T16:25:46Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Transcode&amp;diff=15268</id>
		<title>Transcode</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Transcode&amp;diff=15268"/>
		<updated>2010-01-10T01:37:50Z</updated>

		<summary type="html">&lt;p&gt;Jeffab: /* Under MS Windows */&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;
== 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>Jeffab</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Transcode&amp;diff=15267</id>
		<title>Transcode</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Transcode&amp;diff=15267"/>
		<updated>2010-01-10T01:36:17Z</updated>

		<summary type="html">&lt;p&gt;Jeffab: /* Under MS Windows */  added reminder to possibly escape backslashes&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;
(Note: due to command line parsing, at times (especially within single and double quote blocks) a backslash will 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;
== 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>Jeffab</name></author>
	</entry>
</feed>