<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.pterodactylus.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Bombe</id>
		<title>Pterodactylus - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.pterodactylus.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Bombe"/>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php/Special:Contributions/Bombe"/>
		<updated>2026-04-22T13:16:10Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.29.2</generator>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Ripping_and_Encoding_DVDs&amp;diff=90</id>
		<title>Ripping and Encoding DVDs</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Ripping_and_Encoding_DVDs&amp;diff=90"/>
				<updated>2025-11-29T20:48:27Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: /* Using ffmpeg */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Encoding]]&lt;br /&gt;
[[Category:Ripping]]&lt;br /&gt;
[[Category:DVD]]&lt;br /&gt;
This page describes in large detail how to create near perfect DVD rips. “Near perfect” in this context means that the video quality is nearly indistinguishable from the DVD video, and all audio tracks contained in the movie are the AC3 tracks that are contained in the DVD without any reencoding whatsoever.&lt;br /&gt;
&lt;br /&gt;
This page was written ages ago; most of the tools mentioned here probably still exist for Linux (and maybe other systems).&lt;br /&gt;
&lt;br /&gt;
== Copy the Disc and Decrypt It ==&lt;br /&gt;
&lt;br /&gt;
 $ dvdbackup -M -n foo -i /dev/disk123&lt;br /&gt;
&lt;br /&gt;
Obviously, replace *foo* with a short name for the disc you’re trying to rip, and `/dev/disk123` with the actual device name of your DVD drive.&lt;br /&gt;
&lt;br /&gt;
This will create a decrypted version of the complete disc on your harddrive, in a directory named `foo`.&lt;br /&gt;
&lt;br /&gt;
== Copy the Main Title from the DVD ==&lt;br /&gt;
&lt;br /&gt;
First, we need to find out which title is the main title. I recommend storing the output of &amp;lt;code&amp;gt;lsdvd&amp;lt;/code&amp;gt;, too, so that you can look at it later, e. g. for subtitle stream IDs, or other technical information.&lt;br /&gt;
&lt;br /&gt;
 $ lsdvd -x /dev/dvd &amp;gt; movie.txt&lt;br /&gt;
&lt;br /&gt;
Instead of &amp;lt;code&amp;gt;/dev/dvd&amp;lt;/code&amp;gt; you can also use the name of the directory created in the previous stop.&lt;br /&gt;
&lt;br /&gt;
 $ lsdvd -x foo &amp;gt; movie.txt&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;lsdvd&amp;lt;/code&amp;gt; can tell you a lot of things about the DVD in question. Especially the track IDs for audio and subtitle tracks will be interesting later on so try not to forget where you got it from. For now it will tell you the longest title on the disc; usually this is the main title. Copy it to the hard disk using &amp;lt;code&amp;gt;tccat&amp;lt;/code&amp;gt; from the &amp;lt;code&amp;gt;transcode&amp;lt;/code&amp;gt; package:&lt;br /&gt;
&lt;br /&gt;
 $ tccat -i /dev/dvd -T ''&amp;lt;title&amp;gt;'',-1 &amp;gt; movie.mpg&lt;br /&gt;
&lt;br /&gt;
While &amp;lt;code&amp;gt;tccat&amp;lt;/code&amp;gt; is busy you can already perform the next steps.&lt;br /&gt;
&lt;br /&gt;
 $ cp ''/path/to/dvd/''VIDEO_TS/VTS_''&amp;lt;vts&amp;gt;''_0.IFO movie.ifo&lt;br /&gt;
&lt;br /&gt;
This will copy the IFO file for the main title to the disc. This file contains information that is relevant for subtitle conversion. If you do not need subtitles, you can skip this. The VTS number of the main title is listed in the &amp;lt;code&amp;gt;lsdvd -x&amp;lt;/code&amp;gt; output from above and is always two digits long.&lt;br /&gt;
&lt;br /&gt;
 $ dvdxchap -t ''&amp;lt;title&amp;gt;'' /dev/dvd &amp;gt; movie.chap&lt;br /&gt;
&lt;br /&gt;
This will extract the chapter information from the main title into a text file. If you want and if you know the names of the chapters, you can now edit this file.&lt;br /&gt;
&lt;br /&gt;
Now we have to wait until &amp;lt;code&amp;gt;tccat&amp;lt;/code&amp;gt; has finished copying the main title to the hard disk. Encoding the video is the next step as it is bound to take quite some time (depending on your hardware) and the rest of the steps (except for multiplexing, of course) can be performed while the video is being encoded.&lt;br /&gt;
&lt;br /&gt;
== Encode the Video ==&lt;br /&gt;
&lt;br /&gt;
Encoding the video has a lot to do with voodoo. When you try to use Google to find “the best options” to encode a DVD you will find none. Or to be more precise, you will find plenty, and they will all contradict each other. There are about a millions ways to encode video; I will only outline some of them.&lt;br /&gt;
&lt;br /&gt;
=== Using avidemux2 ===&lt;br /&gt;
&lt;br /&gt;
Using avidemux2 gives you a nice user interface and easy selection of all relevant parameters for the encoding process. These are the settings I usually use:&lt;br /&gt;
&lt;br /&gt;
* Video Codec: MPEG-4 ASP (xvid)&lt;br /&gt;
* Constant Quality: 5&lt;br /&gt;
* Some time-hungry options, such as High Motion Estimation, Wide Search for Rate Distortion Optimisation, Quarter Pixel Motion Estimation, and Global Motion Compensation. I don’t really care about how long the encoding takes, I’m interesting in the best possible picture.&lt;br /&gt;
* Most important: The Pixel Aspect Ratio has to be set to “as input”! This allows you to crop black borders off of the image without having to recalculate the new width and height of the image.&lt;br /&gt;
* Also, you do not need to set the width and height of the image. The size of the source material in combination with the Pixel Aspect Ratio will automatically take care that the final video is stretched as necessary. Not resizing the picture will also keep the quality of the video material at its maximum; it will never get better when you resize.&lt;br /&gt;
* Disable all audio tracks, as the input MPEG file still contains all audio tracks from the DVD and they don’t need to be encoded.&lt;br /&gt;
&lt;br /&gt;
Now save the file to &amp;lt;code&amp;gt;movie.avi&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Using mencoder ===&lt;br /&gt;
&lt;br /&gt;
Using a command line tool such as &amp;lt;code&amp;gt;mencoder&amp;lt;/code&amp;gt; gives you the possibility to encode on a remote machine, e.g. on your desktop machine when you’re not at home, or on a headless server somewhere in a data warehouse or your basement. Basically, the &amp;lt;code&amp;gt;mencoder&amp;lt;/code&amp;gt; command line looks like this:&lt;br /&gt;
&lt;br /&gt;
 $ mencoder -o movie.avi movie.mpg -nosound -nosub -noautosub -ovc xvid -xvidencopts fixed_quant=3:qpel:gmc:trellis:vhq=4&lt;br /&gt;
&lt;br /&gt;
This will use the &amp;lt;code&amp;gt;xvid&amp;lt;/code&amp;gt; codec at a fixed quantizer (3), enabling a couple of quality-improving options (quarter pixels, global motion compensation, Trellis quantization, motion search algorithm), omitting all audio tracks and subtitles from the original MPEG file.&lt;br /&gt;
&lt;br /&gt;
 $ mencoder -o movie.avi movie.mpg -nosound -nosub -noautosub -ovc xvid -xvidencopts qpel:gmc:trellis:vhq=4:cartoon:interlacing:pass=1:bitrate=-307200&lt;br /&gt;
&lt;br /&gt;
This will used the &amp;lt;code&amp;gt;xvid&amp;lt;/code&amp;gt; codec again but tell it to optimize for interlaced cartoon material, using 2-pass encoding heading for a total amount of 307200 KiB of video stream. (You need to run this command again, substituting &amp;lt;code&amp;gt;:pass=2&amp;lt;/code&amp;gt; at the appropriate place.)&lt;br /&gt;
&lt;br /&gt;
 $ mencoder -o movie.avi movie.mpg -nosound -nosub -noautosub -ovc xvid -xvidencopts fixed_quant=3:qpel:gmc:trellis:vhq=4 -vf pullup,softskip -ofps 24000/1001&lt;br /&gt;
&lt;br /&gt;
This will perform an inverse telecine transformation, reducing NTSC material from 30000/1001 (aka 29.97) fps to 24000/1001 (aka 23.976) fps.&lt;br /&gt;
&lt;br /&gt;
 $ mencoder -o movie.avi movie.mpg -nosound -nosub -noautosub -vf crop=720:416:0:80 -ovc x264 -x264encopts crf=18:preset=veryslow:threads=1&lt;br /&gt;
&lt;br /&gt;
This encodes the video with the x264 codec with a single thread and the “veryslow” preset (which is indeed very slow) and crops the video (reducing the height to 416 pixels, starting at pixel 80).&lt;br /&gt;
&lt;br /&gt;
=== Using x264 ===&lt;br /&gt;
&lt;br /&gt;
It is also possible to use the h.264 encoder &amp;lt;tt&amp;gt;x264&amp;lt;/tt&amp;gt; directly.&lt;br /&gt;
&lt;br /&gt;
 $ x264 --index movie.mpg.idx --no-interlaced --crf 18 --preset veryslow --threads 2 --vf crop:0,80,0,80 -o movie.avi movie.mpg&lt;br /&gt;
&lt;br /&gt;
=== Using ffmpeg ===&lt;br /&gt;
&lt;br /&gt;
And last but not least there is also &amp;lt;tt&amp;gt;ffmpeg&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 $ ffmpeg -probesize 3000M -analyzeduration 3000M -y -i movie.mpg -map 0:v -map 0:s -map 0:a:1 -map 0:a:0 -map 0:a:2 -map 0:a:3 -c copy -c:v libx265 -profile:v main -preset placebo -filter:v crop=y=75:h=426 -crf 10 -x265-params rd=5:max-merge=5:me=star:subme=7:hme=1:aq-mode=4 movie.mkv&lt;br /&gt;
&lt;br /&gt;
This will scan the video for all kinds of available tracks (subtitle tracks are notorious for only showing up when the first subtitle is shown); &amp;lt;tt&amp;gt;-probesite&amp;lt;/tt&amp;gt; is in bytes, whereas &amp;lt;tt&amp;gt;-analyzeduration&amp;lt;/tt&amp;gt; is in *microseconds*. &amp;lt;tt&amp;gt;-y&amp;lt;/tt&amp;gt; will overwrite any output files when encoding the input file &amp;lt;tt&amp;gt;movie.mpg&amp;lt;/tt&amp;gt; (&amp;lt;tt&amp;gt;-i movie.mpg&amp;lt;/tt&amp;gt;). It will use all video tracks (&amp;lt;tt&amp;gt;-map 0:v&amp;lt;/tt&amp;gt;), all subtitle tracks (&amp;lt;tt&amp;gt;-map 0:s&amp;lt;/tt&amp;gt;), and the first four audio tracks in the order 1, 0, 2, 3 (&amp;lt;tt&amp;gt;-map 0:a:1 -map 0:a:0 -map 0:a:2 -map 0:a:3&amp;lt;/tt&amp;gt;). The default codec for all tracks is the “copy” codec (&amp;lt;tt&amp;gt;-c copy&amp;lt;/tt&amp;gt;) but the video track is encoded using the x264 encoder (&amp;lt;tt&amp;gt;-c:v libx264&amp;lt;/tt&amp;gt;). &amp;lt;tt&amp;gt;-crf 15&amp;lt;/tt&amp;gt; tells the x265 encoder to use a Constant Rate Factor of 10. A video filter is then added for the output file: “crop=y=75:h=426” will only encode a window with the dimensions 720×426, starting at the coordinates (0,75). A bunch of x265 parameters are set to try to increate the visual quality as much as possible. The result is written to the file &amp;lt;tt&amp;gt;movie.mkv&amp;lt;/tt&amp;gt;; the appropriate muxer for Matroska video is automatically selected.&lt;br /&gt;
&lt;br /&gt;
== Extract Subtitle Tracks ==&lt;br /&gt;
&lt;br /&gt;
After &amp;lt;code&amp;gt;tccat&amp;lt;/code&amp;gt; has finished copying the movie to your hard disk you can extract the subtitle tracks. This is necessary because they have to be converted before &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; can handle them.&lt;br /&gt;
&lt;br /&gt;
 $ tcextract -i movie.mpg -a 0x20 -x ps1 &amp;gt; movie.en.ps1&lt;br /&gt;
&lt;br /&gt;
The ID of the subtitle track (here: 0x20) can be found in the output of &amp;lt;code&amp;gt;lsdvd&amp;lt;/code&amp;gt;. Choose the subtitles you like and extract them one after another.&lt;br /&gt;
&lt;br /&gt;
Now they have to be converted to the VobSub format:&lt;br /&gt;
&lt;br /&gt;
 $ subtitle2vobsub -p movie.en.ps1 -i movie.ifo -o movie.en&lt;br /&gt;
&lt;br /&gt;
This will create the files &amp;lt;code&amp;gt;movie.en.sub&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;movie.en.idx&amp;lt;/code&amp;gt;. Both are necessary for &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; to do its magic.&lt;br /&gt;
&lt;br /&gt;
We’re almost there.&lt;br /&gt;
&lt;br /&gt;
== Mux the Final Video ==&lt;br /&gt;
&lt;br /&gt;
Now all that we have created has to be put together.&lt;br /&gt;
&lt;br /&gt;
 $ mkvmerge -o movie.mkv --title &amp;quot;Movie&amp;quot; --chapter-language eng --chapters movie.chap \&lt;br /&gt;
 --compression 0:none movie.avi \&lt;br /&gt;
 -D -a 1,2 --compression 1:none --language 1:eng --compression 2:none --language 2:ger --default-duration 0:25fps movie.mpg \&lt;br /&gt;
 --compression 0:none --language 0:eng --default-track 0:0 movie.en.idx \&lt;br /&gt;
 --compression 0:none --language 0:ger --default-track 0:0 movie.de.idx&lt;br /&gt;
&lt;br /&gt;
Yes, this command line needs some explaining.&lt;br /&gt;
&lt;br /&gt;
;-o movie.mkv&lt;br /&gt;
:This is the output file that we are creating.&lt;br /&gt;
&lt;br /&gt;
;--title “Movie“&lt;br /&gt;
:Here you can specify the title of the movie. This parameter is optional.&lt;br /&gt;
&lt;br /&gt;
;--chapter-language eng --chapters movie.chap&lt;br /&gt;
:This includes the chapter definitions from the given file and also specifies that the lanuage of the chapters file is English.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;--compression 0:none movie.avi&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:Includes all tracks from the given file in the output file. The “--compression 0:none” parameters tells &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; to not use any kind of header compression. As we only stored a video track in &amp;lt;code&amp;gt;movie.avi&amp;lt;/code&amp;gt; we do not need to restrict inclusion of this file. If you accidentally encoded an audio track as well, you need to specify “-A” before “movie.avi” - this will tell &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; to not include any audio tracks.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;-D -a 1,2 --compression 1:none --language 1:eng --compression 2:none --language 2:ger --default-duration 0:25fps movie.mpg&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:These parameters tell &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; to include no video track (“-D”) and audio tracks 1 and 2 (“-a 1,2”) from the file &amp;lt;code&amp;gt;movie.mpg&amp;lt;/code&amp;gt;. This is our source file from the DVD and thus contains the MPEG-2 video stream that we reencoded earlier, as well as the original AC3 audio tracks that we are interested in. Note that the audio tracks are tracks 1 and 2 because track 0 in the file &amp;lt;code&amp;gt;movie.mpg&amp;lt;/code&amp;gt; is the video track! Use “&amp;lt;code&amp;gt;mkvmerge --identify movie.mpg&amp;lt;/code&amp;gt;” to list all tracks that &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; recognizes. Also, these parameters tell &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; that audio track 1 is English, and audio track 2 is German. If you want to include more than two audio tracks you need to repeat the respective parameters for all additional audio tracks.&lt;br /&gt;
:If you are muxing a video file that consists of an AVC/h.264 stream you need to specify the duration of a frame because the stream itself does not contain that information; &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; assumes a default of 25 FPS.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;--compression 0:none --language 0:eng --default-track 0:0 movie.en.idx&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:This includes all tracks from the &amp;lt;code&amp;gt;movie.en.idx&amp;lt;/code&amp;gt; file which is a single subtitle track in the English language. The “--default-track 0:0” specifies that the included track with the index 0 (i.e. the only subtitle track in the file) is not a default track. This needs to be specified for all subtitles unless you really want to show a certain subtitle as default when a movie starts. This can be used to include forced subtitles for additional foreign languages spoken in a movie, e.g. the Na’vi language in “Avatar”, or Elfish in “The Lord of the Rings.”&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;--compression 0:none --language 0:ger --default-track 0:0 movie.de.idx&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:Includes the German subtitles.&lt;br /&gt;
&lt;br /&gt;
Voilá, &amp;lt;code&amp;gt;movie.mkv&amp;lt;/code&amp;gt; now contains your movie, all audio tracks, and all subtitle tracks that you want to be in there.&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Ripping_and_Encoding_DVDs&amp;diff=89</id>
		<title>Ripping and Encoding DVDs</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Ripping_and_Encoding_DVDs&amp;diff=89"/>
				<updated>2025-11-29T20:20:26Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: /* Using ffmpeg */ Change avconv to ffmpeg, and update some options for 2025&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Encoding]]&lt;br /&gt;
[[Category:Ripping]]&lt;br /&gt;
[[Category:DVD]]&lt;br /&gt;
This page describes in large detail how to create near perfect DVD rips. “Near perfect” in this context means that the video quality is nearly indistinguishable from the DVD video, and all audio tracks contained in the movie are the AC3 tracks that are contained in the DVD without any reencoding whatsoever.&lt;br /&gt;
&lt;br /&gt;
This page was written ages ago; most of the tools mentioned here probably still exist for Linux (and maybe other systems).&lt;br /&gt;
&lt;br /&gt;
== Copy the Disc and Decrypt It ==&lt;br /&gt;
&lt;br /&gt;
 $ dvdbackup -M -n foo -i /dev/disk123&lt;br /&gt;
&lt;br /&gt;
Obviously, replace *foo* with a short name for the disc you’re trying to rip, and `/dev/disk123` with the actual device name of your DVD drive.&lt;br /&gt;
&lt;br /&gt;
This will create a decrypted version of the complete disc on your harddrive, in a directory named `foo`.&lt;br /&gt;
&lt;br /&gt;
== Copy the Main Title from the DVD ==&lt;br /&gt;
&lt;br /&gt;
First, we need to find out which title is the main title. I recommend storing the output of &amp;lt;code&amp;gt;lsdvd&amp;lt;/code&amp;gt;, too, so that you can look at it later, e. g. for subtitle stream IDs, or other technical information.&lt;br /&gt;
&lt;br /&gt;
 $ lsdvd -x /dev/dvd &amp;gt; movie.txt&lt;br /&gt;
&lt;br /&gt;
Instead of &amp;lt;code&amp;gt;/dev/dvd&amp;lt;/code&amp;gt; you can also use the name of the directory created in the previous stop.&lt;br /&gt;
&lt;br /&gt;
 $ lsdvd -x foo &amp;gt; movie.txt&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;lsdvd&amp;lt;/code&amp;gt; can tell you a lot of things about the DVD in question. Especially the track IDs for audio and subtitle tracks will be interesting later on so try not to forget where you got it from. For now it will tell you the longest title on the disc; usually this is the main title. Copy it to the hard disk using &amp;lt;code&amp;gt;tccat&amp;lt;/code&amp;gt; from the &amp;lt;code&amp;gt;transcode&amp;lt;/code&amp;gt; package:&lt;br /&gt;
&lt;br /&gt;
 $ tccat -i /dev/dvd -T ''&amp;lt;title&amp;gt;'',-1 &amp;gt; movie.mpg&lt;br /&gt;
&lt;br /&gt;
While &amp;lt;code&amp;gt;tccat&amp;lt;/code&amp;gt; is busy you can already perform the next steps.&lt;br /&gt;
&lt;br /&gt;
 $ cp ''/path/to/dvd/''VIDEO_TS/VTS_''&amp;lt;vts&amp;gt;''_0.IFO movie.ifo&lt;br /&gt;
&lt;br /&gt;
This will copy the IFO file for the main title to the disc. This file contains information that is relevant for subtitle conversion. If you do not need subtitles, you can skip this. The VTS number of the main title is listed in the &amp;lt;code&amp;gt;lsdvd -x&amp;lt;/code&amp;gt; output from above and is always two digits long.&lt;br /&gt;
&lt;br /&gt;
 $ dvdxchap -t ''&amp;lt;title&amp;gt;'' /dev/dvd &amp;gt; movie.chap&lt;br /&gt;
&lt;br /&gt;
This will extract the chapter information from the main title into a text file. If you want and if you know the names of the chapters, you can now edit this file.&lt;br /&gt;
&lt;br /&gt;
Now we have to wait until &amp;lt;code&amp;gt;tccat&amp;lt;/code&amp;gt; has finished copying the main title to the hard disk. Encoding the video is the next step as it is bound to take quite some time (depending on your hardware) and the rest of the steps (except for multiplexing, of course) can be performed while the video is being encoded.&lt;br /&gt;
&lt;br /&gt;
== Encode the Video ==&lt;br /&gt;
&lt;br /&gt;
Encoding the video has a lot to do with voodoo. When you try to use Google to find “the best options” to encode a DVD you will find none. Or to be more precise, you will find plenty, and they will all contradict each other. There are about a millions ways to encode video; I will only outline some of them.&lt;br /&gt;
&lt;br /&gt;
=== Using avidemux2 ===&lt;br /&gt;
&lt;br /&gt;
Using avidemux2 gives you a nice user interface and easy selection of all relevant parameters for the encoding process. These are the settings I usually use:&lt;br /&gt;
&lt;br /&gt;
* Video Codec: MPEG-4 ASP (xvid)&lt;br /&gt;
* Constant Quality: 5&lt;br /&gt;
* Some time-hungry options, such as High Motion Estimation, Wide Search for Rate Distortion Optimisation, Quarter Pixel Motion Estimation, and Global Motion Compensation. I don’t really care about how long the encoding takes, I’m interesting in the best possible picture.&lt;br /&gt;
* Most important: The Pixel Aspect Ratio has to be set to “as input”! This allows you to crop black borders off of the image without having to recalculate the new width and height of the image.&lt;br /&gt;
* Also, you do not need to set the width and height of the image. The size of the source material in combination with the Pixel Aspect Ratio will automatically take care that the final video is stretched as necessary. Not resizing the picture will also keep the quality of the video material at its maximum; it will never get better when you resize.&lt;br /&gt;
* Disable all audio tracks, as the input MPEG file still contains all audio tracks from the DVD and they don’t need to be encoded.&lt;br /&gt;
&lt;br /&gt;
Now save the file to &amp;lt;code&amp;gt;movie.avi&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Using mencoder ===&lt;br /&gt;
&lt;br /&gt;
Using a command line tool such as &amp;lt;code&amp;gt;mencoder&amp;lt;/code&amp;gt; gives you the possibility to encode on a remote machine, e.g. on your desktop machine when you’re not at home, or on a headless server somewhere in a data warehouse or your basement. Basically, the &amp;lt;code&amp;gt;mencoder&amp;lt;/code&amp;gt; command line looks like this:&lt;br /&gt;
&lt;br /&gt;
 $ mencoder -o movie.avi movie.mpg -nosound -nosub -noautosub -ovc xvid -xvidencopts fixed_quant=3:qpel:gmc:trellis:vhq=4&lt;br /&gt;
&lt;br /&gt;
This will use the &amp;lt;code&amp;gt;xvid&amp;lt;/code&amp;gt; codec at a fixed quantizer (3), enabling a couple of quality-improving options (quarter pixels, global motion compensation, Trellis quantization, motion search algorithm), omitting all audio tracks and subtitles from the original MPEG file.&lt;br /&gt;
&lt;br /&gt;
 $ mencoder -o movie.avi movie.mpg -nosound -nosub -noautosub -ovc xvid -xvidencopts qpel:gmc:trellis:vhq=4:cartoon:interlacing:pass=1:bitrate=-307200&lt;br /&gt;
&lt;br /&gt;
This will used the &amp;lt;code&amp;gt;xvid&amp;lt;/code&amp;gt; codec again but tell it to optimize for interlaced cartoon material, using 2-pass encoding heading for a total amount of 307200 KiB of video stream. (You need to run this command again, substituting &amp;lt;code&amp;gt;:pass=2&amp;lt;/code&amp;gt; at the appropriate place.)&lt;br /&gt;
&lt;br /&gt;
 $ mencoder -o movie.avi movie.mpg -nosound -nosub -noautosub -ovc xvid -xvidencopts fixed_quant=3:qpel:gmc:trellis:vhq=4 -vf pullup,softskip -ofps 24000/1001&lt;br /&gt;
&lt;br /&gt;
This will perform an inverse telecine transformation, reducing NTSC material from 30000/1001 (aka 29.97) fps to 24000/1001 (aka 23.976) fps.&lt;br /&gt;
&lt;br /&gt;
 $ mencoder -o movie.avi movie.mpg -nosound -nosub -noautosub -vf crop=720:416:0:80 -ovc x264 -x264encopts crf=18:preset=veryslow:threads=1&lt;br /&gt;
&lt;br /&gt;
This encodes the video with the x264 codec with a single thread and the “veryslow” preset (which is indeed very slow) and crops the video (reducing the height to 416 pixels, starting at pixel 80).&lt;br /&gt;
&lt;br /&gt;
=== Using x264 ===&lt;br /&gt;
&lt;br /&gt;
It is also possible to use the h.264 encoder &amp;lt;tt&amp;gt;x264&amp;lt;/tt&amp;gt; directly.&lt;br /&gt;
&lt;br /&gt;
 $ x264 --index movie.mpg.idx --no-interlaced --crf 18 --preset veryslow --threads 2 --vf crop:0,80,0,80 -o movie.avi movie.mpg&lt;br /&gt;
&lt;br /&gt;
=== Using ffmpeg ===&lt;br /&gt;
&lt;br /&gt;
And last but not least there is also &amp;lt;tt&amp;gt;ffmpeg&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 $ ffmpeg -y -i movie.mpg -map 0:v -map 0:s -map 0:a:1 -map 0:a:0 -map 0:a:2 -map 0:a:3 -c copy -c:v libx265 -crf 10 -preset placebo -vf crop=y=75:h=426 movie.mkv&lt;br /&gt;
&lt;br /&gt;
This will overwrite any output files (&amp;lt;tt&amp;gt;-y&amp;lt;/tt&amp;gt;) when encoding the input file &amp;lt;tt&amp;gt;movie.mpg&amp;lt;/tt&amp;gt; (&amp;lt;tt&amp;gt;-i movie.mpg&amp;lt;/tt&amp;gt;). It will use all video tracks (&amp;lt;tt&amp;gt;-map 0:v&amp;lt;/tt&amp;gt;), all subtitle tracks (&amp;lt;tt&amp;gt;-map 0:s&amp;lt;/tt&amp;gt;), and the first four audio tracks in the order 1, 0, 2, 3 (&amp;lt;tt&amp;gt;-map 0:a:1 -map 0:a:0 -map 0:a:2 -map 0:a:3&amp;lt;/tt&amp;gt;). The default codec for all tracks is the “copy” codec (&amp;lt;tt&amp;gt;-c copy&amp;lt;/tt&amp;gt;) but the video track is encoded using the x264 encoder (&amp;lt;tt&amp;gt;-c:v libx264&amp;lt;/tt&amp;gt;). &amp;lt;tt&amp;gt;-crf 15&amp;lt;/tt&amp;gt; tells the x265 encoder to use a Constant Rate Factor of 10. A video filter is then added for the output file: “crop=y=75:h=426” will only encode a window with the dimensions 720×426, starting at the coordinates (0,75). The result is written to the file &amp;lt;tt&amp;gt;movie.mkv&amp;lt;/tt&amp;gt;; the appropriate muxer for Matroska video is automatically selected.&lt;br /&gt;
&lt;br /&gt;
== Extract Subtitle Tracks ==&lt;br /&gt;
&lt;br /&gt;
After &amp;lt;code&amp;gt;tccat&amp;lt;/code&amp;gt; has finished copying the movie to your hard disk you can extract the subtitle tracks. This is necessary because they have to be converted before &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; can handle them.&lt;br /&gt;
&lt;br /&gt;
 $ tcextract -i movie.mpg -a 0x20 -x ps1 &amp;gt; movie.en.ps1&lt;br /&gt;
&lt;br /&gt;
The ID of the subtitle track (here: 0x20) can be found in the output of &amp;lt;code&amp;gt;lsdvd&amp;lt;/code&amp;gt;. Choose the subtitles you like and extract them one after another.&lt;br /&gt;
&lt;br /&gt;
Now they have to be converted to the VobSub format:&lt;br /&gt;
&lt;br /&gt;
 $ subtitle2vobsub -p movie.en.ps1 -i movie.ifo -o movie.en&lt;br /&gt;
&lt;br /&gt;
This will create the files &amp;lt;code&amp;gt;movie.en.sub&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;movie.en.idx&amp;lt;/code&amp;gt;. Both are necessary for &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; to do its magic.&lt;br /&gt;
&lt;br /&gt;
We’re almost there.&lt;br /&gt;
&lt;br /&gt;
== Mux the Final Video ==&lt;br /&gt;
&lt;br /&gt;
Now all that we have created has to be put together.&lt;br /&gt;
&lt;br /&gt;
 $ mkvmerge -o movie.mkv --title &amp;quot;Movie&amp;quot; --chapter-language eng --chapters movie.chap \&lt;br /&gt;
 --compression 0:none movie.avi \&lt;br /&gt;
 -D -a 1,2 --compression 1:none --language 1:eng --compression 2:none --language 2:ger --default-duration 0:25fps movie.mpg \&lt;br /&gt;
 --compression 0:none --language 0:eng --default-track 0:0 movie.en.idx \&lt;br /&gt;
 --compression 0:none --language 0:ger --default-track 0:0 movie.de.idx&lt;br /&gt;
&lt;br /&gt;
Yes, this command line needs some explaining.&lt;br /&gt;
&lt;br /&gt;
;-o movie.mkv&lt;br /&gt;
:This is the output file that we are creating.&lt;br /&gt;
&lt;br /&gt;
;--title “Movie“&lt;br /&gt;
:Here you can specify the title of the movie. This parameter is optional.&lt;br /&gt;
&lt;br /&gt;
;--chapter-language eng --chapters movie.chap&lt;br /&gt;
:This includes the chapter definitions from the given file and also specifies that the lanuage of the chapters file is English.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;--compression 0:none movie.avi&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:Includes all tracks from the given file in the output file. The “--compression 0:none” parameters tells &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; to not use any kind of header compression. As we only stored a video track in &amp;lt;code&amp;gt;movie.avi&amp;lt;/code&amp;gt; we do not need to restrict inclusion of this file. If you accidentally encoded an audio track as well, you need to specify “-A” before “movie.avi” - this will tell &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; to not include any audio tracks.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;-D -a 1,2 --compression 1:none --language 1:eng --compression 2:none --language 2:ger --default-duration 0:25fps movie.mpg&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:These parameters tell &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; to include no video track (“-D”) and audio tracks 1 and 2 (“-a 1,2”) from the file &amp;lt;code&amp;gt;movie.mpg&amp;lt;/code&amp;gt;. This is our source file from the DVD and thus contains the MPEG-2 video stream that we reencoded earlier, as well as the original AC3 audio tracks that we are interested in. Note that the audio tracks are tracks 1 and 2 because track 0 in the file &amp;lt;code&amp;gt;movie.mpg&amp;lt;/code&amp;gt; is the video track! Use “&amp;lt;code&amp;gt;mkvmerge --identify movie.mpg&amp;lt;/code&amp;gt;” to list all tracks that &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; recognizes. Also, these parameters tell &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; that audio track 1 is English, and audio track 2 is German. If you want to include more than two audio tracks you need to repeat the respective parameters for all additional audio tracks.&lt;br /&gt;
:If you are muxing a video file that consists of an AVC/h.264 stream you need to specify the duration of a frame because the stream itself does not contain that information; &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; assumes a default of 25 FPS.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;--compression 0:none --language 0:eng --default-track 0:0 movie.en.idx&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:This includes all tracks from the &amp;lt;code&amp;gt;movie.en.idx&amp;lt;/code&amp;gt; file which is a single subtitle track in the English language. The “--default-track 0:0” specifies that the included track with the index 0 (i.e. the only subtitle track in the file) is not a default track. This needs to be specified for all subtitles unless you really want to show a certain subtitle as default when a movie starts. This can be used to include forced subtitles for additional foreign languages spoken in a movie, e.g. the Na’vi language in “Avatar”, or Elfish in “The Lord of the Rings.”&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;--compression 0:none --language 0:ger --default-track 0:0 movie.de.idx&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:Includes the German subtitles.&lt;br /&gt;
&lt;br /&gt;
Voilá, &amp;lt;code&amp;gt;movie.mkv&amp;lt;/code&amp;gt; now contains your movie, all audio tracks, and all subtitle tracks that you want to be in there.&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Changing_Matroska_Properties&amp;diff=88</id>
		<title>Changing Matroska Properties</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Changing_Matroska_Properties&amp;diff=88"/>
				<updated>2025-11-23T21:37:17Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Add how to set a language&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Matroska files can have a buttload of internal flags and options, and editing them is actually quite simple.&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
&lt;br /&gt;
For all commands here you need to know which track number you want to work on. That track number is ''n''.&lt;br /&gt;
&lt;br /&gt;
 # mkvinfo file.mkv&lt;br /&gt;
&lt;br /&gt;
== Disabling a Track ==&lt;br /&gt;
&lt;br /&gt;
This is useful if you have a file with more than one audio track, and the player picks the wrong audio track.&lt;br /&gt;
&lt;br /&gt;
 # mkvpropedit file.mkv -e track:''n'' -s flag-enabled=0&lt;br /&gt;
&lt;br /&gt;
== Changing the Default Flag ==&lt;br /&gt;
&lt;br /&gt;
This is useful if you want to turn on a certain subtitle language by default, or you want to change the default language of a file.&lt;br /&gt;
&lt;br /&gt;
''n'' is the number of the track you want to set as default, ''o'' is the number of another track of the same type (audio or subtitle) whose default flag you want to clear. If there is more than one other default track you need to repeat the last section (starting from the ''-e'' flag).&lt;br /&gt;
&lt;br /&gt;
 # mkvpropedit file.mkv -e track:''n'' -s flag-default=1 -e track:''o'' -s flag-default=0 […]&lt;br /&gt;
&lt;br /&gt;
== Setting a Language ==&lt;br /&gt;
&lt;br /&gt;
 # mkvpropedit file.mkv -e track:''n'' -s language=en&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Main_Page&amp;diff=87</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Main_Page&amp;diff=87"/>
				<updated>2025-09-27T16:31:40Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: /* Media */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Contents of this wiki:&lt;br /&gt;
&lt;br /&gt;
== Media ==&lt;br /&gt;
&lt;br /&gt;
* [[Ripping and Encoding DVDs]]&lt;br /&gt;
* [[Encoding DJ Mixes]]&lt;br /&gt;
* [[Changing Matroska Properties]]&lt;br /&gt;
&lt;br /&gt;
=== Photography ===&lt;br /&gt;
&lt;br /&gt;
* [[Capture Images]]&lt;br /&gt;
&lt;br /&gt;
== Styling ==&lt;br /&gt;
&lt;br /&gt;
* [[Quassel Stylesheet]]&lt;br /&gt;
&lt;br /&gt;
== Security ==&lt;br /&gt;
&lt;br /&gt;
* [[Creating Certificates]]&lt;br /&gt;
* [[Mounting Encrypted Home Directories]]&lt;br /&gt;
* [[Using GPG on a remote shell]]&lt;br /&gt;
* [[Miscellaneous Openssl Magic|Miscellaneous &amp;lt;tt&amp;gt;openssl&amp;lt;/tt&amp;gt; magic]]&lt;br /&gt;
&lt;br /&gt;
== Programming ==&lt;br /&gt;
&lt;br /&gt;
* [[Deploying Single Files with Maven]]&lt;br /&gt;
* [[Verifying Header Comments]]&lt;br /&gt;
&lt;br /&gt;
== Media ==&lt;br /&gt;
&lt;br /&gt;
* [[Streaming from PulseAudio Device to Icecast Server]]&lt;br /&gt;
* [[Changing Default Flags in Matroska Files]]&lt;br /&gt;
&lt;br /&gt;
== Administration ==&lt;br /&gt;
&lt;br /&gt;
* [[Fixing USB Keyboard Type]]&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Changing_Default_Flags_in_Matroska_Files&amp;diff=86</id>
		<title>Changing Default Flags in Matroska Files</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Changing_Default_Flags_in_Matroska_Files&amp;diff=86"/>
				<updated>2025-09-27T16:31:34Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Created page with &amp;quot;Sets the second audio track as the default audio track, removing the default flag from the first audio track.   mkvpropedit some-file.mkv --edit track:a1 --set flag-default=0...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sets the second audio track as the default audio track, removing the default flag from the first audio track.&lt;br /&gt;
&lt;br /&gt;
 mkvpropedit some-file.mkv --edit track:a1 --set flag-default=0 --edit track:a2 --set flag-default=1&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Ripping_and_Encoding_DVDs&amp;diff=85</id>
		<title>Ripping and Encoding DVDs</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Ripping_and_Encoding_DVDs&amp;diff=85"/>
				<updated>2025-08-22T13:20:01Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Add decryption step&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Encoding]]&lt;br /&gt;
[[Category:Ripping]]&lt;br /&gt;
[[Category:DVD]]&lt;br /&gt;
This page describes in large detail how to create near perfect DVD rips. “Near perfect” in this context means that the video quality is nearly indistinguishable from the DVD video, and all audio tracks contained in the movie are the AC3 tracks that are contained in the DVD without any reencoding whatsoever.&lt;br /&gt;
&lt;br /&gt;
This page was written ages ago; most of the tools mentioned here probably still exist for Linux (and maybe other systems).&lt;br /&gt;
&lt;br /&gt;
== Copy the Disc and Decrypt It ==&lt;br /&gt;
&lt;br /&gt;
 $ dvdbackup -M -n foo -i /dev/disk123&lt;br /&gt;
&lt;br /&gt;
Obviously, replace *foo* with a short name for the disc you’re trying to rip, and `/dev/disk123` with the actual device name of your DVD drive.&lt;br /&gt;
&lt;br /&gt;
This will create a decrypted version of the complete disc on your harddrive, in a directory named `foo`.&lt;br /&gt;
&lt;br /&gt;
== Copy the Main Title from the DVD ==&lt;br /&gt;
&lt;br /&gt;
First, we need to find out which title is the main title. I recommend storing the output of &amp;lt;code&amp;gt;lsdvd&amp;lt;/code&amp;gt;, too, so that you can look at it later, e. g. for subtitle stream IDs, or other technical information.&lt;br /&gt;
&lt;br /&gt;
 $ lsdvd -x /dev/dvd &amp;gt; movie.txt&lt;br /&gt;
&lt;br /&gt;
Instead of &amp;lt;code&amp;gt;/dev/dvd&amp;lt;/code&amp;gt; you can also use the name of the directory created in the previous stop.&lt;br /&gt;
&lt;br /&gt;
 $ lsdvd -x foo &amp;gt; movie.txt&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;lsdvd&amp;lt;/code&amp;gt; can tell you a lot of things about the DVD in question. Especially the track IDs for audio and subtitle tracks will be interesting later on so try not to forget where you got it from. For now it will tell you the longest title on the disc; usually this is the main title. Copy it to the hard disk using &amp;lt;code&amp;gt;tccat&amp;lt;/code&amp;gt; from the &amp;lt;code&amp;gt;transcode&amp;lt;/code&amp;gt; package:&lt;br /&gt;
&lt;br /&gt;
 $ tccat -i /dev/dvd -T ''&amp;lt;title&amp;gt;'',-1 &amp;gt; movie.mpg&lt;br /&gt;
&lt;br /&gt;
While &amp;lt;code&amp;gt;tccat&amp;lt;/code&amp;gt; is busy you can already perform the next steps.&lt;br /&gt;
&lt;br /&gt;
 $ cp ''/path/to/dvd/''VIDEO_TS/VTS_''&amp;lt;vts&amp;gt;''_0.IFO movie.ifo&lt;br /&gt;
&lt;br /&gt;
This will copy the IFO file for the main title to the disc. This file contains information that is relevant for subtitle conversion. If you do not need subtitles, you can skip this. The VTS number of the main title is listed in the &amp;lt;code&amp;gt;lsdvd -x&amp;lt;/code&amp;gt; output from above and is always two digits long.&lt;br /&gt;
&lt;br /&gt;
 $ dvdxchap -t ''&amp;lt;title&amp;gt;'' /dev/dvd &amp;gt; movie.chap&lt;br /&gt;
&lt;br /&gt;
This will extract the chapter information from the main title into a text file. If you want and if you know the names of the chapters, you can now edit this file.&lt;br /&gt;
&lt;br /&gt;
Now we have to wait until &amp;lt;code&amp;gt;tccat&amp;lt;/code&amp;gt; has finished copying the main title to the hard disk. Encoding the video is the next step as it is bound to take quite some time (depending on your hardware) and the rest of the steps (except for multiplexing, of course) can be performed while the video is being encoded.&lt;br /&gt;
&lt;br /&gt;
== Encode the Video ==&lt;br /&gt;
&lt;br /&gt;
Encoding the video has a lot to do with voodoo. When you try to use Google to find “the best options” to encode a DVD you will find none. Or to be more precise, you will find plenty, and they will all contradict each other. There are about a millions ways to encode video; I will only outline some of them.&lt;br /&gt;
&lt;br /&gt;
=== Using avidemux2 ===&lt;br /&gt;
&lt;br /&gt;
Using avidemux2 gives you a nice user interface and easy selection of all relevant parameters for the encoding process. These are the settings I usually use:&lt;br /&gt;
&lt;br /&gt;
* Video Codec: MPEG-4 ASP (xvid)&lt;br /&gt;
* Constant Quality: 5&lt;br /&gt;
* Some time-hungry options, such as High Motion Estimation, Wide Search for Rate Distortion Optimisation, Quarter Pixel Motion Estimation, and Global Motion Compensation. I don’t really care about how long the encoding takes, I’m interesting in the best possible picture.&lt;br /&gt;
* Most important: The Pixel Aspect Ratio has to be set to “as input”! This allows you to crop black borders off of the image without having to recalculate the new width and height of the image.&lt;br /&gt;
* Also, you do not need to set the width and height of the image. The size of the source material in combination with the Pixel Aspect Ratio will automatically take care that the final video is stretched as necessary. Not resizing the picture will also keep the quality of the video material at its maximum; it will never get better when you resize.&lt;br /&gt;
* Disable all audio tracks, as the input MPEG file still contains all audio tracks from the DVD and they don’t need to be encoded.&lt;br /&gt;
&lt;br /&gt;
Now save the file to &amp;lt;code&amp;gt;movie.avi&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Using mencoder ===&lt;br /&gt;
&lt;br /&gt;
Using a command line tool such as &amp;lt;code&amp;gt;mencoder&amp;lt;/code&amp;gt; gives you the possibility to encode on a remote machine, e.g. on your desktop machine when you’re not at home, or on a headless server somewhere in a data warehouse or your basement. Basically, the &amp;lt;code&amp;gt;mencoder&amp;lt;/code&amp;gt; command line looks like this:&lt;br /&gt;
&lt;br /&gt;
 $ mencoder -o movie.avi movie.mpg -nosound -nosub -noautosub -ovc xvid -xvidencopts fixed_quant=3:qpel:gmc:trellis:vhq=4&lt;br /&gt;
&lt;br /&gt;
This will use the &amp;lt;code&amp;gt;xvid&amp;lt;/code&amp;gt; codec at a fixed quantizer (3), enabling a couple of quality-improving options (quarter pixels, global motion compensation, Trellis quantization, motion search algorithm), omitting all audio tracks and subtitles from the original MPEG file.&lt;br /&gt;
&lt;br /&gt;
 $ mencoder -o movie.avi movie.mpg -nosound -nosub -noautosub -ovc xvid -xvidencopts qpel:gmc:trellis:vhq=4:cartoon:interlacing:pass=1:bitrate=-307200&lt;br /&gt;
&lt;br /&gt;
This will used the &amp;lt;code&amp;gt;xvid&amp;lt;/code&amp;gt; codec again but tell it to optimize for interlaced cartoon material, using 2-pass encoding heading for a total amount of 307200 KiB of video stream. (You need to run this command again, substituting &amp;lt;code&amp;gt;:pass=2&amp;lt;/code&amp;gt; at the appropriate place.)&lt;br /&gt;
&lt;br /&gt;
 $ mencoder -o movie.avi movie.mpg -nosound -nosub -noautosub -ovc xvid -xvidencopts fixed_quant=3:qpel:gmc:trellis:vhq=4 -vf pullup,softskip -ofps 24000/1001&lt;br /&gt;
&lt;br /&gt;
This will perform an inverse telecine transformation, reducing NTSC material from 30000/1001 (aka 29.97) fps to 24000/1001 (aka 23.976) fps.&lt;br /&gt;
&lt;br /&gt;
 $ mencoder -o movie.avi movie.mpg -nosound -nosub -noautosub -vf crop=720:416:0:80 -ovc x264 -x264encopts crf=18:preset=veryslow:threads=1&lt;br /&gt;
&lt;br /&gt;
This encodes the video with the x264 codec with a single thread and the “veryslow” preset (which is indeed very slow) and crops the video (reducing the height to 416 pixels, starting at pixel 80).&lt;br /&gt;
&lt;br /&gt;
=== Using x264 ===&lt;br /&gt;
&lt;br /&gt;
It is also possible to use the h.264 encoder &amp;lt;tt&amp;gt;x264&amp;lt;/tt&amp;gt; directly.&lt;br /&gt;
&lt;br /&gt;
 $ x264 --index movie.mpg.idx --no-interlaced --crf 18 --preset veryslow --threads 2 --vf crop:0,80,0,80 -o movie.avi movie.mpg&lt;br /&gt;
&lt;br /&gt;
=== Using avconv ===&lt;br /&gt;
&lt;br /&gt;
And last but not least there is also &amp;lt;tt&amp;gt;avconv&amp;lt;/tt&amp;gt; (formerly knows as &amp;lt;tt&amp;gt;ffmpeg&amp;lt;/tt&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 $ avconv -y -i movie.mpg -map 0:v -map 0:s -map 0:a:1 -map 0:a:0 -map 0:a:2 -map 0:a:3 -c copy -c:v libx264 -crf 15 -trellis 1 -tune animation -vf yadif,crop=704:560:10:6 movie.mkv&lt;br /&gt;
&lt;br /&gt;
This will overwrite any output files (&amp;lt;tt&amp;gt;-y&amp;lt;/tt&amp;gt;) when encoding the input file &amp;lt;tt&amp;gt;movie.mpg&amp;lt;/tt&amp;gt; (&amp;lt;tt&amp;gt;-i movie.mpg&amp;lt;/tt&amp;gt;). It will use all video tracks (&amp;lt;tt&amp;gt;-map 0:v&amp;lt;/tt&amp;gt;), all subtitle tracks (&amp;lt;tt&amp;gt;-map 0:s&amp;lt;/tt&amp;gt;), and the first four audio tracks in the order 1, 0, 2, 3 (&amp;lt;tt&amp;gt;-map 0:a:1 -map 0:a:0 -map 0:a:2 -map 0:a:3&amp;lt;/tt&amp;gt;). The default codec for all tracks is the “copy” codec (&amp;lt;tt&amp;gt;-c copy&amp;lt;/tt&amp;gt;) but the video track is encoded using the x264 encoder (&amp;lt;tt&amp;gt;-c:v libx264&amp;lt;/tt&amp;gt;). &amp;lt;tt&amp;gt;-crf 15&amp;lt;/tt&amp;gt; tells the x264 encoder to use a Constant Rate Factor of 15, &amp;lt;tt&amp;gt;-trellis 1&amp;lt;/tt&amp;gt; activates Trellis optimization, &amp;lt;tt&amp;gt;-tune animation&amp;lt;/tt&amp;gt; tunes the encoder setting for animated content. Two video filters are then added for the output file: “yadif” is a deinterlacing filter with very good results, and “crop=704:560:10:6” will only encode a window with the dimensions 704×560, starting at the coordinates (10,6). The result is written to the file &amp;lt;tt&amp;gt;movie.mkv&amp;lt;/tt&amp;gt;; the appropriate muxer for Matroska video is automatically selected.&lt;br /&gt;
&lt;br /&gt;
== Extract Subtitle Tracks ==&lt;br /&gt;
&lt;br /&gt;
After &amp;lt;code&amp;gt;tccat&amp;lt;/code&amp;gt; has finished copying the movie to your hard disk you can extract the subtitle tracks. This is necessary because they have to be converted before &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; can handle them.&lt;br /&gt;
&lt;br /&gt;
 $ tcextract -i movie.mpg -a 0x20 -x ps1 &amp;gt; movie.en.ps1&lt;br /&gt;
&lt;br /&gt;
The ID of the subtitle track (here: 0x20) can be found in the output of &amp;lt;code&amp;gt;lsdvd&amp;lt;/code&amp;gt;. Choose the subtitles you like and extract them one after another.&lt;br /&gt;
&lt;br /&gt;
Now they have to be converted to the VobSub format:&lt;br /&gt;
&lt;br /&gt;
 $ subtitle2vobsub -p movie.en.ps1 -i movie.ifo -o movie.en&lt;br /&gt;
&lt;br /&gt;
This will create the files &amp;lt;code&amp;gt;movie.en.sub&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;movie.en.idx&amp;lt;/code&amp;gt;. Both are necessary for &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; to do its magic.&lt;br /&gt;
&lt;br /&gt;
We’re almost there.&lt;br /&gt;
&lt;br /&gt;
== Mux the Final Video ==&lt;br /&gt;
&lt;br /&gt;
Now all that we have created has to be put together.&lt;br /&gt;
&lt;br /&gt;
 $ mkvmerge -o movie.mkv --title &amp;quot;Movie&amp;quot; --chapter-language eng --chapters movie.chap \&lt;br /&gt;
 --compression 0:none movie.avi \&lt;br /&gt;
 -D -a 1,2 --compression 1:none --language 1:eng --compression 2:none --language 2:ger --default-duration 0:25fps movie.mpg \&lt;br /&gt;
 --compression 0:none --language 0:eng --default-track 0:0 movie.en.idx \&lt;br /&gt;
 --compression 0:none --language 0:ger --default-track 0:0 movie.de.idx&lt;br /&gt;
&lt;br /&gt;
Yes, this command line needs some explaining.&lt;br /&gt;
&lt;br /&gt;
;-o movie.mkv&lt;br /&gt;
:This is the output file that we are creating.&lt;br /&gt;
&lt;br /&gt;
;--title “Movie“&lt;br /&gt;
:Here you can specify the title of the movie. This parameter is optional.&lt;br /&gt;
&lt;br /&gt;
;--chapter-language eng --chapters movie.chap&lt;br /&gt;
:This includes the chapter definitions from the given file and also specifies that the lanuage of the chapters file is English.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;--compression 0:none movie.avi&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:Includes all tracks from the given file in the output file. The “--compression 0:none” parameters tells &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; to not use any kind of header compression. As we only stored a video track in &amp;lt;code&amp;gt;movie.avi&amp;lt;/code&amp;gt; we do not need to restrict inclusion of this file. If you accidentally encoded an audio track as well, you need to specify “-A” before “movie.avi” - this will tell &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; to not include any audio tracks.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;-D -a 1,2 --compression 1:none --language 1:eng --compression 2:none --language 2:ger --default-duration 0:25fps movie.mpg&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:These parameters tell &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; to include no video track (“-D”) and audio tracks 1 and 2 (“-a 1,2”) from the file &amp;lt;code&amp;gt;movie.mpg&amp;lt;/code&amp;gt;. This is our source file from the DVD and thus contains the MPEG-2 video stream that we reencoded earlier, as well as the original AC3 audio tracks that we are interested in. Note that the audio tracks are tracks 1 and 2 because track 0 in the file &amp;lt;code&amp;gt;movie.mpg&amp;lt;/code&amp;gt; is the video track! Use “&amp;lt;code&amp;gt;mkvmerge --identify movie.mpg&amp;lt;/code&amp;gt;” to list all tracks that &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; recognizes. Also, these parameters tell &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; that audio track 1 is English, and audio track 2 is German. If you want to include more than two audio tracks you need to repeat the respective parameters for all additional audio tracks.&lt;br /&gt;
:If you are muxing a video file that consists of an AVC/h.264 stream you need to specify the duration of a frame because the stream itself does not contain that information; &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; assumes a default of 25 FPS.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;--compression 0:none --language 0:eng --default-track 0:0 movie.en.idx&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:This includes all tracks from the &amp;lt;code&amp;gt;movie.en.idx&amp;lt;/code&amp;gt; file which is a single subtitle track in the English language. The “--default-track 0:0” specifies that the included track with the index 0 (i.e. the only subtitle track in the file) is not a default track. This needs to be specified for all subtitles unless you really want to show a certain subtitle as default when a movie starts. This can be used to include forced subtitles for additional foreign languages spoken in a movie, e.g. the Na’vi language in “Avatar”, or Elfish in “The Lord of the Rings.”&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;--compression 0:none --language 0:ger --default-track 0:0 movie.de.idx&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:Includes the German subtitles.&lt;br /&gt;
&lt;br /&gt;
Voilá, &amp;lt;code&amp;gt;movie.mkv&amp;lt;/code&amp;gt; now contains your movie, all audio tracks, and all subtitle tracks that you want to be in there.&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Deploying_Single_Files_with_Maven&amp;diff=84</id>
		<title>Deploying Single Files with Maven</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Deploying_Single_Files_with_Maven&amp;diff=84"/>
				<updated>2025-03-01T20:30:48Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Include pomFile parameter in deploy-file call&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In order to deploy single files that are not controlled by Maven, you need the &amp;lt;tt&amp;gt;deploy:deploy-file&amp;lt;/tt&amp;gt; goal.&lt;br /&gt;
&lt;br /&gt;
    # mvn -Dfile=''file'' -DgroupId=''groupId'' -DartifactId=''artifactId'' -Dpackaging=jar -Dversion=''version'' -DrepositoryId=''repositoryId'' -Dsources=''source.jar'' -Durl=scpexe://''host''/''path'' -DpomFile=pom.xml deploy:deploy-file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- -Durl=scpexe://maven.pterodactylus.net/var/www/pterodactylus.net/maven --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The repository ID is necessary in case you have authentication information defined for your repository. You might additionally also need the following in your &amp;lt;code&amp;gt;pom.xml&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;project&amp;gt;&lt;br /&gt;
      &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;&lt;br /&gt;
      &amp;lt;groupId&amp;gt;''groupId''&amp;lt;/groupId&amp;gt;&lt;br /&gt;
      &amp;lt;artifactId&amp;gt;''artifactId''&amp;lt;/artifactId&amp;gt;&lt;br /&gt;
      &amp;lt;version&amp;gt;''version''&amp;lt;/version&amp;gt;&lt;br /&gt;
      &amp;lt;build&amp;gt;&lt;br /&gt;
        &amp;lt;extensions&amp;gt;&lt;br /&gt;
          &amp;lt;extension&amp;gt;&lt;br /&gt;
            &amp;lt;groupId&amp;gt;org.apache.maven.wagon&amp;lt;/groupId&amp;gt;&lt;br /&gt;
            &amp;lt;artifactId&amp;gt;wagon-ssh-external&amp;lt;/artifactId&amp;gt;&lt;br /&gt;
            &amp;lt;version&amp;gt;1.0&amp;lt;/version&amp;gt;&lt;br /&gt;
          &amp;lt;/extension&amp;gt;&lt;br /&gt;
        &amp;lt;/extensions&amp;gt;&lt;br /&gt;
      &amp;lt;/build&amp;gt;&lt;br /&gt;
    &amp;lt;/project&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And most definitely ''should'' you add a &amp;lt;code&amp;gt;pom.xml&amp;lt;/code&amp;gt; in order to declare dependencies of the file you are deploying.&lt;br /&gt;
&lt;br /&gt;
To install a file only locally, use:&lt;br /&gt;
&lt;br /&gt;
    # mvn install:install-file -Dfile=''file'' -DgroupId=''groupId'' -DartifactId=''artifactId'' -Dpackaging=jar -Dversion=''version''&lt;br /&gt;
&lt;br /&gt;
To additionally install the sources for a JAR file, use:&lt;br /&gt;
&lt;br /&gt;
    # mvn install:install-file -Dfile=''file'' -DgroupId=''groupId'' -DartifactId=''artifactId'' -Dpackaging=jar -Dversion=''version'' -Dclassifier=sources&lt;br /&gt;
&lt;br /&gt;
[http://maven.apache.org/plugins/maven-install-plugin/install-file-mojo.html Other userful options] include &amp;lt;tt&amp;gt;localRepositoryPath&amp;lt;/tt&amp;gt;.&lt;br /&gt;
[[Category:Programming]]&lt;br /&gt;
[[Category:Java]]&lt;br /&gt;
[[Category:Maven]]&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Deploying_Single_Files_with_Maven&amp;diff=83</id>
		<title>Deploying Single Files with Maven</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Deploying_Single_Files_with_Maven&amp;diff=83"/>
				<updated>2024-10-02T09:46:55Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Add hint about adding dependencies to a pom.xml for the file being deployed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In order to deploy single files that are not controlled by Maven, you need the &amp;lt;tt&amp;gt;deploy:deploy-file&amp;lt;/tt&amp;gt; goal.&lt;br /&gt;
&lt;br /&gt;
    # mvn -Dfile=''file'' -DgroupId=''groupId'' -DartifactId=''artifactId'' -Dpackaging=jar -Dversion=''version'' -DrepositoryId=''repositoryId'' -Dsources=''source.jar'' -Durl=scpexe://''host''/''path'' deploy:deploy-file&lt;br /&gt;
&lt;br /&gt;
The repository ID is necessary in case you have authentication information defined for your repository. You might additionally also need the following in your &amp;lt;code&amp;gt;pom.xml&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;project&amp;gt;&lt;br /&gt;
      &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;&lt;br /&gt;
      &amp;lt;groupId&amp;gt;''groupId''&amp;lt;/groupId&amp;gt;&lt;br /&gt;
      &amp;lt;artifactId&amp;gt;''artifactId''&amp;lt;/artifactId&amp;gt;&lt;br /&gt;
      &amp;lt;version&amp;gt;''version''&amp;lt;/version&amp;gt;&lt;br /&gt;
      &amp;lt;build&amp;gt;&lt;br /&gt;
        &amp;lt;extensions&amp;gt;&lt;br /&gt;
          &amp;lt;extension&amp;gt;&lt;br /&gt;
            &amp;lt;groupId&amp;gt;org.apache.maven.wagon&amp;lt;/groupId&amp;gt;&lt;br /&gt;
            &amp;lt;artifactId&amp;gt;wagon-ssh-external&amp;lt;/artifactId&amp;gt;&lt;br /&gt;
            &amp;lt;version&amp;gt;1.0&amp;lt;/version&amp;gt;&lt;br /&gt;
          &amp;lt;/extension&amp;gt;&lt;br /&gt;
        &amp;lt;/extensions&amp;gt;&lt;br /&gt;
      &amp;lt;/build&amp;gt;&lt;br /&gt;
    &amp;lt;/project&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And most definitely ''should'' you add a &amp;lt;code&amp;gt;pom.xml&amp;lt;/code&amp;gt; in order to declare dependencies of the file you are deploying.&lt;br /&gt;
&lt;br /&gt;
To install a file only locally, use:&lt;br /&gt;
&lt;br /&gt;
    # mvn install:install-file -Dfile=''file'' -DgroupId=''groupId'' -DartifactId=''artifactId'' -Dpackaging=jar -Dversion=''version''&lt;br /&gt;
&lt;br /&gt;
To additionally install the sources for a JAR file, use:&lt;br /&gt;
&lt;br /&gt;
    # mvn install:install-file -Dfile=''file'' -DgroupId=''groupId'' -DartifactId=''artifactId'' -Dpackaging=jar -Dversion=''version'' -Dclassifier=sources&lt;br /&gt;
&lt;br /&gt;
[http://maven.apache.org/plugins/maven-install-plugin/install-file-mojo.html Other userful options] include &amp;lt;tt&amp;gt;localRepositoryPath&amp;lt;/tt&amp;gt;.&lt;br /&gt;
[[Category:Programming]]&lt;br /&gt;
[[Category:Java]]&lt;br /&gt;
[[Category:Maven]]&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Fixing_USB_Keyboard_Type&amp;diff=82</id>
		<title>Fixing USB Keyboard Type</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Fixing_USB_Keyboard_Type&amp;diff=82"/>
				<updated>2024-02-26T08:36:35Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Where the fuck did I get that JSON listing from?! Anyway, show XML export.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;First, export the current keyboard settings:&lt;br /&gt;
&lt;br /&gt;
 # defaults export /Library/Preferences/com.apple.keyboardtype - &amp;gt; keyboardtype&lt;br /&gt;
&lt;br /&gt;
Then, find USB vendor and product ID of your keyboard:&lt;br /&gt;
&lt;br /&gt;
 # lsusb&lt;br /&gt;
 Bus 000 Device 001: ID 0bda:2172 Realtek Semiconductor Corp. BillBoard Device  Serial: 00000000000000000&lt;br /&gt;
 Bus 001 Device 001: ID 2109:0822 VIA Labs, Inc. USB3.1 Hub  Serial: 000000001&lt;br /&gt;
 Bus 001 Device 003: ID 05e3:0626 Genesys Logic, Inc. USB3.1 Hub&lt;br /&gt;
 Bus 001 Device 004: ID 0b95:1790 ASIX Electronics Corporation AX88179A  Serial: 00000000000001&lt;br /&gt;
 Bus 001 Device 006: ID 2537:1081 2537 NS1081  Serial: 0123456789ABCDE&lt;br /&gt;
 Bus 001 Device 002: ID 2109:2822 VIA Labs, Inc. USB2.0 Hub  Serial: 000000001&lt;br /&gt;
 Bus 001 Device 008: ID 0bda:8152 Realtek Semiconductor Corp. USB 10/100 LAN  Serial: 00E04C36001A&lt;br /&gt;
 Bus 001 Device 007: ID 14cd:8601 MOAI ELECTRONICS CORPORATION USB 2.0 Hub&lt;br /&gt;
 Bus 001 Device 009: ID 05e3:0610 Genesys Logic, Inc. USB2.1 Hub&lt;br /&gt;
 Bus 001 Device 012: ID 25a7:fa61 25a7 2.4G Receiver&lt;br /&gt;
 Bus 001 Device 011: ID 04d9:a1dd Holtek Semiconductor, Inc. USB-HID Keyboard&lt;br /&gt;
 Bus 001 Device 010: ID 0bda:0567 Realtek Semiconductor Corp. WEB CAMERA M9 Pro  Serial: 200901010001&lt;br /&gt;
 Bus 001 Device 005: ID 291a:8388 291a Anker USB-C Hub Device  Serial: 0000000000000001&lt;br /&gt;
 Bus 000 Device 000: ID 0bda:2172 Realtek Semiconductor Corp. USB 3.1 Bus&lt;br /&gt;
 Bus 000 Device 000: ID 2109:0822 VIA Labs, Inc. USB 3.1 Bus&lt;br /&gt;
&lt;br /&gt;
The keyboard is the USB device &amp;lt;code&amp;gt;04d9:a1dd&amp;lt;/code&amp;gt;. Convert the two IDs to decimal numbers; the product ID is 41437, and the vendor ID is 1241. &lt;br /&gt;
&lt;br /&gt;
Now, open the &amp;lt;code&amp;gt;keyboardtype&amp;lt;/code&amp;gt; file, and look for entry that has your product and vendor ID in decimal:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple//DTD PLIST 1.0//EN&amp;quot; &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;keyboardtype&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;dict&amp;gt;&lt;br /&gt;
                 &amp;lt;key&amp;gt;34053-16700-0&amp;lt;/key&amp;gt;&lt;br /&gt;
                 &amp;lt;integer&amp;gt;41&amp;lt;/integer&amp;gt;&lt;br /&gt;
                 &amp;lt;key&amp;gt;400-9610-0&amp;lt;/key&amp;gt;&lt;br /&gt;
                 &amp;lt;integer&amp;gt;41&amp;lt;/integer&amp;gt;&lt;br /&gt;
                 &amp;lt;key&amp;gt;41437-1241-0&amp;lt;/key&amp;gt;&lt;br /&gt;
                 &amp;lt;integer&amp;gt;41&amp;lt;/integer&amp;gt;&lt;br /&gt;
                 &amp;lt;key&amp;gt;50475-1133-0&amp;lt;/key&amp;gt;&lt;br /&gt;
                 &amp;lt;integer&amp;gt;41&amp;lt;/integer&amp;gt;&lt;br /&gt;
                 &amp;lt;key&amp;gt;64097-9639-0&amp;lt;/key&amp;gt;&lt;br /&gt;
                 &amp;lt;integer&amp;gt;41&amp;lt;/integer&amp;gt;&lt;br /&gt;
         &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The number represents the type of keyboard (41 is ISO). Change the number to the type you want the keyboard to be.&lt;br /&gt;
&lt;br /&gt;
Import the changed file back:&lt;br /&gt;
&lt;br /&gt;
 # sudo defaults import /Library/Preferences/com.apple.keyboardtype - &amp;lt; keyboardtype&lt;br /&gt;
&lt;br /&gt;
Now unplug the keyboard and plug it back in.&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Fixing_USB_Keyboard_Type&amp;diff=81</id>
		<title>Fixing USB Keyboard Type</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Fixing_USB_Keyboard_Type&amp;diff=81"/>
				<updated>2024-02-26T08:34:04Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Fix command to get XML export&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;First, export the current keyboard settings:&lt;br /&gt;
&lt;br /&gt;
 # defaults export /Library/Preferences/com.apple.keyboardtype - &amp;gt; keyboardtype&lt;br /&gt;
&lt;br /&gt;
Then, find USB vendor and product ID of your keyboard:&lt;br /&gt;
&lt;br /&gt;
 # lsusb&lt;br /&gt;
 Bus 000 Device 001: ID 0bda:2172 Realtek Semiconductor Corp. BillBoard Device  Serial: 00000000000000000&lt;br /&gt;
 Bus 001 Device 001: ID 2109:0822 VIA Labs, Inc. USB3.1 Hub  Serial: 000000001&lt;br /&gt;
 Bus 001 Device 003: ID 05e3:0626 Genesys Logic, Inc. USB3.1 Hub&lt;br /&gt;
 Bus 001 Device 004: ID 0b95:1790 ASIX Electronics Corporation AX88179A  Serial: 00000000000001&lt;br /&gt;
 Bus 001 Device 006: ID 2537:1081 2537 NS1081  Serial: 0123456789ABCDE&lt;br /&gt;
 Bus 001 Device 002: ID 2109:2822 VIA Labs, Inc. USB2.0 Hub  Serial: 000000001&lt;br /&gt;
 Bus 001 Device 008: ID 0bda:8152 Realtek Semiconductor Corp. USB 10/100 LAN  Serial: 00E04C36001A&lt;br /&gt;
 Bus 001 Device 007: ID 14cd:8601 MOAI ELECTRONICS CORPORATION USB 2.0 Hub&lt;br /&gt;
 Bus 001 Device 009: ID 05e3:0610 Genesys Logic, Inc. USB2.1 Hub&lt;br /&gt;
 Bus 001 Device 012: ID 25a7:fa61 25a7 2.4G Receiver&lt;br /&gt;
 Bus 001 Device 011: ID 04d9:a1dd Holtek Semiconductor, Inc. USB-HID Keyboard&lt;br /&gt;
 Bus 001 Device 010: ID 0bda:0567 Realtek Semiconductor Corp. WEB CAMERA M9 Pro  Serial: 200901010001&lt;br /&gt;
 Bus 001 Device 005: ID 291a:8388 291a Anker USB-C Hub Device  Serial: 0000000000000001&lt;br /&gt;
 Bus 000 Device 000: ID 0bda:2172 Realtek Semiconductor Corp. USB 3.1 Bus&lt;br /&gt;
 Bus 000 Device 000: ID 2109:0822 VIA Labs, Inc. USB 3.1 Bus&lt;br /&gt;
&lt;br /&gt;
The keyboard is the USB device &amp;lt;code&amp;gt;04d9:a1dd&amp;lt;/code&amp;gt;. Convert the two IDs to decimal numbers; the product ID is 41437, and the vendor ID is 1241. &lt;br /&gt;
&lt;br /&gt;
Now, open the &amp;lt;code&amp;gt;keyboardtype&amp;lt;/code&amp;gt; file, and look for entry that has your product and vendor ID in decimal:&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
     &amp;quot;41254-1241-0&amp;quot; = 40;&lt;br /&gt;
     &amp;quot;41437-1241-0&amp;quot; = 43;&lt;br /&gt;
     &amp;quot;41521-1241-0&amp;quot; = 41;&lt;br /&gt;
     &amp;quot;48879-65261-0&amp;quot; = 40;&lt;br /&gt;
     &amp;quot;50475-1133-0&amp;quot; = 41;&lt;br /&gt;
     &amp;quot;61453-65261-0&amp;quot; = 40;&lt;br /&gt;
     &amp;quot;64097-9639-0&amp;quot; = 43;&lt;br /&gt;
     &amp;quot;754-5215-0&amp;quot; = 43;&lt;br /&gt;
     &amp;quot;763-5215-0&amp;quot; = 43;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The number represents the type of keyboard (41 is ISO). Change the number to the type you want the keyboard to be.&lt;br /&gt;
&lt;br /&gt;
Import the changed file back:&lt;br /&gt;
&lt;br /&gt;
 # sudo defaults import /Library/Preferences/com.apple.keyboardtype - &amp;lt; keyboardtype&lt;br /&gt;
&lt;br /&gt;
Now unplug the keyboard and plug it back in.&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Fixing_USB_Keyboard_Type&amp;diff=80</id>
		<title>Fixing USB Keyboard Type</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Fixing_USB_Keyboard_Type&amp;diff=80"/>
				<updated>2024-02-09T18:11:57Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Created page with &amp;quot;First, export the current keyboard settings:   # defaults export /Library/Preferences/com.apple.keyboardtype keyboardtype  Then, find USB vendor and product ID of your keyboar...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;First, export the current keyboard settings:&lt;br /&gt;
&lt;br /&gt;
 # defaults export /Library/Preferences/com.apple.keyboardtype keyboardtype&lt;br /&gt;
&lt;br /&gt;
Then, find USB vendor and product ID of your keyboard:&lt;br /&gt;
&lt;br /&gt;
 # lsusb&lt;br /&gt;
 Bus 000 Device 001: ID 0bda:2172 Realtek Semiconductor Corp. BillBoard Device  Serial: 00000000000000000&lt;br /&gt;
 Bus 001 Device 001: ID 2109:0822 VIA Labs, Inc. USB3.1 Hub  Serial: 000000001&lt;br /&gt;
 Bus 001 Device 003: ID 05e3:0626 Genesys Logic, Inc. USB3.1 Hub&lt;br /&gt;
 Bus 001 Device 004: ID 0b95:1790 ASIX Electronics Corporation AX88179A  Serial: 00000000000001&lt;br /&gt;
 Bus 001 Device 006: ID 2537:1081 2537 NS1081  Serial: 0123456789ABCDE&lt;br /&gt;
 Bus 001 Device 002: ID 2109:2822 VIA Labs, Inc. USB2.0 Hub  Serial: 000000001&lt;br /&gt;
 Bus 001 Device 008: ID 0bda:8152 Realtek Semiconductor Corp. USB 10/100 LAN  Serial: 00E04C36001A&lt;br /&gt;
 Bus 001 Device 007: ID 14cd:8601 MOAI ELECTRONICS CORPORATION USB 2.0 Hub&lt;br /&gt;
 Bus 001 Device 009: ID 05e3:0610 Genesys Logic, Inc. USB2.1 Hub&lt;br /&gt;
 Bus 001 Device 012: ID 25a7:fa61 25a7 2.4G Receiver&lt;br /&gt;
 Bus 001 Device 011: ID 04d9:a1dd Holtek Semiconductor, Inc. USB-HID Keyboard&lt;br /&gt;
 Bus 001 Device 010: ID 0bda:0567 Realtek Semiconductor Corp. WEB CAMERA M9 Pro  Serial: 200901010001&lt;br /&gt;
 Bus 001 Device 005: ID 291a:8388 291a Anker USB-C Hub Device  Serial: 0000000000000001&lt;br /&gt;
 Bus 000 Device 000: ID 0bda:2172 Realtek Semiconductor Corp. USB 3.1 Bus&lt;br /&gt;
 Bus 000 Device 000: ID 2109:0822 VIA Labs, Inc. USB 3.1 Bus&lt;br /&gt;
&lt;br /&gt;
The keyboard is the USB device &amp;lt;code&amp;gt;04d9:a1dd&amp;lt;/code&amp;gt;. Convert the two IDs to decimal numbers; the product ID is 41437, and the vendor ID is 1241. &lt;br /&gt;
&lt;br /&gt;
Now, open the &amp;lt;code&amp;gt;keyboardtype&amp;lt;/code&amp;gt; file, and look for entry that has your product and vendor ID in decimal:&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
     &amp;quot;41254-1241-0&amp;quot; = 40;&lt;br /&gt;
     &amp;quot;41437-1241-0&amp;quot; = 43;&lt;br /&gt;
     &amp;quot;41521-1241-0&amp;quot; = 41;&lt;br /&gt;
     &amp;quot;48879-65261-0&amp;quot; = 40;&lt;br /&gt;
     &amp;quot;50475-1133-0&amp;quot; = 41;&lt;br /&gt;
     &amp;quot;61453-65261-0&amp;quot; = 40;&lt;br /&gt;
     &amp;quot;64097-9639-0&amp;quot; = 43;&lt;br /&gt;
     &amp;quot;754-5215-0&amp;quot; = 43;&lt;br /&gt;
     &amp;quot;763-5215-0&amp;quot; = 43;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The number represents the type of keyboard (41 is ISO). Change the number to the type you want the keyboard to be.&lt;br /&gt;
&lt;br /&gt;
Import the changed file back:&lt;br /&gt;
&lt;br /&gt;
 # sudo defaults import /Library/Preferences/com.apple.keyboardtype - &amp;lt; keyboardtype&lt;br /&gt;
&lt;br /&gt;
Now unplug the keyboard and plug it back in.&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Main_Page&amp;diff=79</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Main_Page&amp;diff=79"/>
				<updated>2024-02-09T16:26:39Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Contents of this wiki:&lt;br /&gt;
&lt;br /&gt;
== Media ==&lt;br /&gt;
&lt;br /&gt;
* [[Ripping and Encoding DVDs]]&lt;br /&gt;
* [[Encoding DJ Mixes]]&lt;br /&gt;
* [[Changing Matroska Properties]]&lt;br /&gt;
&lt;br /&gt;
=== Photography ===&lt;br /&gt;
&lt;br /&gt;
* [[Capture Images]]&lt;br /&gt;
&lt;br /&gt;
== Styling ==&lt;br /&gt;
&lt;br /&gt;
* [[Quassel Stylesheet]]&lt;br /&gt;
&lt;br /&gt;
== Security ==&lt;br /&gt;
&lt;br /&gt;
* [[Creating Certificates]]&lt;br /&gt;
* [[Mounting Encrypted Home Directories]]&lt;br /&gt;
* [[Using GPG on a remote shell]]&lt;br /&gt;
* [[Miscellaneous Openssl Magic|Miscellaneous &amp;lt;tt&amp;gt;openssl&amp;lt;/tt&amp;gt; magic]]&lt;br /&gt;
&lt;br /&gt;
== Programming ==&lt;br /&gt;
&lt;br /&gt;
* [[Deploying Single Files with Maven]]&lt;br /&gt;
* [[Verifying Header Comments]]&lt;br /&gt;
&lt;br /&gt;
== Media ==&lt;br /&gt;
&lt;br /&gt;
* [[Streaming from PulseAudio Device to Icecast Server]]&lt;br /&gt;
&lt;br /&gt;
== Administration ==&lt;br /&gt;
&lt;br /&gt;
* [[Fixing USB Keyboard Type]]&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Deploying_Single_Files_with_Maven&amp;diff=78</id>
		<title>Deploying Single Files with Maven</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Deploying_Single_Files_with_Maven&amp;diff=78"/>
				<updated>2021-05-21T09:11:39Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Add hints about other options, such as the path to the local repository.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In order to deploy single files that are not controlled by Maven, you need the &amp;lt;tt&amp;gt;deploy:deploy-file&amp;lt;/tt&amp;gt; goal.&lt;br /&gt;
&lt;br /&gt;
    # mvn -Dfile=''file'' -DgroupId=''groupId'' -DartifactId=''artifactId'' -Dpackaging=jar -Dversion=''version'' -DrepositoryId=''repositoryId'' -Dsources=''source.jar'' -Durl=scpexe://''host''/''path'' deploy:deploy-file&lt;br /&gt;
&lt;br /&gt;
The repository ID is necessary in case you have authentication information defined for your repository. You might additionally also need the following in your &amp;lt;code&amp;gt;pom.xml&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;project&amp;gt;&lt;br /&gt;
      &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;&lt;br /&gt;
      &amp;lt;groupId&amp;gt;''groupId''&amp;lt;/groupId&amp;gt;&lt;br /&gt;
      &amp;lt;artifactId&amp;gt;''artifactId''&amp;lt;/artifactId&amp;gt;&lt;br /&gt;
      &amp;lt;version&amp;gt;''version''&amp;lt;/version&amp;gt;&lt;br /&gt;
      &amp;lt;build&amp;gt;&lt;br /&gt;
        &amp;lt;extensions&amp;gt;&lt;br /&gt;
          &amp;lt;extension&amp;gt;&lt;br /&gt;
            &amp;lt;groupId&amp;gt;org.apache.maven.wagon&amp;lt;/groupId&amp;gt;&lt;br /&gt;
            &amp;lt;artifactId&amp;gt;wagon-ssh-external&amp;lt;/artifactId&amp;gt;&lt;br /&gt;
            &amp;lt;version&amp;gt;1.0&amp;lt;/version&amp;gt;&lt;br /&gt;
          &amp;lt;/extension&amp;gt;&lt;br /&gt;
        &amp;lt;/extensions&amp;gt;&lt;br /&gt;
      &amp;lt;/build&amp;gt;&lt;br /&gt;
    &amp;lt;/project&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To install a file only locally, use:&lt;br /&gt;
&lt;br /&gt;
    # mvn install:install-file -Dfile=''file'' -DgroupId=''groupId'' -DartifactId=''artifactId'' -Dpackaging=jar -Dversion=''version''&lt;br /&gt;
&lt;br /&gt;
To additionally install the sources for a JAR file, use:&lt;br /&gt;
&lt;br /&gt;
    # mvn install:install-file -Dfile=''file'' -DgroupId=''groupId'' -DartifactId=''artifactId'' -Dpackaging=jar -Dversion=''version'' -Dclassifier=sources&lt;br /&gt;
&lt;br /&gt;
[http://maven.apache.org/plugins/maven-install-plugin/install-file-mojo.html Other userful options] include &amp;lt;tt&amp;gt;localRepositoryPath&amp;lt;/tt&amp;gt;.&lt;br /&gt;
[[Category:Programming]]&lt;br /&gt;
[[Category:Java]]&lt;br /&gt;
[[Category:Maven]]&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Main_Page&amp;diff=77</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Main_Page&amp;diff=77"/>
				<updated>2020-09-20T10:07:37Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: /* Security */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Contents of this wiki:&lt;br /&gt;
&lt;br /&gt;
== Media ==&lt;br /&gt;
&lt;br /&gt;
* [[Ripping and Encoding DVDs]]&lt;br /&gt;
* [[Encoding DJ Mixes]]&lt;br /&gt;
* [[Changing Matroska Properties]]&lt;br /&gt;
&lt;br /&gt;
=== Photography ===&lt;br /&gt;
&lt;br /&gt;
* [[Capture Images]]&lt;br /&gt;
&lt;br /&gt;
== Styling ==&lt;br /&gt;
&lt;br /&gt;
* [[Quassel Stylesheet]]&lt;br /&gt;
&lt;br /&gt;
== Security ==&lt;br /&gt;
&lt;br /&gt;
* [[Creating Certificates]]&lt;br /&gt;
* [[Mounting Encrypted Home Directories]]&lt;br /&gt;
* [[Using GPG on a remote shell]]&lt;br /&gt;
* [[Miscellaneous Openssl Magic|Miscellaneous &amp;lt;tt&amp;gt;openssl&amp;lt;/tt&amp;gt; magic]]&lt;br /&gt;
&lt;br /&gt;
== Programming ==&lt;br /&gt;
&lt;br /&gt;
* [[Deploying Single Files with Maven]]&lt;br /&gt;
* [[Verifying Header Comments]]&lt;br /&gt;
&lt;br /&gt;
== Media ==&lt;br /&gt;
&lt;br /&gt;
* [[Streaming from PulseAudio Device to Icecast Server]]&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Miscellaneous_Openssl_Magic&amp;diff=76</id>
		<title>Miscellaneous Openssl Magic</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Miscellaneous_Openssl_Magic&amp;diff=76"/>
				<updated>2020-09-20T10:07:27Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Created page with &amp;quot;== Check expiration date of your webserver’s SSL certificate ==      # openssl s_client -connect your.web.server:443|openssl x509 -text -noout&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Check expiration date of your webserver’s SSL certificate ==&lt;br /&gt;
&lt;br /&gt;
    # openssl s_client -connect your.web.server:443|openssl x509 -text -noout&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Main_Page&amp;diff=75</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Main_Page&amp;diff=75"/>
				<updated>2019-09-15T16:21:49Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Contents of this wiki:&lt;br /&gt;
&lt;br /&gt;
== Media ==&lt;br /&gt;
&lt;br /&gt;
* [[Ripping and Encoding DVDs]]&lt;br /&gt;
* [[Encoding DJ Mixes]]&lt;br /&gt;
* [[Changing Matroska Properties]]&lt;br /&gt;
&lt;br /&gt;
=== Photography ===&lt;br /&gt;
&lt;br /&gt;
* [[Capture Images]]&lt;br /&gt;
&lt;br /&gt;
== Styling ==&lt;br /&gt;
&lt;br /&gt;
* [[Quassel Stylesheet]]&lt;br /&gt;
&lt;br /&gt;
== Security ==&lt;br /&gt;
&lt;br /&gt;
* [[Creating Certificates]]&lt;br /&gt;
* [[Mounting Encrypted Home Directories]]&lt;br /&gt;
* [[Using GPG on a remote shell]]&lt;br /&gt;
&lt;br /&gt;
== Programming ==&lt;br /&gt;
&lt;br /&gt;
* [[Deploying Single Files with Maven]]&lt;br /&gt;
* [[Verifying Header Comments]]&lt;br /&gt;
&lt;br /&gt;
== Media ==&lt;br /&gt;
&lt;br /&gt;
* [[Streaming from PulseAudio Device to Icecast Server]]&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Streaming_from_PulseAudio_Device_to_Icecast_Server&amp;diff=74</id>
		<title>Streaming from PulseAudio Device to Icecast Server</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Streaming_from_PulseAudio_Device_to_Icecast_Server&amp;diff=74"/>
				<updated>2019-09-15T16:21:33Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Created page with &amp;quot;    $ gst-launch-1.0 pulsesrc device=&amp;quot;${DEVICE}&amp;quot; ! audioconvert ! audio/x-raw,rate=44100,channels=2,format=S16LE ! lamemp3enc bitrate=320 ! shout2send ip=&amp;quot;${HOST}&amp;quot; port=&amp;quot;${POR...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;    $ gst-launch-1.0 pulsesrc device=&amp;quot;${DEVICE}&amp;quot; ! audioconvert ! audio/x-raw,rate=44100,channels=2,format=S16LE ! lamemp3enc bitrate=320 ! shout2send ip=&amp;quot;${HOST}&amp;quot; port=&amp;quot;${PORT}&amp;quot; password=&amp;quot;${PASSWORD}&amp;quot; mount=&amp;quot;${MOUNT}.mp3&amp;quot; description=&amp;quot;${DESCRIPTION}&amp;quot; streamname=&amp;quot;${NAME}&amp;quot;&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Main_Page&amp;diff=73</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Main_Page&amp;diff=73"/>
				<updated>2019-09-04T19:52:13Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Contents of this wiki:&lt;br /&gt;
&lt;br /&gt;
== Media ==&lt;br /&gt;
&lt;br /&gt;
* [[Ripping and Encoding DVDs]]&lt;br /&gt;
* [[Encoding DJ Mixes]]&lt;br /&gt;
* [[Changing Matroska Properties]]&lt;br /&gt;
&lt;br /&gt;
=== Photography ===&lt;br /&gt;
&lt;br /&gt;
* [[Capture Images]]&lt;br /&gt;
&lt;br /&gt;
== Styling ==&lt;br /&gt;
&lt;br /&gt;
* [[Quassel Stylesheet]]&lt;br /&gt;
&lt;br /&gt;
== Security ==&lt;br /&gt;
&lt;br /&gt;
* [[Creating Certificates]]&lt;br /&gt;
* [[Mounting Encrypted Home Directories]]&lt;br /&gt;
* [[Using GPG on a remote shell]]&lt;br /&gt;
&lt;br /&gt;
== Programming ==&lt;br /&gt;
&lt;br /&gt;
* [[Deploying Single Files with Maven]]&lt;br /&gt;
* [[Verifying Header Comments]]&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Main_Page&amp;diff=72</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Main_Page&amp;diff=72"/>
				<updated>2019-09-02T05:13:06Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Contents of this wiki:&lt;br /&gt;
&lt;br /&gt;
== Media ==&lt;br /&gt;
&lt;br /&gt;
* [[Ripping and Encoding DVDs]]&lt;br /&gt;
* [[Encoding DJ Mixes]]&lt;br /&gt;
* [[Changing Matroska Properties]]&lt;br /&gt;
&lt;br /&gt;
=== Photography ===&lt;br /&gt;
&lt;br /&gt;
* [[Capture Images]]&lt;br /&gt;
&lt;br /&gt;
== Styling ==&lt;br /&gt;
&lt;br /&gt;
* [[Quassel Stylesheet]]&lt;br /&gt;
&lt;br /&gt;
== Security ==&lt;br /&gt;
&lt;br /&gt;
* [[Creating Certificates]]&lt;br /&gt;
* [[Mounting Encrypted Home Directories]]&lt;br /&gt;
* [[Using GPG on a remote shell]]&lt;br /&gt;
&lt;br /&gt;
== Programming ==&lt;br /&gt;
&lt;br /&gt;
* [[Deploying Single Files with Maven]]&lt;br /&gt;
* [[Verifying Header Comments]]&lt;br /&gt;
* [[Manually Specify Qt Installation Path on cmake Invocation]]&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Verifying_Header_Comments&amp;diff=71</id>
		<title>Verifying Header Comments</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Verifying_Header_Comments&amp;diff=71"/>
				<updated>2019-02-22T23:18:03Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Adjust for Kotlin source files&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A normal Java source file (in my projects) consists of a header like the following one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * FreenetSone - EditImagePage.java - Copyright © 2010–2012 David Roden&lt;br /&gt;
 *&lt;br /&gt;
…&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It should contain the name of the project and the name of the file. Sometimes, due to refactoring or copy/paste, the filename in the header does not match the name of the file in question. The following bash script will locate those files:&lt;br /&gt;
&lt;br /&gt;
 # grep -r &amp;quot;Copyright&amp;quot; src/ | grep -E &amp;quot;\.(java|kt):&amp;quot; | while read line; do f=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d: -f1)&amp;quot;; c=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d- -f2 | cut -d' ' -f2)&amp;quot;; f2=&amp;quot;$(basename &amp;quot;$f&amp;quot;)&amp;quot;; [ &amp;quot;$c&amp;quot; != &amp;quot;$f2&amp;quot; ] &amp;amp;&amp;amp; echo &amp;quot;$f: $c&amp;quot;; done&lt;br /&gt;
&lt;br /&gt;
And sometimes you even changed the name of the project at some point in the past. Use the following oneliner to find those files that have a different project name than the one you substitute at the end of the command:&lt;br /&gt;
&lt;br /&gt;
 # grep -r &amp;quot;Copyright&amp;quot; src/ | grep -E &amp;quot;\.(java|kt):&amp;quot; | while read line; do f=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d: -f1)&amp;quot;; project=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d' ' -f3)&amp;quot;; [ $project != &amp;quot;''Sone''&amp;quot; ] &amp;amp;&amp;amp; echo &amp;quot;$f: $project&amp;quot;; done&lt;br /&gt;
&lt;br /&gt;
And then there’s the ever-occuring issue with the years in the copyright line. Use this to find files that don’t have the current year as last year in the copyright line.&lt;br /&gt;
&lt;br /&gt;
 # cy=$(date +%Y); grep -r &amp;quot;Copyright&amp;quot; src/ | grep -E &amp;quot;\.(java|kt):&amp;quot; | while read line; do f=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d: -f1)&amp;quot;; v=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d- -f3 | cut -d' ' -f4)&amp;quot;; y=&amp;quot;${v:(-4)}&amp;quot;; if [ &amp;quot;$y&amp;quot; != &amp;quot;$cy&amp;quot; ]; then echo &amp;quot;$f: $y&amp;quot;; fi; done&lt;br /&gt;
&lt;br /&gt;
To update all files that need updating:&lt;br /&gt;
&lt;br /&gt;
 # cy=$(date +%Y); sed -i &amp;quot;&amp;quot; -E -e 's,^( \* .*Copyright © )(&amp;lt;nowiki&amp;gt;[[:digit:]]&amp;lt;/nowiki&amp;gt;{4})(–&amp;lt;nowiki&amp;gt;[[:digit:]]&amp;lt;/nowiki&amp;gt;{4})?(.*)$,\1\2–'$cy'\4,' -- $(grep -r &amp;quot;Copyright&amp;quot; src | grep -E &amp;quot;\.(java|kt):&amp;quot; | while read line; do f=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d: -f1)&amp;quot;; v=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d- -f3 | cut -d' ' -f4)&amp;quot;; y=&amp;quot;${v:(-4)}&amp;quot;; if [ &amp;quot;$y&amp;quot; != &amp;quot;$cy&amp;quot; ]; then echo &amp;quot;$f&amp;quot;; fi; done)&lt;br /&gt;
&lt;br /&gt;
[[Category:Programming]]&lt;br /&gt;
[[Category:Java]]&lt;br /&gt;
[[Category:Shell]]&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Main_Page&amp;diff=70</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Main_Page&amp;diff=70"/>
				<updated>2018-08-03T06:24:22Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Add Using GPG on a remote shell.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Contents of this wiki:&lt;br /&gt;
&lt;br /&gt;
== Media ==&lt;br /&gt;
&lt;br /&gt;
* [[Ripping and Encoding DVDs]]&lt;br /&gt;
* [[Encoding DJ Mixes]]&lt;br /&gt;
* [[Changing Matroska Properties]]&lt;br /&gt;
&lt;br /&gt;
=== Photography ===&lt;br /&gt;
&lt;br /&gt;
* [[Capture Images]]&lt;br /&gt;
&lt;br /&gt;
== Styling ==&lt;br /&gt;
&lt;br /&gt;
* [[Quassel Stylesheet]]&lt;br /&gt;
&lt;br /&gt;
== Security ==&lt;br /&gt;
&lt;br /&gt;
* [[Creating Certificates]]&lt;br /&gt;
* [[Mounting Encrypted Home Directories]]&lt;br /&gt;
* [[Using GPG on a remote shell]]&lt;br /&gt;
&lt;br /&gt;
== Programming ==&lt;br /&gt;
&lt;br /&gt;
* [[Deploying Single Files with Maven]]&lt;br /&gt;
* [[Verifying Header Comments]]&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Using_GPG_on_a_remote_shell&amp;diff=69</id>
		<title>Using GPG on a remote shell</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Using_GPG_on_a_remote_shell&amp;diff=69"/>
				<updated>2018-08-03T06:24:00Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Created page with &amp;quot;Sometimes you need to use &amp;lt;code&amp;gt;gpg&amp;lt;/code&amp;gt; on a remote shell on a machine that is usually operated via a local desktop which in turn means that &amp;lt;code&amp;gt;gpg&amp;lt;/code&amp;gt; is configured...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sometimes you need to use &amp;lt;code&amp;gt;gpg&amp;lt;/code&amp;gt; on a remote shell on a machine that is usually operated via a local desktop which in turn means that &amp;lt;code&amp;gt;gpg&amp;lt;/code&amp;gt; is configured to use the graphical environment to ask for passphrases. That’s not so hot on a remote shell, though.&lt;br /&gt;
&lt;br /&gt;
 PINENTRY_USER_DATA=&amp;quot;USE_CURSES=1&amp;quot; GPG_TTY=$(tty) gpg …&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Main_Page&amp;diff=68</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Main_Page&amp;diff=68"/>
				<updated>2018-07-03T18:13:52Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Add my Quassel stylesheet&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Contents of this wiki:&lt;br /&gt;
&lt;br /&gt;
== Media ==&lt;br /&gt;
&lt;br /&gt;
* [[Ripping and Encoding DVDs]]&lt;br /&gt;
* [[Encoding DJ Mixes]]&lt;br /&gt;
* [[Changing Matroska Properties]]&lt;br /&gt;
&lt;br /&gt;
=== Photography ===&lt;br /&gt;
&lt;br /&gt;
* [[Capture Images]]&lt;br /&gt;
&lt;br /&gt;
== Styling ==&lt;br /&gt;
&lt;br /&gt;
* [[Quassel Stylesheet]]&lt;br /&gt;
&lt;br /&gt;
== Security ==&lt;br /&gt;
&lt;br /&gt;
* [[Creating Certificates]]&lt;br /&gt;
* [[Mounting Encrypted Home Directories]]&lt;br /&gt;
&lt;br /&gt;
== Programming ==&lt;br /&gt;
&lt;br /&gt;
* [[Deploying Single Files with Maven]]&lt;br /&gt;
* [[Verifying Header Comments]]&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Quassel_Stylesheet&amp;diff=67</id>
		<title>Quassel Stylesheet</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Quassel_Stylesheet&amp;diff=67"/>
				<updated>2018-07-03T18:05:19Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Change font to Merriweather&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; ChatView, NickView, BufferView {&lt;br /&gt;
 	font-family: &amp;quot;Merriweather&amp;quot;;&lt;br /&gt;
 	font-weight: 400;&lt;br /&gt;
 	font-size: 18pt;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ChatLine {&lt;br /&gt;
 	font-family: &amp;quot;Merriweather&amp;quot;;&lt;br /&gt;
 	font-weight: 400;&lt;br /&gt;
 	font-size: 18pt;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 MultiLineEdit {&lt;br /&gt;
 	font-family: &amp;quot;Merriweather&amp;quot;;&lt;br /&gt;
 	font-weight: 400;&lt;br /&gt;
 	font-size: 18pt;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ChatLine[label=&amp;quot;highlight&amp;quot;] {&lt;br /&gt;
 	background: inherit;&lt;br /&gt;
 	color: #ff7f00;&lt;br /&gt;
 	font-weight: bold;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ChatLine[sender=&amp;quot;self&amp;quot;] {&lt;br /&gt;
 	font-weight: 600;&lt;br /&gt;
 	color: #0000ff;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ChatLine#part {&lt;br /&gt;
 	foreground: #990000;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ChatLine#quit {&lt;br /&gt;
 	foreground: #990000;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ChatLine#kick {&lt;br /&gt;
 	foreground: #990000;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ChatLine#join {&lt;br /&gt;
 	foreground: #009900;&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Quassel_Stylesheet&amp;diff=66</id>
		<title>Quassel Stylesheet</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Quassel_Stylesheet&amp;diff=66"/>
				<updated>2018-07-03T18:03:56Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: My custom Quassel stylesheet&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; ChatView, NickView, BufferView {&lt;br /&gt;
 	font-family: &amp;quot;Bookerly&amp;quot;;&lt;br /&gt;
 	font-weight: 400;&lt;br /&gt;
 	font-size: 18pt;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ChatLine {&lt;br /&gt;
 	font-family: &amp;quot;Bookerly&amp;quot;;&lt;br /&gt;
 	font-weight: 400;&lt;br /&gt;
 	font-size: 18pt;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 MultiLineEdit {&lt;br /&gt;
 	font-family: &amp;quot;Bookerly&amp;quot;;&lt;br /&gt;
 	font-weight: 400;&lt;br /&gt;
 	font-size: 18pt;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ChatLine[label=&amp;quot;highlight&amp;quot;] {&lt;br /&gt;
 	background: inherit;&lt;br /&gt;
 	color: #ff7f00;&lt;br /&gt;
 	font-weight: bold;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ChatLine[sender=&amp;quot;self&amp;quot;] {&lt;br /&gt;
 	font-weight: 600;&lt;br /&gt;
 	color: #0000ff;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ChatLine#part {&lt;br /&gt;
 	foreground: #990000;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ChatLine#quit {&lt;br /&gt;
 	foreground: #990000;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ChatLine#kick {&lt;br /&gt;
 	foreground: #990000;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ChatLine#join {&lt;br /&gt;
 	foreground: #009900;&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Verifying_Header_Comments&amp;diff=65</id>
		<title>Verifying Header Comments</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Verifying_Header_Comments&amp;diff=65"/>
				<updated>2015-11-27T06:11:53Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Escape wiki expression&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A normal Java source file (in my projects) consists of a header like the following one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * FreenetSone - EditImagePage.java - Copyright © 2010–2012 David Roden&lt;br /&gt;
 *&lt;br /&gt;
…&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It should contain the name of the project and the name of the file. Sometimes, due to refactoring or copy/paste, the filename in the header does not match the name of the file in question. The following bash script will locate those files:&lt;br /&gt;
&lt;br /&gt;
 # grep -r &amp;quot;Copyright&amp;quot; src/ | grep &amp;quot;java:&amp;quot; | while read line; do f=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d: -f1)&amp;quot;; c=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d- -f2 | cut -d' ' -f2)&amp;quot;; f2=&amp;quot;$(basename &amp;quot;$f&amp;quot;)&amp;quot;; [ &amp;quot;$c&amp;quot; != &amp;quot;$f2&amp;quot; ] &amp;amp;&amp;amp; echo &amp;quot;$f: $c&amp;quot;; done&lt;br /&gt;
&lt;br /&gt;
And sometimes you even changed the name of the project at some point in the past. Use the following oneliner to find those files that have a different project name than the one you substitute at the end of the command:&lt;br /&gt;
&lt;br /&gt;
 # grep -r &amp;quot;Copyright&amp;quot; src/ | grep &amp;quot;java:&amp;quot; | while read line; do f=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d: -f1)&amp;quot;; project=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d' ' -f3)&amp;quot;; [ $project != &amp;quot;''Sone''&amp;quot; ] &amp;amp;&amp;amp; echo &amp;quot;$f: $project&amp;quot;; done&lt;br /&gt;
&lt;br /&gt;
And then there’s the ever-occuring issue with the years in the copyright line. Use this to find files that don’t have the current year as last year in the copyright line.&lt;br /&gt;
&lt;br /&gt;
 # cy=$(date +%Y); grep -r &amp;quot;Copyright&amp;quot; src/ | grep &amp;quot;java:&amp;quot; | while read line; do f=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d: -f1)&amp;quot;; v=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d- -f3 | cut -d' ' -f4)&amp;quot;; y=&amp;quot;${v:(-4)}&amp;quot;; if [ &amp;quot;$y&amp;quot; != &amp;quot;$cy&amp;quot; ]; then echo &amp;quot;$f: $y&amp;quot;; fi; done&lt;br /&gt;
&lt;br /&gt;
To update all files that need updating:&lt;br /&gt;
&lt;br /&gt;
 # cy=$(date +%Y); sed -i &amp;quot;&amp;quot; -E -e 's,^( \* .*Copyright © )(&amp;lt;nowiki&amp;gt;[[:digit:]]&amp;lt;/nowiki&amp;gt;{4})(–&amp;lt;nowiki&amp;gt;[[:digit:]]&amp;lt;/nowiki&amp;gt;{4})?(.*)$,\1\2–'$cy'\4,' -- $(grep -r &amp;quot;Copyright&amp;quot; src | grep &amp;quot;java:&amp;quot; | while read line; do f=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d: -f1)&amp;quot;; v=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d- -f3 | cut -d' ' -f4)&amp;quot;; y=&amp;quot;${v:(-4)}&amp;quot;; if [ &amp;quot;$y&amp;quot; != &amp;quot;$cy&amp;quot; ]; then echo &amp;quot;$f&amp;quot;; fi; done)&lt;br /&gt;
&lt;br /&gt;
[[Category:Programming]]&lt;br /&gt;
[[Category:Java]]&lt;br /&gt;
[[Category:Shell]]&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Verifying_Header_Comments&amp;diff=64</id>
		<title>Verifying Header Comments</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Verifying_Header_Comments&amp;diff=64"/>
				<updated>2015-11-27T06:11:13Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Add script to update years in copyright lines&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A normal Java source file (in my projects) consists of a header like the following one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * FreenetSone - EditImagePage.java - Copyright © 2010–2012 David Roden&lt;br /&gt;
 *&lt;br /&gt;
…&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It should contain the name of the project and the name of the file. Sometimes, due to refactoring or copy/paste, the filename in the header does not match the name of the file in question. The following bash script will locate those files:&lt;br /&gt;
&lt;br /&gt;
 # grep -r &amp;quot;Copyright&amp;quot; src/ | grep &amp;quot;java:&amp;quot; | while read line; do f=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d: -f1)&amp;quot;; c=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d- -f2 | cut -d' ' -f2)&amp;quot;; f2=&amp;quot;$(basename &amp;quot;$f&amp;quot;)&amp;quot;; [ &amp;quot;$c&amp;quot; != &amp;quot;$f2&amp;quot; ] &amp;amp;&amp;amp; echo &amp;quot;$f: $c&amp;quot;; done&lt;br /&gt;
&lt;br /&gt;
And sometimes you even changed the name of the project at some point in the past. Use the following oneliner to find those files that have a different project name than the one you substitute at the end of the command:&lt;br /&gt;
&lt;br /&gt;
 # grep -r &amp;quot;Copyright&amp;quot; src/ | grep &amp;quot;java:&amp;quot; | while read line; do f=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d: -f1)&amp;quot;; project=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d' ' -f3)&amp;quot;; [ $project != &amp;quot;''Sone''&amp;quot; ] &amp;amp;&amp;amp; echo &amp;quot;$f: $project&amp;quot;; done&lt;br /&gt;
&lt;br /&gt;
And then there’s the ever-occuring issue with the years in the copyright line. Use this to find files that don’t have the current year as last year in the copyright line.&lt;br /&gt;
&lt;br /&gt;
 # cy=$(date +%Y); grep -r &amp;quot;Copyright&amp;quot; src/ | grep &amp;quot;java:&amp;quot; | while read line; do f=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d: -f1)&amp;quot;; v=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d- -f3 | cut -d' ' -f4)&amp;quot;; y=&amp;quot;${v:(-4)}&amp;quot;; if [ &amp;quot;$y&amp;quot; != &amp;quot;$cy&amp;quot; ]; then echo &amp;quot;$f: $y&amp;quot;; fi; done&lt;br /&gt;
&lt;br /&gt;
To update all files that need updating:&lt;br /&gt;
&lt;br /&gt;
 # cy=$(date +%Y); sed -i &amp;quot;&amp;quot; -E -e 's,^( \* .*Copyright © )([[:digit:]]{4})(–[[:digit:]]{4})?(.*)$,\1\2–'$cy'\4,' -- $(grep -r &amp;quot;Copyright&amp;quot; src | grep &amp;quot;java:&amp;quot; | while read line; do f=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d: -f1)&amp;quot;; v=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d- -f3 | cut -d' ' -f4)&amp;quot;; y=&amp;quot;${v:(-4)}&amp;quot;; if [ &amp;quot;$y&amp;quot; != &amp;quot;$cy&amp;quot; ]; then echo &amp;quot;$f&amp;quot;; fi; done)&lt;br /&gt;
&lt;br /&gt;
[[Category:Programming]]&lt;br /&gt;
[[Category:Java]]&lt;br /&gt;
[[Category:Shell]]&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Verifying_Header_Comments&amp;diff=63</id>
		<title>Verifying Header Comments</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Verifying_Header_Comments&amp;diff=63"/>
				<updated>2015-11-26T19:23:38Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Fix formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A normal Java source file (in my projects) consists of a header like the following one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * FreenetSone - EditImagePage.java - Copyright © 2010–2012 David Roden&lt;br /&gt;
 *&lt;br /&gt;
…&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It should contain the name of the project and the name of the file. Sometimes, due to refactoring or copy/paste, the filename in the header does not match the name of the file in question. The following bash script will locate those files:&lt;br /&gt;
&lt;br /&gt;
 # grep -r &amp;quot;Copyright&amp;quot; src/ | grep &amp;quot;java:&amp;quot; | while read line; do f=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d: -f1)&amp;quot;; c=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d- -f2 | cut -d' ' -f2)&amp;quot;; f2=&amp;quot;$(basename &amp;quot;$f&amp;quot;)&amp;quot;; [ &amp;quot;$c&amp;quot; != &amp;quot;$f2&amp;quot; ] &amp;amp;&amp;amp; echo &amp;quot;$f: $c&amp;quot;; done&lt;br /&gt;
&lt;br /&gt;
And sometimes you even changed the name of the project at some point in the past. Use the following oneliner to find those files that have a different project name than the one you substitute at the end of the command:&lt;br /&gt;
&lt;br /&gt;
 # grep -r &amp;quot;Copyright&amp;quot; src/ | grep &amp;quot;java:&amp;quot; | while read line; do f=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d: -f1)&amp;quot;; project=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d' ' -f3)&amp;quot;; [ $project != &amp;quot;''Sone''&amp;quot; ] &amp;amp;&amp;amp; echo &amp;quot;$f: $project&amp;quot;; done&lt;br /&gt;
&lt;br /&gt;
And then there’s the ever-occuring issue with the years in the copyright line. Use this to find files that don’t have the current year as last year in the copyright line.&lt;br /&gt;
&lt;br /&gt;
 # cy=$(date +%Y); grep -r &amp;quot;Copyright&amp;quot; src/ | grep &amp;quot;java:&amp;quot; | while read line; do f=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d: -f1)&amp;quot;; v=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d- -f3 | cut -d' ' -f4)&amp;quot;; y=&amp;quot;${v:(-4)}&amp;quot;; if [ &amp;quot;$y&amp;quot; != &amp;quot;$cy&amp;quot; ]; then echo &amp;quot;$f: $y&amp;quot;; fi; done&lt;br /&gt;
&lt;br /&gt;
[[Category:Programming]]&lt;br /&gt;
[[Category:Java]]&lt;br /&gt;
[[Category:Shell]]&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Verifying_Header_Comments&amp;diff=62</id>
		<title>Verifying Header Comments</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Verifying_Header_Comments&amp;diff=62"/>
				<updated>2015-11-26T19:23:18Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Add shell script to find files with non-current copyright years&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A normal Java source file (in my projects) consists of a header like the following one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * FreenetSone - EditImagePage.java - Copyright © 2010–2012 David Roden&lt;br /&gt;
 *&lt;br /&gt;
…&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It should contain the name of the project and the name of the file. Sometimes, due to refactoring or copy/paste, the filename in the header does not match the name of the file in question. The following bash script will locate those files:&lt;br /&gt;
&lt;br /&gt;
 # grep -r &amp;quot;Copyright&amp;quot; src/ | grep &amp;quot;java:&amp;quot; | while read line; do f=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d: -f1)&amp;quot;; c=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d- -f2 | cut -d' ' -f2)&amp;quot;; f2=&amp;quot;$(basename &amp;quot;$f&amp;quot;)&amp;quot;; [ &amp;quot;$c&amp;quot; != &amp;quot;$f2&amp;quot; ] &amp;amp;&amp;amp; echo &amp;quot;$f: $c&amp;quot;; done&lt;br /&gt;
&lt;br /&gt;
And sometimes you even changed the name of the project at some point in the past. Use the following oneliner to find those files that have a different project name than the one you substitute at the end of the command:&lt;br /&gt;
&lt;br /&gt;
 # grep -r &amp;quot;Copyright&amp;quot; src/ | grep &amp;quot;java:&amp;quot; | while read line; do f=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d: -f1)&amp;quot;; project=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d' ' -f3)&amp;quot;; [ $project != &amp;quot;''Sone''&amp;quot; ] &amp;amp;&amp;amp; echo &amp;quot;$f: $project&amp;quot;; done&lt;br /&gt;
&lt;br /&gt;
And then there’s the ever-occuring issue with the years in the copyright line. Use this to find files that don’t have the current year as last year in the copyright line.&lt;br /&gt;
&lt;br /&gt;
# cy=$(date +%Y); grep -r &amp;quot;Copyright&amp;quot; src/ | grep &amp;quot;java:&amp;quot; | while read line; do f=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d: -f1)&amp;quot;; v=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d- -f3 | cut -d' ' -f4)&amp;quot;; y=&amp;quot;${v:(-4)}&amp;quot;; if [ &amp;quot;$y&amp;quot; != &amp;quot;$cy&amp;quot; ]; then echo &amp;quot;$f: $y&amp;quot;; fi; done&lt;br /&gt;
&lt;br /&gt;
[[Category:Programming]]&lt;br /&gt;
[[Category:Java]]&lt;br /&gt;
[[Category:Shell]]&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Encoding_DJ_Mixes&amp;diff=61</id>
		<title>Encoding DJ Mixes</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Encoding_DJ_Mixes&amp;diff=61"/>
				<updated>2015-06-25T09:58:55Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: /* Encoding as Ogg Vorbis */ add tags to Ogg file&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;For maximum compatibility with the world’s shitty browser mess DJ mixes should be encoded in three formats: MP3, Ogg Vorbis, and AAC.&lt;br /&gt;
&lt;br /&gt;
== Encoding as MP3 ==&lt;br /&gt;
&lt;br /&gt;
 flac -cd Mix.flac | lame --preset standard -q 0 -p - Mix.mp3&lt;br /&gt;
&lt;br /&gt;
== Encoding as Ogg Vorbis ==&lt;br /&gt;
&lt;br /&gt;
 flac -cd Mix.flac | oggenc -q 5 -o Mix.ogg -&lt;br /&gt;
 vorbiscomment -a -t &amp;quot;ARTIST=''artist''&amp;quot; -t &amp;quot;TITLE=''title''&amp;quot; -t &amp;quot;DATE=''date''&amp;quot; -t &amp;quot;GENRE=''genre''&amp;quot; -t &amp;quot;TRACKNUMBER=1/1&amp;quot; Mix.ogg&lt;br /&gt;
&lt;br /&gt;
== Encoding as AAC ==&lt;br /&gt;
&lt;br /&gt;
 flac -cd Mix.flac | faac -w -q 125 -o Mix.m4a -&lt;br /&gt;
&lt;br /&gt;
[[Category:Encoding]]&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Deploying_Single_Files_with_Maven&amp;diff=60</id>
		<title>Deploying Single Files with Maven</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Deploying_Single_Files_with_Maven&amp;diff=60"/>
				<updated>2015-06-03T18:33:23Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Add pom.xml for Maven on OS X, add sources to deployment&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In order to deploy single files that are not controlled by Maven, you need the &amp;lt;tt&amp;gt;deploy:deploy-file&amp;lt;/tt&amp;gt; goal.&lt;br /&gt;
&lt;br /&gt;
    # mvn -Dfile=''file'' -DgroupId=''groupId'' -DartifactId=''artifactId'' -Dpackaging=jar -Dversion=''version'' -DrepositoryId=''repositoryId'' -Dsources=''source.jar'' -Durl=scpexe://''host''/''path'' deploy:deploy-file&lt;br /&gt;
&lt;br /&gt;
The repository ID is necessary in case you have authentication information defined for your repository. You might additionally also need the following in your &amp;lt;code&amp;gt;pom.xml&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;project&amp;gt;&lt;br /&gt;
      &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;&lt;br /&gt;
      &amp;lt;groupId&amp;gt;''groupId''&amp;lt;/groupId&amp;gt;&lt;br /&gt;
      &amp;lt;artifactId&amp;gt;''artifactId''&amp;lt;/artifactId&amp;gt;&lt;br /&gt;
      &amp;lt;version&amp;gt;''version''&amp;lt;/version&amp;gt;&lt;br /&gt;
      &amp;lt;build&amp;gt;&lt;br /&gt;
        &amp;lt;extensions&amp;gt;&lt;br /&gt;
          &amp;lt;extension&amp;gt;&lt;br /&gt;
            &amp;lt;groupId&amp;gt;org.apache.maven.wagon&amp;lt;/groupId&amp;gt;&lt;br /&gt;
            &amp;lt;artifactId&amp;gt;wagon-ssh-external&amp;lt;/artifactId&amp;gt;&lt;br /&gt;
            &amp;lt;version&amp;gt;1.0&amp;lt;/version&amp;gt;&lt;br /&gt;
          &amp;lt;/extension&amp;gt;&lt;br /&gt;
        &amp;lt;/extensions&amp;gt;&lt;br /&gt;
      &amp;lt;/build&amp;gt;&lt;br /&gt;
    &amp;lt;/project&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To install a file only locally, use:&lt;br /&gt;
&lt;br /&gt;
    # mvn install:install-file -Dfile=''file'' -DgroupId=''groupId'' -DartifactId=''artifactId'' -Dpackaging=jar -Dversion=''version''&lt;br /&gt;
&lt;br /&gt;
To additionally install the sources for a JAR file, use:&lt;br /&gt;
&lt;br /&gt;
    # mvn install:install-file -Dfile=''file'' -DgroupId=''groupId'' -DartifactId=''artifactId'' -Dpackaging=jar -Dversion=''version'' -Dclassifier=sources&lt;br /&gt;
&lt;br /&gt;
[[Category:Programming]]&lt;br /&gt;
[[Category:Java]]&lt;br /&gt;
[[Category:Maven]]&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Ripping_and_Encoding_DVDs&amp;diff=59</id>
		<title>Ripping and Encoding DVDs</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Ripping_and_Encoding_DVDs&amp;diff=59"/>
				<updated>2013-09-10T19:00:02Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: /* Encode the Video */ Add an &amp;lt;tt&amp;gt;avconv&amp;lt;/tt&amp;gt; command line.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Encoding]]&lt;br /&gt;
[[Category:Ripping]]&lt;br /&gt;
[[Category:DVD]]&lt;br /&gt;
This page describes in large detail how to create near perfect DVD rips. “Near perfect” in this context means that the video quality is nearly indistinguishable from the DVD video, and all audio tracks contained in the movie are the AC3 tracks that are contained in the DVD without any reencoding whatsoever.&lt;br /&gt;
&lt;br /&gt;
== Copy the Main Title from the DVD ==&lt;br /&gt;
&lt;br /&gt;
All these actions can be performed without copying the movie to a local hard disk first but as a DVD drive is almost always slower than a local hard disk, copying the main title of the movie to the hard disk before processing will save a lot of time.&lt;br /&gt;
&lt;br /&gt;
First, we need to find out which title is the main title. I recommend storing the output of &amp;lt;code&amp;gt;lsdvd&amp;lt;/code&amp;gt;, too, so that you can look at it later, e. g. for subtitle stream IDs, or other technical information.&lt;br /&gt;
&lt;br /&gt;
 $ lsdvd -x /dev/dvd &amp;gt; movie.txt&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;lsdvd&amp;lt;/code&amp;gt; can tell you a lot of things about the DVD in question. Especially the track IDs for audio and subtitle tracks will be interesting later on so try not to forget where you got it from. For now it will tell you the longest title on the disc; usually this is the main title. Copy it to the hard disk using &amp;lt;code&amp;gt;tccat&amp;lt;/code&amp;gt; from the &amp;lt;code&amp;gt;transcode&amp;lt;/code&amp;gt; package:&lt;br /&gt;
&lt;br /&gt;
 $ tccat -i /dev/dvd -T ''&amp;lt;title&amp;gt;'',-1 &amp;gt; movie.mpg&lt;br /&gt;
&lt;br /&gt;
While &amp;lt;code&amp;gt;tccat&amp;lt;/code&amp;gt; is busy you can already perform the next steps.&lt;br /&gt;
&lt;br /&gt;
 $ cp ''/path/to/dvd/''VIDEO_TS/VTS_''&amp;lt;vts&amp;gt;''_0.IFO movie.ifo&lt;br /&gt;
&lt;br /&gt;
This will copy the IFO file for the main title to the disc. This file contains information that is relevant for subtitle conversion. If you do not need subtitles, you can skip this. The VTS number of the main title is listed in the &amp;lt;code&amp;gt;lsdvd -x&amp;lt;/code&amp;gt; output from above and is always two digits long.&lt;br /&gt;
&lt;br /&gt;
 $ dvdxchap -t ''&amp;lt;title&amp;gt;'' /dev/dvd &amp;gt; movie.chap&lt;br /&gt;
&lt;br /&gt;
This will extract the chapter information from the main title into a text file. If you want and if you know the names of the chapters, you can now edit this file.&lt;br /&gt;
&lt;br /&gt;
Now we have to wait until &amp;lt;code&amp;gt;tccat&amp;lt;/code&amp;gt; has finished copying the main title to the hard disk. Encoding the video is the next step as it is bound to take quite some time (depending on your hardware) and the rest of the steps (except for multiplexing, of course) can be performed while the video is being encoded.&lt;br /&gt;
&lt;br /&gt;
== Encode the Video ==&lt;br /&gt;
&lt;br /&gt;
Encoding the video has a lot to do with voodoo. When you try to use Google to find “the best options” to encode a DVD you will find none. Or to be more precise, you will find plenty, and they will all contradict each other. There are about a millions ways to encode video; I will only outline some of them.&lt;br /&gt;
&lt;br /&gt;
=== Using avidemux2 ===&lt;br /&gt;
&lt;br /&gt;
Using avidemux2 gives you a nice user interface and easy selection of all relevant parameters for the encoding process. These are the settings I usually use:&lt;br /&gt;
&lt;br /&gt;
* Video Codec: MPEG-4 ASP (xvid)&lt;br /&gt;
* Constant Quality: 5&lt;br /&gt;
* Some time-hungry options, such as High Motion Estimation, Wide Search for Rate Distortion Optimisation, Quarter Pixel Motion Estimation, and Global Motion Compensation. I don’t really care about how long the encoding takes, I’m interesting in the best possible picture.&lt;br /&gt;
* Most important: The Pixel Aspect Ratio has to be set to “as input”! This allows you to crop black borders off of the image without having to recalculate the new width and height of the image.&lt;br /&gt;
* Also, you do not need to set the width and height of the image. The size of the source material in combination with the Pixel Aspect Ratio will automatically take care that the final video is stretched as necessary. Not resizing the picture will also keep the quality of the video material at its maximum; it will never get better when you resize.&lt;br /&gt;
* Disable all audio tracks, as the input MPEG file still contains all audio tracks from the DVD and they don’t need to be encoded.&lt;br /&gt;
&lt;br /&gt;
Now save the file to &amp;lt;code&amp;gt;movie.avi&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Using mencoder ===&lt;br /&gt;
&lt;br /&gt;
Using a command line tool such as &amp;lt;code&amp;gt;mencoder&amp;lt;/code&amp;gt; gives you the possibility to encode on a remote machine, e.g. on your desktop machine when you’re not at home, or on a headless server somewhere in a data warehouse or your basement. Basically, the &amp;lt;code&amp;gt;mencoder&amp;lt;/code&amp;gt; command line looks like this:&lt;br /&gt;
&lt;br /&gt;
 $ mencoder -o movie.avi movie.mpg -nosound -nosub -noautosub -ovc xvid -xvidencopts fixed_quant=3:qpel:gmc:trellis:vhq=4&lt;br /&gt;
&lt;br /&gt;
This will use the &amp;lt;code&amp;gt;xvid&amp;lt;/code&amp;gt; codec at a fixed quantizer (3), enabling a couple of quality-improving options (quarter pixels, global motion compensation, Trellis quantization, motion search algorithm), omitting all audio tracks and subtitles from the original MPEG file.&lt;br /&gt;
&lt;br /&gt;
 $ mencoder -o movie.avi movie.mpg -nosound -nosub -noautosub -ovc xvid -xvidencopts qpel:gmc:trellis:vhq=4:cartoon:interlacing:pass=1:bitrate=-307200&lt;br /&gt;
&lt;br /&gt;
This will used the &amp;lt;code&amp;gt;xvid&amp;lt;/code&amp;gt; codec again but tell it to optimize for interlaced cartoon material, using 2-pass encoding heading for a total amount of 307200 KiB of video stream. (You need to run this command again, substituting &amp;lt;code&amp;gt;:pass=2&amp;lt;/code&amp;gt; at the appropriate place.)&lt;br /&gt;
&lt;br /&gt;
 $ mencoder -o movie.avi movie.mpg -nosound -nosub -noautosub -ovc xvid -xvidencopts fixed_quant=3:qpel:gmc:trellis:vhq=4 -vf pullup,softskip -ofps 24000/1001&lt;br /&gt;
&lt;br /&gt;
This will perform an inverse telecine transformation, reducing NTSC material from 30000/1001 (aka 29.97) fps to 24000/1001 (aka 23.976) fps.&lt;br /&gt;
&lt;br /&gt;
 $ mencoder -o movie.avi movie.mpg -nosound -nosub -noautosub -vf crop=720:416:0:80 -ovc x264 -x264encopts crf=18:preset=veryslow:threads=1&lt;br /&gt;
&lt;br /&gt;
This encodes the video with the x264 codec with a single thread and the “veryslow” preset (which is indeed very slow) and crops the video (reducing the height to 416 pixels, starting at pixel 80).&lt;br /&gt;
&lt;br /&gt;
=== Using x264 ===&lt;br /&gt;
&lt;br /&gt;
It is also possible to use the h.264 encoder &amp;lt;tt&amp;gt;x264&amp;lt;/tt&amp;gt; directly.&lt;br /&gt;
&lt;br /&gt;
 $ x264 --index movie.mpg.idx --no-interlaced --crf 18 --preset veryslow --threads 2 --vf crop:0,80,0,80 -o movie.avi movie.mpg&lt;br /&gt;
&lt;br /&gt;
=== Using avconv ===&lt;br /&gt;
&lt;br /&gt;
And last but not least there is also &amp;lt;tt&amp;gt;avconv&amp;lt;/tt&amp;gt; (formerly knows as &amp;lt;tt&amp;gt;ffmpeg&amp;lt;/tt&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 $ avconv -y -i movie.mpg -map 0:v -map 0:s -map 0:a:1 -map 0:a:0 -map 0:a:2 -map 0:a:3 -c copy -c:v libx264 -crf 15 -trellis 1 -tune animation -vf yadif,crop=704:560:10:6 movie.mkv&lt;br /&gt;
&lt;br /&gt;
This will overwrite any output files (&amp;lt;tt&amp;gt;-y&amp;lt;/tt&amp;gt;) when encoding the input file &amp;lt;tt&amp;gt;movie.mpg&amp;lt;/tt&amp;gt; (&amp;lt;tt&amp;gt;-i movie.mpg&amp;lt;/tt&amp;gt;). It will use all video tracks (&amp;lt;tt&amp;gt;-map 0:v&amp;lt;/tt&amp;gt;), all subtitle tracks (&amp;lt;tt&amp;gt;-map 0:s&amp;lt;/tt&amp;gt;), and the first four audio tracks in the order 1, 0, 2, 3 (&amp;lt;tt&amp;gt;-map 0:a:1 -map 0:a:0 -map 0:a:2 -map 0:a:3&amp;lt;/tt&amp;gt;). The default codec for all tracks is the “copy” codec (&amp;lt;tt&amp;gt;-c copy&amp;lt;/tt&amp;gt;) but the video track is encoded using the x264 encoder (&amp;lt;tt&amp;gt;-c:v libx264&amp;lt;/tt&amp;gt;). &amp;lt;tt&amp;gt;-crf 15&amp;lt;/tt&amp;gt; tells the x264 encoder to use a Constant Rate Factor of 15, &amp;lt;tt&amp;gt;-trellis 1&amp;lt;/tt&amp;gt; activates Trellis optimization, &amp;lt;tt&amp;gt;-tune animation&amp;lt;/tt&amp;gt; tunes the encoder setting for animated content. Two video filters are then added for the output file: “yadif” is a deinterlacing filter with very good results, and “crop=704:560:10:6” will only encode a window with the dimensions 704×560, starting at the coordinates (10,6). The result is written to the file &amp;lt;tt&amp;gt;movie.mkv&amp;lt;/tt&amp;gt;; the appropriate muxer for Matroska video is automatically selected.&lt;br /&gt;
&lt;br /&gt;
== Extract Subtitle Tracks ==&lt;br /&gt;
&lt;br /&gt;
After &amp;lt;code&amp;gt;tccat&amp;lt;/code&amp;gt; has finished copying the movie to your hard disk you can extract the subtitle tracks. This is necessary because they have to be converted before &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; can handle them.&lt;br /&gt;
&lt;br /&gt;
 $ tcextract -i movie.mpg -a 0x20 -x ps1 &amp;gt; movie.en.ps1&lt;br /&gt;
&lt;br /&gt;
The ID of the subtitle track (here: 0x20) can be found in the output of &amp;lt;code&amp;gt;lsdvd&amp;lt;/code&amp;gt;. Choose the subtitles you like and extract them one after another.&lt;br /&gt;
&lt;br /&gt;
Now they have to be converted to the VobSub format:&lt;br /&gt;
&lt;br /&gt;
 $ subtitle2vobsub -p movie.en.ps1 -i movie.ifo -o movie.en&lt;br /&gt;
&lt;br /&gt;
This will create the files &amp;lt;code&amp;gt;movie.en.sub&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;movie.en.idx&amp;lt;/code&amp;gt;. Both are necessary for &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; to do its magic.&lt;br /&gt;
&lt;br /&gt;
We’re almost there.&lt;br /&gt;
&lt;br /&gt;
== Mux the Final Video ==&lt;br /&gt;
&lt;br /&gt;
Now all that we have created has to be put together.&lt;br /&gt;
&lt;br /&gt;
 $ mkvmerge -o movie.mkv --title &amp;quot;Movie&amp;quot; --chapter-language eng --chapters movie.chap \&lt;br /&gt;
 --compression 0:none movie.avi \&lt;br /&gt;
 -D -a 1,2 --compression 1:none --language 1:eng --compression 2:none --language 2:ger --default-duration 0:25fps movie.mpg \&lt;br /&gt;
 --compression 0:none --language 0:eng --default-track 0:0 movie.en.idx \&lt;br /&gt;
 --compression 0:none --language 0:ger --default-track 0:0 movie.de.idx&lt;br /&gt;
&lt;br /&gt;
Yes, this command line needs some explaining.&lt;br /&gt;
&lt;br /&gt;
;-o movie.mkv&lt;br /&gt;
:This is the output file that we are creating.&lt;br /&gt;
&lt;br /&gt;
;--title “Movie“&lt;br /&gt;
:Here you can specify the title of the movie. This parameter is optional.&lt;br /&gt;
&lt;br /&gt;
;--chapter-language eng --chapters movie.chap&lt;br /&gt;
:This includes the chapter definitions from the given file and also specifies that the lanuage of the chapters file is English.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;--compression 0:none movie.avi&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:Includes all tracks from the given file in the output file. The “--compression 0:none” parameters tells &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; to not use any kind of header compression. As we only stored a video track in &amp;lt;code&amp;gt;movie.avi&amp;lt;/code&amp;gt; we do not need to restrict inclusion of this file. If you accidentally encoded an audio track as well, you need to specify “-A” before “movie.avi” - this will tell &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; to not include any audio tracks.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;-D -a 1,2 --compression 1:none --language 1:eng --compression 2:none --language 2:ger --default-duration 0:25fps movie.mpg&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:These parameters tell &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; to include no video track (“-D”) and audio tracks 1 and 2 (“-a 1,2”) from the file &amp;lt;code&amp;gt;movie.mpg&amp;lt;/code&amp;gt;. This is our source file from the DVD and thus contains the MPEG-2 video stream that we reencoded earlier, as well as the original AC3 audio tracks that we are interested in. Note that the audio tracks are tracks 1 and 2 because track 0 in the file &amp;lt;code&amp;gt;movie.mpg&amp;lt;/code&amp;gt; is the video track! Use “&amp;lt;code&amp;gt;mkvmerge --identify movie.mpg&amp;lt;/code&amp;gt;” to list all tracks that &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; recognizes. Also, these parameters tell &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; that audio track 1 is English, and audio track 2 is German. If you want to include more than two audio tracks you need to repeat the respective parameters for all additional audio tracks.&lt;br /&gt;
:If you are muxing a video file that consists of an AVC/h.264 stream you need to specify the duration of a frame because the stream itself does not contain that information; &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; assumes a default of 25 FPS.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;--compression 0:none --language 0:eng --default-track 0:0 movie.en.idx&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:This includes all tracks from the &amp;lt;code&amp;gt;movie.en.idx&amp;lt;/code&amp;gt; file which is a single subtitle track in the English language. The “--default-track 0:0” specifies that the included track with the index 0 (i.e. the only subtitle track in the file) is not a default track. This needs to be specified for all subtitles unless you really want to show a certain subtitle as default when a movie starts. This can be used to include forced subtitles for additional foreign languages spoken in a movie, e.g. the Na’vi language in “Avatar”, or Elfish in “The Lord of the Rings.”&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;--compression 0:none --language 0:ger --default-track 0:0 movie.de.idx&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:Includes the German subtitles.&lt;br /&gt;
&lt;br /&gt;
Voilá, &amp;lt;code&amp;gt;movie.mkv&amp;lt;/code&amp;gt; now contains your movie, all audio tracks, and all subtitle tracks that you want to be in there.&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Deploying_Single_Files_with_Maven&amp;diff=58</id>
		<title>Deploying Single Files with Maven</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Deploying_Single_Files_with_Maven&amp;diff=58"/>
				<updated>2013-09-04T19:59:29Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Add command-line to add the sources of a JAR file, too.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In order to deploy single files that are not controlled by Maven, you need the &amp;lt;tt&amp;gt;deploy:deploy-file&amp;lt;/tt&amp;gt; goal.&lt;br /&gt;
&lt;br /&gt;
    # mvn deploy:deploy-file -Dfile=''file'' -DgroupId=''groupId'' -DartifactId=''artifactId'' -Dpackaging=jar -Dversion=''version'' -DrepositoryId=''repositoryId'' -Durl=scp://''host''/''path''&lt;br /&gt;
&lt;br /&gt;
The repository ID is necessary in case you have authentication information defined for your repository.&lt;br /&gt;
&lt;br /&gt;
To install a file only locally, use:&lt;br /&gt;
&lt;br /&gt;
    # mvn install:install-file -Dfile=''file'' -DgroupId=''groupId'' -DartifactId=''artifactId'' -Dpackaging=jar -Dversion=''version''&lt;br /&gt;
&lt;br /&gt;
To additionally install the sources for a JAR file, use:&lt;br /&gt;
&lt;br /&gt;
    # mvn install:install-file -Dfile=''file'' -DgroupId=''groupId'' -DartifactId=''artifactId'' -Dpackaging=jar -Dversion=''version'' -Dclassifier=sources&lt;br /&gt;
&lt;br /&gt;
[[Category:Programming]]&lt;br /&gt;
[[Category:Java]]&lt;br /&gt;
[[Category:Maven]]&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Deploying_Single_Files_with_Maven&amp;diff=57</id>
		<title>Deploying Single Files with Maven</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Deploying_Single_Files_with_Maven&amp;diff=57"/>
				<updated>2013-06-29T16:41:30Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Fix packaging.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In order to deploy single files that are not controlled by Maven, you need the &amp;lt;tt&amp;gt;deploy:deploy-file&amp;lt;/tt&amp;gt; goal.&lt;br /&gt;
&lt;br /&gt;
    # mvn deploy:deploy-file -Dfile=''file'' -DgroupId=''groupId'' -DartifactId=''artifactId'' -Dpackaging=jar -Dversion=''version'' -DrepositoryId=''repositoryId'' -Durl=scp://''host''/''path''&lt;br /&gt;
&lt;br /&gt;
The repository ID is necessary in case you have authentication information defined for your repository.&lt;br /&gt;
&lt;br /&gt;
To install a file only locally, use:&lt;br /&gt;
&lt;br /&gt;
    # mvn install:install-file -Dfile=''file'' -DgroupId=''groupId'' -DartifactId=''artifactId'' -Dpackaging=jar -Dversion=''version''&lt;br /&gt;
&lt;br /&gt;
[[Category:Programming]]&lt;br /&gt;
[[Category:Java]]&lt;br /&gt;
[[Category:Maven]]&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Ripping_and_Encoding_DVDs&amp;diff=56</id>
		<title>Ripping and Encoding DVDs</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Ripping_and_Encoding_DVDs&amp;diff=56"/>
				<updated>2013-06-23T10:54:32Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Use the real DVD device.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Encoding]]&lt;br /&gt;
[[Category:Ripping]]&lt;br /&gt;
[[Category:DVD]]&lt;br /&gt;
This page describes in large detail how to create near perfect DVD rips. “Near perfect” in this context means that the video quality is nearly indistinguishable from the DVD video, and all audio tracks contained in the movie are the AC3 tracks that are contained in the DVD without any reencoding whatsoever.&lt;br /&gt;
&lt;br /&gt;
== Copy the Main Title from the DVD ==&lt;br /&gt;
&lt;br /&gt;
All these actions can be performed without copying the movie to a local hard disk first but as a DVD drive is almost always slower than a local hard disk, copying the main title of the movie to the hard disk before processing will save a lot of time.&lt;br /&gt;
&lt;br /&gt;
First, we need to find out which title is the main title. I recommend storing the output of &amp;lt;code&amp;gt;lsdvd&amp;lt;/code&amp;gt;, too, so that you can look at it later, e. g. for subtitle stream IDs, or other technical information.&lt;br /&gt;
&lt;br /&gt;
 $ lsdvd -x /dev/dvd &amp;gt; movie.txt&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;lsdvd&amp;lt;/code&amp;gt; can tell you a lot of things about the DVD in question. Especially the track IDs for audio and subtitle tracks will be interesting later on so try not to forget where you got it from. For now it will tell you the longest title on the disc; usually this is the main title. Copy it to the hard disk using &amp;lt;code&amp;gt;tccat&amp;lt;/code&amp;gt; from the &amp;lt;code&amp;gt;transcode&amp;lt;/code&amp;gt; package:&lt;br /&gt;
&lt;br /&gt;
 $ tccat -i /dev/dvd -T ''&amp;lt;title&amp;gt;'',-1 &amp;gt; movie.mpg&lt;br /&gt;
&lt;br /&gt;
While &amp;lt;code&amp;gt;tccat&amp;lt;/code&amp;gt; is busy you can already perform the next steps.&lt;br /&gt;
&lt;br /&gt;
 $ cp ''/path/to/dvd/''VIDEO_TS/VTS_''&amp;lt;vts&amp;gt;''_0.IFO movie.ifo&lt;br /&gt;
&lt;br /&gt;
This will copy the IFO file for the main title to the disc. This file contains information that is relevant for subtitle conversion. If you do not need subtitles, you can skip this. The VTS number of the main title is listed in the &amp;lt;code&amp;gt;lsdvd -x&amp;lt;/code&amp;gt; output from above and is always two digits long.&lt;br /&gt;
&lt;br /&gt;
 $ dvdxchap -t ''&amp;lt;title&amp;gt;'' /dev/dvd &amp;gt; movie.chap&lt;br /&gt;
&lt;br /&gt;
This will extract the chapter information from the main title into a text file. If you want and if you know the names of the chapters, you can now edit this file.&lt;br /&gt;
&lt;br /&gt;
Now we have to wait until &amp;lt;code&amp;gt;tccat&amp;lt;/code&amp;gt; has finished copying the main title to the hard disk. Encoding the video is the next step as it is bound to take quite some time (depending on your hardware) and the rest of the steps (except for multiplexing, of course) can be performed while the video is being encoded.&lt;br /&gt;
&lt;br /&gt;
== Encode the Video ==&lt;br /&gt;
&lt;br /&gt;
Encoding the video has a lot to do with voodoo. When you try to use Google to find “the best options” to encode a DVD you will find none. Or to be more precise, you will find plenty, and they will all contradict each other. There are about a millions ways to encode video; I will only outline some of them.&lt;br /&gt;
&lt;br /&gt;
=== Using avidemux2 ===&lt;br /&gt;
&lt;br /&gt;
Using avidemux2 gives you a nice user interface and easy selection of all relevant parameters for the encoding process. These are the settings I usually use:&lt;br /&gt;
&lt;br /&gt;
* Video Codec: MPEG-4 ASP (xvid)&lt;br /&gt;
* Constant Quality: 5&lt;br /&gt;
* Some time-hungry options, such as High Motion Estimation, Wide Search for Rate Distortion Optimisation, Quarter Pixel Motion Estimation, and Global Motion Compensation. I don’t really care about how long the encoding takes, I’m interesting in the best possible picture.&lt;br /&gt;
* Most important: The Pixel Aspect Ratio has to be set to “as input”! This allows you to crop black borders off of the image without having to recalculate the new width and height of the image.&lt;br /&gt;
* Also, you do not need to set the width and height of the image. The size of the source material in combination with the Pixel Aspect Ratio will automatically take care that the final video is stretched as necessary. Not resizing the picture will also keep the quality of the video material at its maximum; it will never get better when you resize.&lt;br /&gt;
* Disable all audio tracks, as the input MPEG file still contains all audio tracks from the DVD and they don’t need to be encoded.&lt;br /&gt;
&lt;br /&gt;
Now save the file to &amp;lt;code&amp;gt;movie.avi&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Using mencoder ===&lt;br /&gt;
&lt;br /&gt;
Using a command line tool such as &amp;lt;code&amp;gt;mencoder&amp;lt;/code&amp;gt; gives you the possibility to encode on a remote machine, e.g. on your desktop machine when you’re not at home, or on a headless server somewhere in a data warehouse or your basement. Basically, the &amp;lt;code&amp;gt;mencoder&amp;lt;/code&amp;gt; command line looks like this:&lt;br /&gt;
&lt;br /&gt;
 $ mencoder -o movie.avi movie.mpg -nosound -nosub -noautosub -ovc xvid -xvidencopts fixed_quant=3:qpel:gmc:trellis:vhq=4&lt;br /&gt;
&lt;br /&gt;
This will use the &amp;lt;code&amp;gt;xvid&amp;lt;/code&amp;gt; codec at a fixed quantizer (3), enabling a couple of quality-improving options (quarter pixels, global motion compensation, Trellis quantization, motion search algorithm), omitting all audio tracks and subtitles from the original MPEG file.&lt;br /&gt;
&lt;br /&gt;
 $ mencoder -o movie.avi movie.mpg -nosound -nosub -noautosub -ovc xvid -xvidencopts qpel:gmc:trellis:vhq=4:cartoon:interlacing:pass=1:bitrate=-307200&lt;br /&gt;
&lt;br /&gt;
This will used the &amp;lt;code&amp;gt;xvid&amp;lt;/code&amp;gt; codec again but tell it to optimize for interlaced cartoon material, using 2-pass encoding heading for a total amount of 307200 KiB of video stream. (You need to run this command again, substituting &amp;lt;code&amp;gt;:pass=2&amp;lt;/code&amp;gt; at the appropriate place.)&lt;br /&gt;
&lt;br /&gt;
 $ mencoder -o movie.avi movie.mpg -nosound -nosub -noautosub -ovc xvid -xvidencopts fixed_quant=3:qpel:gmc:trellis:vhq=4 -vf pullup,softskip -ofps 24000/1001&lt;br /&gt;
&lt;br /&gt;
This will perform an inverse telecine transformation, reducing NTSC material from 30000/1001 (aka 29.97) fps to 24000/1001 (aka 23.976) fps.&lt;br /&gt;
&lt;br /&gt;
 $ mencoder -o movie.avi movie.mpg -nosound -nosub -noautosub -vf crop=720:416:0:80 -ovc x264 -x264encopts crf=18:preset=veryslow:threads=1&lt;br /&gt;
&lt;br /&gt;
This encodes the video with the x264 codec with a single thread and the “veryslow” preset (which is indeed very slow) and crops the video (reducing the height to 416 pixels, starting at pixel 80).&lt;br /&gt;
&lt;br /&gt;
=== Using x264 ===&lt;br /&gt;
&lt;br /&gt;
It is also possible to use the h.264 encoder &amp;lt;tt&amp;gt;x264&amp;lt;/tt&amp;gt; directly.&lt;br /&gt;
&lt;br /&gt;
 $ x264 --index movie.mpg.idx --no-interlaced --crf 18 --preset veryslow --threads 2 --vf crop:0,80,0,80 -o movie.avi movie.mpg&lt;br /&gt;
&lt;br /&gt;
== Extract Subtitle Tracks ==&lt;br /&gt;
&lt;br /&gt;
After &amp;lt;code&amp;gt;tccat&amp;lt;/code&amp;gt; has finished copying the movie to your hard disk you can extract the subtitle tracks. This is necessary because they have to be converted before &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; can handle them.&lt;br /&gt;
&lt;br /&gt;
 $ tcextract -i movie.mpg -a 0x20 -x ps1 &amp;gt; movie.en.ps1&lt;br /&gt;
&lt;br /&gt;
The ID of the subtitle track (here: 0x20) can be found in the output of &amp;lt;code&amp;gt;lsdvd&amp;lt;/code&amp;gt;. Choose the subtitles you like and extract them one after another.&lt;br /&gt;
&lt;br /&gt;
Now they have to be converted to the VobSub format:&lt;br /&gt;
&lt;br /&gt;
 $ subtitle2vobsub -p movie.en.ps1 -i movie.ifo -o movie.en&lt;br /&gt;
&lt;br /&gt;
This will create the files &amp;lt;code&amp;gt;movie.en.sub&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;movie.en.idx&amp;lt;/code&amp;gt;. Both are necessary for &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; to do its magic.&lt;br /&gt;
&lt;br /&gt;
We’re almost there.&lt;br /&gt;
&lt;br /&gt;
== Mux the Final Video ==&lt;br /&gt;
&lt;br /&gt;
Now all that we have created has to be put together.&lt;br /&gt;
&lt;br /&gt;
 $ mkvmerge -o movie.mkv --title &amp;quot;Movie&amp;quot; --chapter-language eng --chapters movie.chap \&lt;br /&gt;
 --compression 0:none movie.avi \&lt;br /&gt;
 -D -a 1,2 --compression 1:none --language 1:eng --compression 2:none --language 2:ger --default-duration 0:25fps movie.mpg \&lt;br /&gt;
 --compression 0:none --language 0:eng --default-track 0:0 movie.en.idx \&lt;br /&gt;
 --compression 0:none --language 0:ger --default-track 0:0 movie.de.idx&lt;br /&gt;
&lt;br /&gt;
Yes, this command line needs some explaining.&lt;br /&gt;
&lt;br /&gt;
;-o movie.mkv&lt;br /&gt;
:This is the output file that we are creating.&lt;br /&gt;
&lt;br /&gt;
;--title “Movie“&lt;br /&gt;
:Here you can specify the title of the movie. This parameter is optional.&lt;br /&gt;
&lt;br /&gt;
;--chapter-language eng --chapters movie.chap&lt;br /&gt;
:This includes the chapter definitions from the given file and also specifies that the lanuage of the chapters file is English.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;--compression 0:none movie.avi&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:Includes all tracks from the given file in the output file. The “--compression 0:none” parameters tells &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; to not use any kind of header compression. As we only stored a video track in &amp;lt;code&amp;gt;movie.avi&amp;lt;/code&amp;gt; we do not need to restrict inclusion of this file. If you accidentally encoded an audio track as well, you need to specify “-A” before “movie.avi” - this will tell &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; to not include any audio tracks.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;-D -a 1,2 --compression 1:none --language 1:eng --compression 2:none --language 2:ger --default-duration 0:25fps movie.mpg&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:These parameters tell &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; to include no video track (“-D”) and audio tracks 1 and 2 (“-a 1,2”) from the file &amp;lt;code&amp;gt;movie.mpg&amp;lt;/code&amp;gt;. This is our source file from the DVD and thus contains the MPEG-2 video stream that we reencoded earlier, as well as the original AC3 audio tracks that we are interested in. Note that the audio tracks are tracks 1 and 2 because track 0 in the file &amp;lt;code&amp;gt;movie.mpg&amp;lt;/code&amp;gt; is the video track! Use “&amp;lt;code&amp;gt;mkvmerge --identify movie.mpg&amp;lt;/code&amp;gt;” to list all tracks that &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; recognizes. Also, these parameters tell &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; that audio track 1 is English, and audio track 2 is German. If you want to include more than two audio tracks you need to repeat the respective parameters for all additional audio tracks.&lt;br /&gt;
:If you are muxing a video file that consists of an AVC/h.264 stream you need to specify the duration of a frame because the stream itself does not contain that information; &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; assumes a default of 25 FPS.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;--compression 0:none --language 0:eng --default-track 0:0 movie.en.idx&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:This includes all tracks from the &amp;lt;code&amp;gt;movie.en.idx&amp;lt;/code&amp;gt; file which is a single subtitle track in the English language. The “--default-track 0:0” specifies that the included track with the index 0 (i.e. the only subtitle track in the file) is not a default track. This needs to be specified for all subtitles unless you really want to show a certain subtitle as default when a movie starts. This can be used to include forced subtitles for additional foreign languages spoken in a movie, e.g. the Na’vi language in “Avatar”, or Elfish in “The Lord of the Rings.”&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;--compression 0:none --language 0:ger --default-track 0:0 movie.de.idx&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:Includes the German subtitles.&lt;br /&gt;
&lt;br /&gt;
Voilá, &amp;lt;code&amp;gt;movie.mkv&amp;lt;/code&amp;gt; now contains your movie, all audio tracks, and all subtitle tracks that you want to be in there.&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Main_Page&amp;diff=55</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Main_Page&amp;diff=55"/>
				<updated>2013-06-12T04:55:36Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Change Matroska Properties hinzugefügt.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Contents of this wiki:&lt;br /&gt;
&lt;br /&gt;
== Media ==&lt;br /&gt;
&lt;br /&gt;
* [[Ripping and Encoding DVDs]]&lt;br /&gt;
* [[Encoding DJ Mixes]]&lt;br /&gt;
* [[Changing Matroska Properties]]&lt;br /&gt;
&lt;br /&gt;
=== Photography ===&lt;br /&gt;
&lt;br /&gt;
* [[Capture Images]]&lt;br /&gt;
&lt;br /&gt;
== Security ==&lt;br /&gt;
&lt;br /&gt;
* [[Creating Certificates]]&lt;br /&gt;
* [[Mounting Encrypted Home Directories]]&lt;br /&gt;
&lt;br /&gt;
== Programming ==&lt;br /&gt;
&lt;br /&gt;
* [[Deploying Single Files with Maven]]&lt;br /&gt;
* [[Verifying Header Comments]]&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Changing_Matroska_Properties&amp;diff=54</id>
		<title>Changing Matroska Properties</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Changing_Matroska_Properties&amp;diff=54"/>
				<updated>2013-06-12T04:55:18Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Page created.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Matroska files can have a buttload of internal flags and options, and editing them is actually quite simple.&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
&lt;br /&gt;
For all commands here you need to know which track number you want to work on. That track number is ''n''.&lt;br /&gt;
&lt;br /&gt;
 # mkvinfo file.mkv&lt;br /&gt;
&lt;br /&gt;
== Disabling a Track ==&lt;br /&gt;
&lt;br /&gt;
This is useful if you have a file with more than one audio track, and the player picks the wrong audio track.&lt;br /&gt;
&lt;br /&gt;
 # mkvpropedit file.mkv -e track:''n'' -s flag-enabled=0&lt;br /&gt;
&lt;br /&gt;
== Changing the Default Flag ==&lt;br /&gt;
&lt;br /&gt;
This is useful if you want to turn on a certain subtitle language by default, or you want to change the default language of a file.&lt;br /&gt;
&lt;br /&gt;
''n'' is the number of the track you want to set as default, ''o'' is the number of another track of the same type (audio or subtitle) whose default flag you want to clear. If there is more than one other default track you need to repeat the last section (starting from the ''-e'' flag).&lt;br /&gt;
&lt;br /&gt;
 # mkvpropedit file.mkv -e track:''n'' -s flag-default=1 -e track:''o'' -s flag-default=0 […]&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Main_Page&amp;diff=53</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Main_Page&amp;diff=53"/>
				<updated>2013-01-18T22:44:43Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Added Capture Images.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Contents of this wiki:&lt;br /&gt;
&lt;br /&gt;
== Media ==&lt;br /&gt;
&lt;br /&gt;
* [[Ripping and Encoding DVDs]]&lt;br /&gt;
* [[Encoding DJ Mixes]]&lt;br /&gt;
&lt;br /&gt;
=== Photography ===&lt;br /&gt;
&lt;br /&gt;
* [[Capture Images]]&lt;br /&gt;
&lt;br /&gt;
== Security ==&lt;br /&gt;
&lt;br /&gt;
* [[Creating Certificates]]&lt;br /&gt;
* [[Mounting Encrypted Home Directories]]&lt;br /&gt;
&lt;br /&gt;
== Programming ==&lt;br /&gt;
&lt;br /&gt;
* [[Deploying Single Files with Maven]]&lt;br /&gt;
* [[Verifying Header Comments]]&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Capture_Images&amp;diff=52</id>
		<title>Capture Images</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Capture_Images&amp;diff=52"/>
				<updated>2013-01-18T22:44:28Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Add some useful command lines for taking pictures with gphoto2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
To capture images from the command line using `gphoto2`:&lt;br /&gt;
&lt;br /&gt;
 # gphoto2 --set-config &amp;quot;Capture Size Class&amp;quot;=&amp;quot;Full Image&amp;quot; --capture-preview --force-overwrite --filename=''foo.jpg''&lt;br /&gt;
&lt;br /&gt;
Time-lapse is also possible (but seems to freeze after a few pictures):&lt;br /&gt;
&lt;br /&gt;
 # gphoto2 -I ''10'' --set-config &amp;quot;Capture Size Class&amp;quot;=&amp;quot;Full Image&amp;quot; --capture-image-and-download --filename=''foo_%04n.jpg'' --force-overwrite&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Verifying_Header_Comments&amp;diff=51</id>
		<title>Verifying Header Comments</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Verifying_Header_Comments&amp;diff=51"/>
				<updated>2013-01-17T13:07:38Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Added categories.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A normal Java source file (in my projects) consists of a header like the following one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * FreenetSone - EditImagePage.java - Copyright © 2010–2012 David Roden&lt;br /&gt;
 *&lt;br /&gt;
…&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It should contain the name of the project and the name of the file. Sometimes, due to refactoring or copy/paste, the filename in the header does not match the name of the file in question. The following bash script will locate those files:&lt;br /&gt;
&lt;br /&gt;
 # grep -r &amp;quot;Copyright&amp;quot; src/ | grep &amp;quot;java:&amp;quot; | while read line; do f=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d: -f1)&amp;quot;; c=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d- -f2 | cut -d' ' -f2)&amp;quot;; f2=&amp;quot;$(basename &amp;quot;$f&amp;quot;)&amp;quot;; [ &amp;quot;$c&amp;quot; != &amp;quot;$f2&amp;quot; ] &amp;amp;&amp;amp; echo &amp;quot;$f: $c&amp;quot;; done&lt;br /&gt;
&lt;br /&gt;
And sometimes you even changed the name of the project at some point in the past. Use the following oneliner to find those files that have a different project name than the one you substitute at the end of the command:&lt;br /&gt;
&lt;br /&gt;
 # grep -r &amp;quot;Copyright&amp;quot; src/ | grep &amp;quot;java:&amp;quot; | while read line; do f=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d: -f1)&amp;quot;; project=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d' ' -f3)&amp;quot;; [ $project != &amp;quot;''Sone''&amp;quot; ] &amp;amp;&amp;amp; echo &amp;quot;$f: $project&amp;quot;; done&lt;br /&gt;
&lt;br /&gt;
[[Category:Programming]]&lt;br /&gt;
[[Category:Java]]&lt;br /&gt;
[[Category:Shell]]&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Main_Page&amp;diff=50</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Main_Page&amp;diff=50"/>
				<updated>2013-01-17T13:06:44Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: /* Programming */ Added Verifying Header Comments.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Contents of this wiki:&lt;br /&gt;
&lt;br /&gt;
== Media ==&lt;br /&gt;
&lt;br /&gt;
* [[Ripping and Encoding DVDs]]&lt;br /&gt;
* [[Encoding DJ Mixes]]&lt;br /&gt;
&lt;br /&gt;
== Security ==&lt;br /&gt;
&lt;br /&gt;
* [[Creating Certificates]]&lt;br /&gt;
* [[Mounting Encrypted Home Directories]]&lt;br /&gt;
&lt;br /&gt;
== Programming ==&lt;br /&gt;
&lt;br /&gt;
* [[Deploying Single Files with Maven]]&lt;br /&gt;
* [[Verifying Header Comments]]&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Verifying_Header_Comments&amp;diff=49</id>
		<title>Verifying Header Comments</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Verifying_Header_Comments&amp;diff=49"/>
				<updated>2013-01-17T13:06:25Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Add page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A normal Java source file (in my projects) consists of a header like the following one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * FreenetSone - EditImagePage.java - Copyright © 2010–2012 David Roden&lt;br /&gt;
 *&lt;br /&gt;
…&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It should contain the name of the project and the name of the file. Sometimes, due to refactoring or copy/paste, the filename in the header does not match the name of the file in question. The following bash script will locate those files:&lt;br /&gt;
&lt;br /&gt;
 # grep -r &amp;quot;Copyright&amp;quot; src/ | grep &amp;quot;java:&amp;quot; | while read line; do f=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d: -f1)&amp;quot;; c=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d- -f2 | cut -d' ' -f2)&amp;quot;; f2=&amp;quot;$(basename &amp;quot;$f&amp;quot;)&amp;quot;; [ &amp;quot;$c&amp;quot; != &amp;quot;$f2&amp;quot; ] &amp;amp;&amp;amp; echo &amp;quot;$f: $c&amp;quot;; done&lt;br /&gt;
&lt;br /&gt;
And sometimes you even changed the name of the project at some point in the past. Use the following oneliner to find those files that have a different project name than the one you substitute at the end of the command:&lt;br /&gt;
&lt;br /&gt;
 # grep -r &amp;quot;Copyright&amp;quot; src/ | grep &amp;quot;java:&amp;quot; | while read line; do f=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d: -f1)&amp;quot;; project=&amp;quot;$(echo &amp;quot;$line&amp;quot; | cut -d' ' -f3)&amp;quot;; [ $project != &amp;quot;''Sone''&amp;quot; ] &amp;amp;&amp;amp; echo &amp;quot;$f: $project&amp;quot;; done&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Ripping_and_Encoding_DVDs&amp;diff=48</id>
		<title>Ripping and Encoding DVDs</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Ripping_and_Encoding_DVDs&amp;diff=48"/>
				<updated>2012-12-01T08:35:12Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: /* Copy the Main Title from the DVD */ Store lsdvd output, too.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Encoding]]&lt;br /&gt;
[[Category:Ripping]]&lt;br /&gt;
[[Category:DVD]]&lt;br /&gt;
This page describes in large detail how to create near perfect DVD rips. “Near perfect” in this context means that the video quality is nearly indistinguishable from the DVD video, and all audio tracks contained in the movie are the AC3 tracks that are contained in the DVD without any reencoding whatsoever.&lt;br /&gt;
&lt;br /&gt;
== Copy the Main Title from the DVD ==&lt;br /&gt;
&lt;br /&gt;
All these actions can be performed without copying the movie to a local hard disk first but as a DVD drive is almost always slower than a local hard disk, copying the main title of the movie to the hard disk before processing will save a lot of time.&lt;br /&gt;
&lt;br /&gt;
First, we need to find out which title is the main title. I recommend storing the output of &amp;lt;code&amp;gt;lsdvd&amp;lt;/code&amp;gt;, too, so that you can look at it later, e. g. for subtitle stream IDs, or other technical information.&lt;br /&gt;
&lt;br /&gt;
 $ lsdvd -x ''/path/to/dvd'' &amp;gt; movie.txt&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;lsdvd&amp;lt;/code&amp;gt; can tell you a lot of things about the DVD in question. Especially the track IDs for audio and subtitle tracks will be interesting later on so try not to forget where you got it from. For now it will tell you the longest title on the disc; usually this is the main title. Copy it to the hard disk using &amp;lt;code&amp;gt;tccat&amp;lt;/code&amp;gt; from the &amp;lt;code&amp;gt;transcode&amp;lt;/code&amp;gt; package:&lt;br /&gt;
&lt;br /&gt;
 $ tccat -i /dev/dvd -T ''&amp;lt;title&amp;gt;'',-1 &amp;gt; movie.mpg&lt;br /&gt;
&lt;br /&gt;
While &amp;lt;code&amp;gt;tccat&amp;lt;/code&amp;gt; is busy you can already perform the next steps.&lt;br /&gt;
&lt;br /&gt;
 $ cp ''/path/to/dvd/''VIDEO_TS/VTS_''&amp;lt;vts&amp;gt;''_0.IFO movie.ifo&lt;br /&gt;
&lt;br /&gt;
This will copy the IFO file for the main title to the disc. This file contains information that is relevant for subtitle conversion. If you do not need subtitles, you can skip this. The VTS number of the main title is listed in the &amp;lt;code&amp;gt;lsdvd -x&amp;lt;/code&amp;gt; output from above and is always two digits long.&lt;br /&gt;
&lt;br /&gt;
 $ dvdxchap -t ''&amp;lt;title&amp;gt;'' /dev/dvd &amp;gt; movie.chap&lt;br /&gt;
&lt;br /&gt;
This will extract the chapter information from the main title into a text file. If you want and if you know the names of the chapters, you can now edit this file.&lt;br /&gt;
&lt;br /&gt;
Now we have to wait until &amp;lt;code&amp;gt;tccat&amp;lt;/code&amp;gt; has finished copying the main title to the hard disk. Encoding the video is the next step as it is bound to take quite some time (depending on your hardware) and the rest of the steps (except for multiplexing, of course) can be performed while the video is being encoded.&lt;br /&gt;
&lt;br /&gt;
== Encode the Video ==&lt;br /&gt;
&lt;br /&gt;
Encoding the video has a lot to do with voodoo. When you try to use Google to find “the best options” to encode a DVD you will find none. Or to be more precise, you will find plenty, and they will all contradict each other. There are about a millions ways to encode video; I will only outline some of them.&lt;br /&gt;
&lt;br /&gt;
=== Using avidemux2 ===&lt;br /&gt;
&lt;br /&gt;
Using avidemux2 gives you a nice user interface and easy selection of all relevant parameters for the encoding process. These are the settings I usually use:&lt;br /&gt;
&lt;br /&gt;
* Video Codec: MPEG-4 ASP (xvid)&lt;br /&gt;
* Constant Quality: 5&lt;br /&gt;
* Some time-hungry options, such as High Motion Estimation, Wide Search for Rate Distortion Optimisation, Quarter Pixel Motion Estimation, and Global Motion Compensation. I don’t really care about how long the encoding takes, I’m interesting in the best possible picture.&lt;br /&gt;
* Most important: The Pixel Aspect Ratio has to be set to “as input”! This allows you to crop black borders off of the image without having to recalculate the new width and height of the image.&lt;br /&gt;
* Also, you do not need to set the width and height of the image. The size of the source material in combination with the Pixel Aspect Ratio will automatically take care that the final video is stretched as necessary. Not resizing the picture will also keep the quality of the video material at its maximum; it will never get better when you resize.&lt;br /&gt;
* Disable all audio tracks, as the input MPEG file still contains all audio tracks from the DVD and they don’t need to be encoded.&lt;br /&gt;
&lt;br /&gt;
Now save the file to &amp;lt;code&amp;gt;movie.avi&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Using mencoder ===&lt;br /&gt;
&lt;br /&gt;
Using a command line tool such as &amp;lt;code&amp;gt;mencoder&amp;lt;/code&amp;gt; gives you the possibility to encode on a remote machine, e.g. on your desktop machine when you’re not at home, or on a headless server somewhere in a data warehouse or your basement. Basically, the &amp;lt;code&amp;gt;mencoder&amp;lt;/code&amp;gt; command line looks like this:&lt;br /&gt;
&lt;br /&gt;
 $ mencoder -o movie.avi movie.mpg -nosound -nosub -noautosub -ovc xvid -xvidencopts fixed_quant=3:qpel:gmc:trellis:vhq=4&lt;br /&gt;
&lt;br /&gt;
This will use the &amp;lt;code&amp;gt;xvid&amp;lt;/code&amp;gt; codec at a fixed quantizer (3), enabling a couple of quality-improving options (quarter pixels, global motion compensation, Trellis quantization, motion search algorithm), omitting all audio tracks and subtitles from the original MPEG file.&lt;br /&gt;
&lt;br /&gt;
 $ mencoder -o movie.avi movie.mpg -nosound -nosub -noautosub -ovc xvid -xvidencopts qpel:gmc:trellis:vhq=4:cartoon:interlacing:pass=1:bitrate=-307200&lt;br /&gt;
&lt;br /&gt;
This will used the &amp;lt;code&amp;gt;xvid&amp;lt;/code&amp;gt; codec again but tell it to optimize for interlaced cartoon material, using 2-pass encoding heading for a total amount of 307200 KiB of video stream. (You need to run this command again, substituting &amp;lt;code&amp;gt;:pass=2&amp;lt;/code&amp;gt; at the appropriate place.)&lt;br /&gt;
&lt;br /&gt;
 $ mencoder -o movie.avi movie.mpg -nosound -nosub -noautosub -ovc xvid -xvidencopts fixed_quant=3:qpel:gmc:trellis:vhq=4 -vf pullup,softskip -ofps 24000/1001&lt;br /&gt;
&lt;br /&gt;
This will perform an inverse telecine transformation, reducing NTSC material from 30000/1001 (aka 29.97) fps to 24000/1001 (aka 23.976) fps.&lt;br /&gt;
&lt;br /&gt;
 $ mencoder -o movie.avi movie.mpg -nosound -nosub -noautosub -vf crop=720:416:0:80 -ovc x264 -x264encopts crf=18:preset=veryslow:threads=1&lt;br /&gt;
&lt;br /&gt;
This encodes the video with the x264 codec with a single thread and the “veryslow” preset (which is indeed very slow) and crops the video (reducing the height to 416 pixels, starting at pixel 80).&lt;br /&gt;
&lt;br /&gt;
=== Using x264 ===&lt;br /&gt;
&lt;br /&gt;
It is also possible to use the h.264 encoder &amp;lt;tt&amp;gt;x264&amp;lt;/tt&amp;gt; directly.&lt;br /&gt;
&lt;br /&gt;
 $ x264 --index movie.mpg.idx --no-interlaced --crf 18 --preset veryslow --threads 2 --vf crop:0,80,0,80 -o movie.avi movie.mpg&lt;br /&gt;
&lt;br /&gt;
== Extract Subtitle Tracks ==&lt;br /&gt;
&lt;br /&gt;
After &amp;lt;code&amp;gt;tccat&amp;lt;/code&amp;gt; has finished copying the movie to your hard disk you can extract the subtitle tracks. This is necessary because they have to be converted before &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; can handle them.&lt;br /&gt;
&lt;br /&gt;
 $ tcextract -i movie.mpg -a 0x20 -x ps1 &amp;gt; movie.en.ps1&lt;br /&gt;
&lt;br /&gt;
The ID of the subtitle track (here: 0x20) can be found in the output of &amp;lt;code&amp;gt;lsdvd&amp;lt;/code&amp;gt;. Choose the subtitles you like and extract them one after another.&lt;br /&gt;
&lt;br /&gt;
Now they have to be converted to the VobSub format:&lt;br /&gt;
&lt;br /&gt;
 $ subtitle2vobsub -p movie.en.ps1 -i movie.ifo -o movie.en&lt;br /&gt;
&lt;br /&gt;
This will create the files &amp;lt;code&amp;gt;movie.en.sub&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;movie.en.idx&amp;lt;/code&amp;gt;. Both are necessary for &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; to do its magic.&lt;br /&gt;
&lt;br /&gt;
We’re almost there.&lt;br /&gt;
&lt;br /&gt;
== Mux the Final Video ==&lt;br /&gt;
&lt;br /&gt;
Now all that we have created has to be put together.&lt;br /&gt;
&lt;br /&gt;
 $ mkvmerge -o movie.mkv --title &amp;quot;Movie&amp;quot; --chapter-language eng --chapters movie.chap \&lt;br /&gt;
 --compression 0:none movie.avi \&lt;br /&gt;
 -D -a 1,2 --compression 1:none --language 1:eng --compression 2:none --language 2:ger --default-duration 0:25fps movie.mpg \&lt;br /&gt;
 --compression 0:none --language 0:eng --default-track 0:0 movie.en.idx \&lt;br /&gt;
 --compression 0:none --language 0:ger --default-track 0:0 movie.de.idx&lt;br /&gt;
&lt;br /&gt;
Yes, this command line needs some explaining.&lt;br /&gt;
&lt;br /&gt;
;-o movie.mkv&lt;br /&gt;
:This is the output file that we are creating.&lt;br /&gt;
&lt;br /&gt;
;--title “Movie“&lt;br /&gt;
:Here you can specify the title of the movie. This parameter is optional.&lt;br /&gt;
&lt;br /&gt;
;--chapter-language eng --chapters movie.chap&lt;br /&gt;
:This includes the chapter definitions from the given file and also specifies that the lanuage of the chapters file is English.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;--compression 0:none movie.avi&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:Includes all tracks from the given file in the output file. The “--compression 0:none” parameters tells &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; to not use any kind of header compression. As we only stored a video track in &amp;lt;code&amp;gt;movie.avi&amp;lt;/code&amp;gt; we do not need to restrict inclusion of this file. If you accidentally encoded an audio track as well, you need to specify “-A” before “movie.avi” - this will tell &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; to not include any audio tracks.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;-D -a 1,2 --compression 1:none --language 1:eng --compression 2:none --language 2:ger --default-duration 0:25fps movie.mpg&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:These parameters tell &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; to include no video track (“-D”) and audio tracks 1 and 2 (“-a 1,2”) from the file &amp;lt;code&amp;gt;movie.mpg&amp;lt;/code&amp;gt;. This is our source file from the DVD and thus contains the MPEG-2 video stream that we reencoded earlier, as well as the original AC3 audio tracks that we are interested in. Note that the audio tracks are tracks 1 and 2 because track 0 in the file &amp;lt;code&amp;gt;movie.mpg&amp;lt;/code&amp;gt; is the video track! Use “&amp;lt;code&amp;gt;mkvmerge --identify movie.mpg&amp;lt;/code&amp;gt;” to list all tracks that &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; recognizes. Also, these parameters tell &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; that audio track 1 is English, and audio track 2 is German. If you want to include more than two audio tracks you need to repeat the respective parameters for all additional audio tracks.&lt;br /&gt;
:If you are muxing a video file that consists of an AVC/h.264 stream you need to specify the duration of a frame because the stream itself does not contain that information; &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; assumes a default of 25 FPS.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;--compression 0:none --language 0:eng --default-track 0:0 movie.en.idx&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:This includes all tracks from the &amp;lt;code&amp;gt;movie.en.idx&amp;lt;/code&amp;gt; file which is a single subtitle track in the English language. The “--default-track 0:0” specifies that the included track with the index 0 (i.e. the only subtitle track in the file) is not a default track. This needs to be specified for all subtitles unless you really want to show a certain subtitle as default when a movie starts. This can be used to include forced subtitles for additional foreign languages spoken in a movie, e.g. the Na’vi language in “Avatar”, or Elfish in “The Lord of the Rings.”&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;--compression 0:none --language 0:ger --default-track 0:0 movie.de.idx&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:Includes the German subtitles.&lt;br /&gt;
&lt;br /&gt;
Voilá, &amp;lt;code&amp;gt;movie.mkv&amp;lt;/code&amp;gt; now contains your movie, all audio tracks, and all subtitle tracks that you want to be in there.&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=User:Bombe/common.css&amp;diff=47</id>
		<title>User:Bombe/common.css</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=User:Bombe/common.css&amp;diff=47"/>
				<updated>2012-11-30T06:27:54Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Remove content.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=User:Bombe/common.css&amp;diff=46</id>
		<title>User:Bombe/common.css</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=User:Bombe/common.css&amp;diff=46"/>
				<updated>2012-11-30T06:26:51Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Add quotes.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;body { font-family: &amp;quot;TitilliumText25L&amp;quot;; }&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=User:Bombe/common.css&amp;diff=45</id>
		<title>User:Bombe/common.css</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=User:Bombe/common.css&amp;diff=45"/>
				<updated>2012-11-30T06:23:52Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Use correct CSS name.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;body { font-family: TitilliumText25L; }&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=User:Bombe/common.css&amp;diff=44</id>
		<title>User:Bombe/common.css</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=User:Bombe/common.css&amp;diff=44"/>
				<updated>2012-11-30T06:20:00Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Use custom font.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;body { font-face: TitilliumText25L; }&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Creating_Moviegrams&amp;diff=43</id>
		<title>Creating Moviegrams</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Creating_Moviegrams&amp;diff=43"/>
				<updated>2012-11-04T22:02:51Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Print progress while cutting columns.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;First get the width, length and framerate of the movie you want to create a moviegram of:&lt;br /&gt;
&lt;br /&gt;
 # mediainfo -f movie.avi | grep '\(Width\|Frame \(rate\|count\)\)'&lt;br /&gt;
&lt;br /&gt;
Find out the ratio at which to play the movie:&lt;br /&gt;
&lt;br /&gt;
 # echo '3 k ''&amp;lt;fps&amp;gt;'' ''&amp;lt;number of frames&amp;gt;'' ''&amp;lt;movie width&amp;gt;'' / / p' | dc&lt;br /&gt;
&lt;br /&gt;
This will probably result in a number smaller than &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Now cut the single frames out of the movie:&lt;br /&gt;
&lt;br /&gt;
 # avconv -i movie.avi -vsync 1 -r ''rate'' image-%04.pnm&lt;br /&gt;
&lt;br /&gt;
Cut a single column from all those frames:&lt;br /&gt;
&lt;br /&gt;
 # for i in `seq 1 ''width''`; do f=&amp;quot;$(seq -f %04g $i $i)&amp;quot;; echo $f; pamcut -left &amp;quot;$(($i- 1))&amp;quot; -width 1 &amp;lt; &amp;quot;image-${f}.pnm&amp;quot; &amp;gt; &amp;quot;col-${f}.pnm&amp;quot;; done&lt;br /&gt;
&lt;br /&gt;
Combine all the columns into a single image:&lt;br /&gt;
&lt;br /&gt;
 # pnmcat -lr col-0*.pnm &amp;gt; part-1.pnm # pnmcat can only open 1024 files at once so we have to process it in smaller batches&lt;br /&gt;
 # pnmcat -lr col-1*.pnm &amp;gt; part-2.pnm&lt;br /&gt;
 # pnmcat -lr part-*.pnm | pnmtopng &amp;gt; moviegram.png&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Creating_Moviegrams&amp;diff=42</id>
		<title>Creating Moviegrams</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Creating_Moviegrams&amp;diff=42"/>
				<updated>2012-11-04T21:49:19Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: Created page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;First get the width, length and framerate of the movie you want to create a moviegram of:&lt;br /&gt;
&lt;br /&gt;
 # mediainfo -f movie.avi | grep '\(Width\|Frame \(rate\|count\)\)'&lt;br /&gt;
&lt;br /&gt;
Find out the ratio at which to play the movie:&lt;br /&gt;
&lt;br /&gt;
 # echo '3 k ''&amp;lt;fps&amp;gt;'' ''&amp;lt;number of frames&amp;gt;'' ''&amp;lt;movie width&amp;gt;'' / / p' | dc&lt;br /&gt;
&lt;br /&gt;
This will probably result in a number smaller than &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Now cut the single frames out of the movie:&lt;br /&gt;
&lt;br /&gt;
 # avconv -i movie.avi -vsync 1 -r ''rate'' image-%04.pnm&lt;br /&gt;
&lt;br /&gt;
Cut a single column from all those frames:&lt;br /&gt;
&lt;br /&gt;
 # for i in `seq 1 ''width''`; do f=&amp;quot;$(seq -f %04g $i $i)&amp;quot;; pamcut -left &amp;quot;$(($i- 1))&amp;quot; -width 1 &amp;lt; &amp;quot;image-${f}.pnm&amp;quot; &amp;gt; &amp;quot;col-${f}.pnm&amp;quot;; done&lt;br /&gt;
&lt;br /&gt;
Combine all the columns into a single image:&lt;br /&gt;
&lt;br /&gt;
 # pnmcat -lr col-0*.pnm &amp;gt; part-1.pnm # pnmcat can only open 1024 files at once so we have to process it in smaller batches&lt;br /&gt;
 # pnmcat -lr col-1*.pnm &amp;gt; part-2.pnm&lt;br /&gt;
 # pnmcat -lr part-*.pnm | pnmtopng &amp;gt; moviegram.png&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	<entry>
		<id>https://wiki.pterodactylus.net/index.php?title=Ripping_and_Encoding_DVDs&amp;diff=41</id>
		<title>Ripping and Encoding DVDs</title>
		<link rel="alternate" type="text/html" href="https://wiki.pterodactylus.net/index.php?title=Ripping_and_Encoding_DVDs&amp;diff=41"/>
				<updated>2012-10-06T11:54:24Z</updated>
		
		<summary type="html">&lt;p&gt;Bombe: /* Copy the Main Title from the DVD */ Extend lsdvd command to include the DVD’s path.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Encoding]]&lt;br /&gt;
[[Category:Ripping]]&lt;br /&gt;
[[Category:DVD]]&lt;br /&gt;
This page describes in large detail how to create near perfect DVD rips. “Near perfect” in this context means that the video quality is nearly indistinguishable from the DVD video, and all audio tracks contained in the movie are the AC3 tracks that are contained in the DVD without any reencoding whatsoever.&lt;br /&gt;
&lt;br /&gt;
== Copy the Main Title from the DVD ==&lt;br /&gt;
&lt;br /&gt;
All these actions can be performed without copying the movie to a local hard disk first but as a DVD drive is almost always slower than a local hard disk, copying the main title of the movie to the hard disk before processing will save a lot of time.&lt;br /&gt;
&lt;br /&gt;
First, we need to find out which title is the main title.&lt;br /&gt;
&lt;br /&gt;
 $ lsdvd -x ''/path/to/dvd''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;lsdvd&amp;lt;/code&amp;gt; can tell you a lot of things about the DVD in question. Especially the track IDs for audio and subtitle tracks will be interesting later on so try not to forget where you got it from. For now it will tell you the longest title on the disc; usually this is the main title. Copy it to the hard disk using &amp;lt;code&amp;gt;tccat&amp;lt;/code&amp;gt; from the &amp;lt;code&amp;gt;transcode&amp;lt;/code&amp;gt; package:&lt;br /&gt;
&lt;br /&gt;
 $ tccat -i /dev/dvd -T ''&amp;lt;title&amp;gt;'',-1 &amp;gt; movie.mpg&lt;br /&gt;
&lt;br /&gt;
While &amp;lt;code&amp;gt;tccat&amp;lt;/code&amp;gt; is busy you can already perform the next steps.&lt;br /&gt;
&lt;br /&gt;
 $ cp ''/path/to/dvd/''VIDEO_TS/VTS_''&amp;lt;vts&amp;gt;''_0.IFO movie.ifo&lt;br /&gt;
&lt;br /&gt;
This will copy the IFO file for the main title to the disc. This file contains information that is relevant for subtitle conversion. If you do not need subtitles, you can skip this. The VTS number of the main title is listed in the &amp;lt;code&amp;gt;lsdvd -x&amp;lt;/code&amp;gt; output from above and is always two digits long.&lt;br /&gt;
&lt;br /&gt;
 $ dvdxchap -t ''&amp;lt;title&amp;gt;'' /dev/dvd &amp;gt; movie.chap&lt;br /&gt;
&lt;br /&gt;
This will extract the chapter information from the main title into a text file. If you want and if you know the names of the chapters, you can now edit this file.&lt;br /&gt;
&lt;br /&gt;
Now we have to wait until &amp;lt;code&amp;gt;tccat&amp;lt;/code&amp;gt; has finished copying the main title to the hard disk. Encoding the video is the next step as it is bound to take quite some time (depending on your hardware) and the rest of the steps (except for multiplexing, of course) can be performed while the video is being encoded.&lt;br /&gt;
&lt;br /&gt;
== Encode the Video ==&lt;br /&gt;
&lt;br /&gt;
Encoding the video has a lot to do with voodoo. When you try to use Google to find “the best options” to encode a DVD you will find none. Or to be more precise, you will find plenty, and they will all contradict each other. There are about a millions ways to encode video; I will only outline some of them.&lt;br /&gt;
&lt;br /&gt;
=== Using avidemux2 ===&lt;br /&gt;
&lt;br /&gt;
Using avidemux2 gives you a nice user interface and easy selection of all relevant parameters for the encoding process. These are the settings I usually use:&lt;br /&gt;
&lt;br /&gt;
* Video Codec: MPEG-4 ASP (xvid)&lt;br /&gt;
* Constant Quality: 5&lt;br /&gt;
* Some time-hungry options, such as High Motion Estimation, Wide Search for Rate Distortion Optimisation, Quarter Pixel Motion Estimation, and Global Motion Compensation. I don’t really care about how long the encoding takes, I’m interesting in the best possible picture.&lt;br /&gt;
* Most important: The Pixel Aspect Ratio has to be set to “as input”! This allows you to crop black borders off of the image without having to recalculate the new width and height of the image.&lt;br /&gt;
* Also, you do not need to set the width and height of the image. The size of the source material in combination with the Pixel Aspect Ratio will automatically take care that the final video is stretched as necessary. Not resizing the picture will also keep the quality of the video material at its maximum; it will never get better when you resize.&lt;br /&gt;
* Disable all audio tracks, as the input MPEG file still contains all audio tracks from the DVD and they don’t need to be encoded.&lt;br /&gt;
&lt;br /&gt;
Now save the file to &amp;lt;code&amp;gt;movie.avi&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Using mencoder ===&lt;br /&gt;
&lt;br /&gt;
Using a command line tool such as &amp;lt;code&amp;gt;mencoder&amp;lt;/code&amp;gt; gives you the possibility to encode on a remote machine, e.g. on your desktop machine when you’re not at home, or on a headless server somewhere in a data warehouse or your basement. Basically, the &amp;lt;code&amp;gt;mencoder&amp;lt;/code&amp;gt; command line looks like this:&lt;br /&gt;
&lt;br /&gt;
 $ mencoder -o movie.avi movie.mpg -nosound -nosub -noautosub -ovc xvid -xvidencopts fixed_quant=3:qpel:gmc:trellis:vhq=4&lt;br /&gt;
&lt;br /&gt;
This will use the &amp;lt;code&amp;gt;xvid&amp;lt;/code&amp;gt; codec at a fixed quantizer (3), enabling a couple of quality-improving options (quarter pixels, global motion compensation, Trellis quantization, motion search algorithm), omitting all audio tracks and subtitles from the original MPEG file.&lt;br /&gt;
&lt;br /&gt;
 $ mencoder -o movie.avi movie.mpg -nosound -nosub -noautosub -ovc xvid -xvidencopts qpel:gmc:trellis:vhq=4:cartoon:interlacing:pass=1:bitrate=-307200&lt;br /&gt;
&lt;br /&gt;
This will used the &amp;lt;code&amp;gt;xvid&amp;lt;/code&amp;gt; codec again but tell it to optimize for interlaced cartoon material, using 2-pass encoding heading for a total amount of 307200 KiB of video stream. (You need to run this command again, substituting &amp;lt;code&amp;gt;:pass=2&amp;lt;/code&amp;gt; at the appropriate place.)&lt;br /&gt;
&lt;br /&gt;
 $ mencoder -o movie.avi movie.mpg -nosound -nosub -noautosub -ovc xvid -xvidencopts fixed_quant=3:qpel:gmc:trellis:vhq=4 -vf pullup,softskip -ofps 24000/1001&lt;br /&gt;
&lt;br /&gt;
This will perform an inverse telecine transformation, reducing NTSC material from 30000/1001 (aka 29.97) fps to 24000/1001 (aka 23.976) fps.&lt;br /&gt;
&lt;br /&gt;
 $ mencoder -o movie.avi movie.mpg -nosound -nosub -noautosub -vf crop=720:416:0:80 -ovc x264 -x264encopts crf=18:preset=veryslow:threads=1&lt;br /&gt;
&lt;br /&gt;
This encodes the video with the x264 codec with a single thread and the “veryslow” preset (which is indeed very slow) and crops the video (reducing the height to 416 pixels, starting at pixel 80).&lt;br /&gt;
&lt;br /&gt;
=== Using x264 ===&lt;br /&gt;
&lt;br /&gt;
It is also possible to use the h.264 encoder &amp;lt;tt&amp;gt;x264&amp;lt;/tt&amp;gt; directly.&lt;br /&gt;
&lt;br /&gt;
 $ x264 --index movie.mpg.idx --no-interlaced --crf 18 --preset veryslow --threads 2 --vf crop:0,80,0,80 -o movie.avi movie.mpg&lt;br /&gt;
&lt;br /&gt;
== Extract Subtitle Tracks ==&lt;br /&gt;
&lt;br /&gt;
After &amp;lt;code&amp;gt;tccat&amp;lt;/code&amp;gt; has finished copying the movie to your hard disk you can extract the subtitle tracks. This is necessary because they have to be converted before &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; can handle them.&lt;br /&gt;
&lt;br /&gt;
 $ tcextract -i movie.mpg -a 0x20 -x ps1 &amp;gt; movie.en.ps1&lt;br /&gt;
&lt;br /&gt;
The ID of the subtitle track (here: 0x20) can be found in the output of &amp;lt;code&amp;gt;lsdvd&amp;lt;/code&amp;gt;. Choose the subtitles you like and extract them one after another.&lt;br /&gt;
&lt;br /&gt;
Now they have to be converted to the VobSub format:&lt;br /&gt;
&lt;br /&gt;
 $ subtitle2vobsub -p movie.en.ps1 -i movie.ifo -o movie.en&lt;br /&gt;
&lt;br /&gt;
This will create the files &amp;lt;code&amp;gt;movie.en.sub&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;movie.en.idx&amp;lt;/code&amp;gt;. Both are necessary for &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; to do its magic.&lt;br /&gt;
&lt;br /&gt;
We’re almost there.&lt;br /&gt;
&lt;br /&gt;
== Mux the Final Video ==&lt;br /&gt;
&lt;br /&gt;
Now all that we have created has to be put together.&lt;br /&gt;
&lt;br /&gt;
 $ mkvmerge -o movie.mkv --title &amp;quot;Movie&amp;quot; --chapter-language eng --chapters movie.chap \&lt;br /&gt;
 --compression 0:none movie.avi \&lt;br /&gt;
 -D -a 1,2 --compression 1:none --language 1:eng --compression 2:none --language 2:ger --default-duration 0:25fps movie.mpg \&lt;br /&gt;
 --compression 0:none --language 0:eng --default-track 0:0 movie.en.idx \&lt;br /&gt;
 --compression 0:none --language 0:ger --default-track 0:0 movie.de.idx&lt;br /&gt;
&lt;br /&gt;
Yes, this command line needs some explaining.&lt;br /&gt;
&lt;br /&gt;
;-o movie.mkv&lt;br /&gt;
:This is the output file that we are creating.&lt;br /&gt;
&lt;br /&gt;
;--title “Movie“&lt;br /&gt;
:Here you can specify the title of the movie. This parameter is optional.&lt;br /&gt;
&lt;br /&gt;
;--chapter-language eng --chapters movie.chap&lt;br /&gt;
:This includes the chapter definitions from the given file and also specifies that the lanuage of the chapters file is English.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;--compression 0:none movie.avi&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:Includes all tracks from the given file in the output file. The “--compression 0:none” parameters tells &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; to not use any kind of header compression. As we only stored a video track in &amp;lt;code&amp;gt;movie.avi&amp;lt;/code&amp;gt; we do not need to restrict inclusion of this file. If you accidentally encoded an audio track as well, you need to specify “-A” before “movie.avi” - this will tell &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; to not include any audio tracks.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;-D -a 1,2 --compression 1:none --language 1:eng --compression 2:none --language 2:ger --default-duration 0:25fps movie.mpg&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:These parameters tell &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; to include no video track (“-D”) and audio tracks 1 and 2 (“-a 1,2”) from the file &amp;lt;code&amp;gt;movie.mpg&amp;lt;/code&amp;gt;. This is our source file from the DVD and thus contains the MPEG-2 video stream that we reencoded earlier, as well as the original AC3 audio tracks that we are interested in. Note that the audio tracks are tracks 1 and 2 because track 0 in the file &amp;lt;code&amp;gt;movie.mpg&amp;lt;/code&amp;gt; is the video track! Use “&amp;lt;code&amp;gt;mkvmerge --identify movie.mpg&amp;lt;/code&amp;gt;” to list all tracks that &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; recognizes. Also, these parameters tell &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; that audio track 1 is English, and audio track 2 is German. If you want to include more than two audio tracks you need to repeat the respective parameters for all additional audio tracks.&lt;br /&gt;
:If you are muxing a video file that consists of an AVC/h.264 stream you need to specify the duration of a frame because the stream itself does not contain that information; &amp;lt;code&amp;gt;mkvmerge&amp;lt;/code&amp;gt; assumes a default of 25 FPS.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;--compression 0:none --language 0:eng --default-track 0:0 movie.en.idx&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:This includes all tracks from the &amp;lt;code&amp;gt;movie.en.idx&amp;lt;/code&amp;gt; file which is a single subtitle track in the English language. The “--default-track 0:0” specifies that the included track with the index 0 (i.e. the only subtitle track in the file) is not a default track. This needs to be specified for all subtitles unless you really want to show a certain subtitle as default when a movie starts. This can be used to include forced subtitles for additional foreign languages spoken in a movie, e.g. the Na’vi language in “Avatar”, or Elfish in “The Lord of the Rings.”&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;--compression 0:none --language 0:ger --default-track 0:0 movie.de.idx&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:Includes the German subtitles.&lt;br /&gt;
&lt;br /&gt;
Voilá, &amp;lt;code&amp;gt;movie.mkv&amp;lt;/code&amp;gt; now contains your movie, all audio tracks, and all subtitle tracks that you want to be in there.&lt;/div&gt;</summary>
		<author><name>Bombe</name></author>	</entry>

	</feed>