<?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>Aleks&#039; Domain &#187; Tips and Tricks</title>
	<atom:link href="http://metaleks.net/category/open-source/tips-and-tricks/feed" rel="self" type="application/rss+xml" />
	<link>http://metaleks.net</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Mon, 19 Apr 2010 20:33:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>A Fansub Editing Tip</title>
		<link>http://metaleks.net/animes/a-fansub-editing-tip</link>
		<comments>http://metaleks.net/animes/a-fansub-editing-tip#comments</comments>
		<pubDate>Fri, 08 Jan 2010 03:57:23 +0000</pubDate>
		<dc:creator>Aleksandar Micovic</dc:creator>
				<category><![CDATA[Anime]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[editing]]></category>
		<category><![CDATA[one-liner]]></category>

		<guid isPermaLink="false">http://metaleks.net/?p=729</guid>
		<description><![CDATA[It seems that most of my posts have been crazy one-liners that do more than they should. This post is no different.
Motivation
Remember how your high school English teachers always stressed that you should be reading and re-reading your own work before submitting it? Out loud? It&#8217;s almost a fool-proof way to catch mistakes, but reading [...]]]></description>
			<content:encoded><![CDATA[<p>It seems that most of my posts have been crazy one-liners that do more than they should. This post is no different.</p>
<h3>Motivation</h3>
<p>Remember how your high school English teachers always stressed that you should be reading and re-reading your own work before submitting it? <em>Out loud?</em> It&#8217;s almost a fool-proof way to catch mistakes, but reading can get tedious depending on what you have to read. In my case, I&#8217;ve recently started editing fansubs (Japanese animation, specifically) and found that reading the scripts can be quite difficult at times. So, I&#8217;ve put a small one-liner together to read the script for me!</p>
<h3>The Code</h3>
<p>Here is the line that solves my problems, followed by an explanation of it, for those of you who care.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cat</span> TARGET.ass <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #ff0000;">&quot;Dialogue&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/.*}\|.*0,,\|\\N//g'</span> <span style="color: #000000; font-weight: bold;">|</span> festival <span style="color: #660033;">--pipe</span> <span style="color: #660033;">--tts</span></pre></div></div>

<p>This only works on .ass files, and if you want to run it replace the <strong>TARGET.ass</strong> with the path to your script file. So, how does this work? Like this.</p>
<p>We first grab all of the file&#8217;s contents with <strong>cat TARGET.ass</strong>. Then, the entire script is filtered line by line allowing only the lines that start with &#8220;Dialogue&#8221; to pass through to the next stage. This is done with the <strong>grep &#8220;Dialogue&#8221;</strong> part. Next, and probably the most funky part of this entire one-liner is when the program <strong>sed</strong> is invoked. Basically, what <strong>sed -e &#8217;s/.*}\|.*0,,\|\\N//g&#8217; </strong> does is it removes everything that&#8217;s not actual dialogue. Why is this needed? Unfortunately, even though we have all of the lines that contain actual dialogue, every single one of these lines is littered with .ass format and control tags. All of this is filtered out, and we&#8217;re left with clean dialogue. The funky looking code is called a <a href="http://en.wikipedia.org/wiki/Regular_expression">regular expression</a>, if you&#8217;re interested. </p>
<p>At this point, we&#8217;re pretty much done. The last thing that needs to be done is to somehow give our script to a text-to-speech program. This is done with the <strong>festival &#8211;pipe &#8211;tts</strong> part. The program <strong>festival</strong> is a text-to-speech program, and if you&#8217;re wondering about the extra arguments passed to it, feel free to hit up the manual.</p>
<p>The default voice is pretty crap, but a simple search on Google reveals a plethora of guides on how to install different (and better!) voices.</p>
<p>I hope that this helps some of you!</p>
]]></content:encoded>
			<wfw:commentRss>http://metaleks.net/animes/a-fansub-editing-tip/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Removing Audio Delay From Videos</title>
		<link>http://metaleks.net/open-source/removing-audio-delay</link>
		<comments>http://metaleks.net/open-source/removing-audio-delay#comments</comments>
		<pubDate>Sat, 31 Oct 2009 08:22:27 +0000</pubDate>
		<dc:creator>Aleksandar Micovic</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[mencoder]]></category>
		<category><![CDATA[videos]]></category>

		<guid isPermaLink="false">http://metaleks.net/?p=566</guid>
		<description><![CDATA[I&#8217;m often amazed at the things that can be accomplished with a single command. Seriously. A show I had recently downloaded didn&#8217;t have its video and audio synced. I don&#8217;t know about you, but for me, this is incredibly annoying. So much so, that I couldn&#8217;t watch it.
Luckily, there is a way to fix this. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m often amazed at the things that can be accomplished with a single command. Seriously. A show I had recently downloaded didn&#8217;t have its video and audio synced. I don&#8217;t know about you, but for me, this is incredibly annoying. So much so, that I couldn&#8217;t watch it.</p>
<p>Luckily, there is a way to fix this. If you&#8217;re suffering from the same problem, you&#8217;ll need mencoder. If you use Ubuntu, it&#8217;s in the repositories. Here is the command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mencoder <span style="color: #660033;">-audio-delay</span> <span style="color: #000000;">0.5</span> <span style="color: #660033;">-oac</span> copy <span style="color: #660033;">-ovc</span> copy TARGET.mpg <span style="color: #660033;">-o</span> OUTPUT.mpg</pre></div></div>

<p>If your audio is too fast, this example slows the audio down by half a second. The <strong>-oac copy</strong> and <strong>-ovc copy</strong> are so that we preserve the original quality of our file. You can change them if you&#8217;d like. TARGET is your target file, and OUTPUT is obviously your output. Make sure that you add the proper file extensions. In the example above I used <em>.mpg</em>.</p>
<p>Anyway, you&#8217;ll probably have to run this a few times, changing the delay so that it matches your video, and then testing it. It took me three tries to get it synced properly.</p>
]]></content:encoded>
			<wfw:commentRss>http://metaleks.net/open-source/removing-audio-delay/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Removing Extra Ubuntu Entries in GRUB</title>
		<link>http://metaleks.net/open-source/ubuntu/removing-extra-ubuntu-entries-in-grub</link>
		<comments>http://metaleks.net/open-source/ubuntu/removing-extra-ubuntu-entries-in-grub#comments</comments>
		<pubDate>Tue, 15 Sep 2009 03:28:35 +0000</pubDate>
		<dc:creator>Aleksandar Micovic</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[boot]]></category>
		<category><![CDATA[grub]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://metaleks.net/?p=508</guid>
		<description><![CDATA[If you&#8217;ve used Ubuntu through any kernel updates, you&#8217;ll know that each major update will place not one, but two entries for booting from GRUB. A normal boot, and a safe mode. If you receive three updates, that&#8217;s a total of six new entries. Not to mention that if you&#8217;re dual booting like me, you&#8217;ll [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve used Ubuntu through any kernel updates, you&#8217;ll know that each major update will place not one, but <em>two</em> entries for booting from GRUB. A normal boot, and a safe mode. If you receive three updates, that&#8217;s a total of six new entries. Not to mention that if you&#8217;re dual booting like me, you&#8217;ll have even more. I&#8217;ve been putting it off for a while, mostly because I didn&#8217;t care for the solution. But, I was bored today and I decided to look it up. I&#8217;m glad I did. It&#8217;s a lot easier than I thought.</p>
<p><code>sudo vim /boot/grub/menu.lst</code></p>
<p>That&#8217;s it. Then just comment out the entries (they span multiple lines, and are near the end of the file). If you don&#8217;t like vim, or working through the terminal then run the command below to edit the file in gedit.</p>
<p><code>gksu gedit /boot/grub/menu.lst</code></p>
<p>Once you have the file open, just comment out the entries by placing a &#8220;#&#8221; before every line in the entry. You may be tempted to delete some of the entries, but really, why would you want to do that? Commenting them out solves the problem, and if something does go wrong with your current kernel, you can always uncomment an Ubuntu entry that doesn&#8217;t have the problem.</p>
<p>A commented entry looks like this.</p>
<p><code>#title		Ubuntu 9.04, kernel 2.6.28-11-generic<br />
#uuid		b511d0d6-7d11-4909-bf5e-9764fce42f96<br />
#kernel		/boot/vmlinuz-2.6.28-11-generic root=UUID=b511d0d6-7d11-4909-bf5e-9764fce42f96 ro quiet splash<br />
#initrd		/boot/initrd.img-2.6.28-11-generic<br />
#quiet</code></p>
<p>Hope this helps.</p>
]]></content:encoded>
			<wfw:commentRss>http://metaleks.net/open-source/ubuntu/removing-extra-ubuntu-entries-in-grub/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting Ventrilo To Work In WINE</title>
		<link>http://metaleks.net/open-source/getting-ventrilo-to-work-in-wine</link>
		<comments>http://metaleks.net/open-source/getting-ventrilo-to-work-in-wine#comments</comments>
		<pubDate>Mon, 24 Mar 2008 05:06:35 +0000</pubDate>
		<dc:creator>Aleksandar Micovic</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[ventrilo]]></category>
		<category><![CDATA[WINE]]></category>

		<guid isPermaLink="false">http://metaleks.net/blog/software/getting-ventrilo-to-work-in-wine/</guid>
		<description><![CDATA[Let me start off by saying that if you want to support Linux, then use TeamSpeak.  But if you&#8217;re like me and for some reason you must use Ventrilo, then you&#8217;ve come to the right place.  Ventrilo can work under Linux using WINE.  Quite easily too.  That is, if you follow [...]]]></description>
			<content:encoded><![CDATA[<p>Let me start off by saying that if you want to support Linux, then use <a href="http://goteamspeak.com/">TeamSpeak</a>.  But if you&#8217;re like me and for some reason you <em>must</em> use Ventrilo, then you&#8217;ve come to the right place.  Ventrilo can work under Linux using WINE.  Quite easily too.  That is, if you follow this guide.</p>
<p>Truth be told, I shouldn&#8217;t be making this post.  The Linux version of Ventrilo is officially &#8220;under development&#8221;  But, between you and me, I don&#8217;t think it&#8217;ll come out any time soon.  So, with that said!  Let&#8217;s begin.  I&#8217;m going to assume you have WINE installed on your system, and you&#8217;re ready to go.  At the time of writing this, the current version is 0.9.57.</p>
<ul>
<li>Download the Ventrilo executable from the <a href="http://www.ventrilo.com/">Ventrilo website</a>.  Install it using WINE.</li>
<li>Try running Ventrilo now.  With this WINE version, Ventrilo runs and displays the GUI without any problems.  I would expect that future releases of WINE won&#8217;t break it.</li>
<li>Now that you have Ventrilo installed, exit WINE and try to locate your Windows box.  There is a file that we need from there.  I&#8217;ve searched the internet thoroughly, this file is not online!  Or at least, I can&#8217;t find it.  My google-fu ain&#8217;t what it used to be.  Anyways, the file we are looking for is located at:</li>
<p></p>
<pre>C:/WINDOWS/system32/msgsm32.acm</pre>
<li>As far as I know, it shouldn&#8217;t matter if you&#8217;re trying to get Ventrilo to work on a 32-bit or 64-bit system.  I know that there is a &#8220;32&#8243; in msgsm32, but trust me, it doesn&#8217;t matter.  At least for me, anyway.  The next step is to edit a WINE file.  Open up the file below with your favourite text editor.</li>
<p></p>
<pre>~/.wine/drive_c/windows/system.ini</pre>
<li>Next, add this line to the file.</li>
<p></p>
<pre>MSACM.msgsm610=msgsm32.acm</pre>
<li>Now WINE should recognize the GSM codec.  And that&#8217;s it!  Ventrilo should work now.</li>
</ul>
<p>Of course, it&#8217;s never that simple.  Ventrilo will still get a graphical glitch every now and then.  It&#8217;s nothing too big, but can be annoying when you&#8217;re trying to change channels (they start to look mashed together).  It&#8217;s also worth noting that while this solution works, currently the push-to-talk feature does not work.  This isn&#8217;t a Ventrilo problem, but rather a WINE problem.  It would seem that WINE does not handle events properly.  There is a pretty ugly work around for this located right <a href="http://ubuntuforums.org/showpost.php?p=2662867&#038;postcount=83">here</a>.  If you&#8217;re going to try the fix, do <em>not</em> use characters like ctrl or alt for your push-to-talk hotkeys (they never worked for me).  64-bit systems will also have trouble with the fix.</p>
<p>If you have problems, here are a few links:</p>
<p><a href="http://ubuntuforums.org/showthread.php?t=41737">A thread about Ventrilo and WINE.</a><br />
<a href="http://ubuntuforums.org/showpost.php?p=2662867&#038;postcount=83">The ugly fix.</a> (Same one as above)<br />
<a href="http://appdb.winehq.org/objectManager.php?sClass=version&#038;iId=9832&#038;iTestingId=17657">The Wine AppDB page for Ventrilo</a></p>
<p>If you have any trouble following the fix, just post a comment.  I hope this helps someone out!  <img src='http://metaleks.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://metaleks.net/open-source/getting-ventrilo-to-work-in-wine/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
