<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>mochaRHW Linux Blog</title>
	<atom:link href="http://linuxmoc.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://linuxmoc.wordpress.com</link>
	<description></description>
	<lastBuildDate>Mon, 30 Jan 2012 14:50:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='linuxmoc.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>mochaRHW Linux Blog</title>
		<link>http://linuxmoc.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://linuxmoc.wordpress.com/osd.xml" title="mochaRHW Linux Blog" />
	<atom:link rel='hub' href='http://linuxmoc.wordpress.com/?pushpress=hub'/>
		<item>
		<title>MIDI in Linux via Wine and embedded in the browser</title>
		<link>http://linuxmoc.wordpress.com/2011/06/11/midi-in-linux-via-wine-and-embedded-in-the-browser/</link>
		<comments>http://linuxmoc.wordpress.com/2011/06/11/midi-in-linux-via-wine-and-embedded-in-the-browser/#comments</comments>
		<pubDate>Sat, 11 Jun 2011 07:09:18 +0000</pubDate>
		<dc:creator>mocharhw</dc:creator>
				<category><![CDATA[Audio]]></category>
		<category><![CDATA[Wine]]></category>
		<category><![CDATA[aire freshener]]></category>
		<category><![CDATA[chimes]]></category>
		<category><![CDATA[embedded midi]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[midi]]></category>
		<category><![CDATA[midi in wine]]></category>
		<category><![CDATA[peter hirschberg]]></category>
		<category><![CDATA[soundfonts]]></category>
		<category><![CDATA[syntrillium]]></category>
		<category><![CDATA[syntrillium wind chimes]]></category>
		<category><![CDATA[timidity]]></category>

		<guid isPermaLink="false">http://linuxmoc.wordpress.com/?p=72</guid>
		<description><![CDATA[Wow, maybe I should start using this blog!  Anyway, here&#8217;s a few interesting things to do in Linux if you are still stuck on MIDI. A few days ago I was thinking about the old days and looking at my &#8230; <a href="http://linuxmoc.wordpress.com/2011/06/11/midi-in-linux-via-wine-and-embedded-in-the-browser/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxmoc.wordpress.com&amp;blog=5323156&amp;post=72&amp;subd=linuxmoc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Wow, maybe I should start using this blog!  Anyway, here&#8217;s a few interesting things to do in Linux if you are still stuck on MIDI.</p>
<p>A few days ago I was thinking about the old days and looking at my old archives of my webpages from 1997 and prior.  Back then one of the cool things we were doing was to embed MIDI sound files into your page so when it opened up in the browser the MIDI would start playing automatically.  It&#8217;s still possible to playback embedded MIDI natively on Linux with Firefox.  The basic steps are as follows:</p>
<p>1) Install mozplugger and timidity</p>
<p>1a) You actually need to configure timidity to use proper soundfonts (assuming you don&#8217;t have a MIDI board in your computer). I&#8217;m not going to go into this since it&#8217;s documented very well elsewhere, start <a href="https://help.ubuntu.com/community/Midi/SoftwareSynthesisHowTo">here</a> if you are using Ubuntu, but I don&#8217;t recommend going too far with that help page. Only the section about &#8220;Installing Timidity&#8221; is important. There are lots of posts on Ubuntu forums and Linuxquestions forums as well to help you. The key is to get a good sounding set of soundfonts otherwise the instruments sound weird.</p>
<p>1b) I also don&#8217;t recommend running Timidity as a daemon on a Linux box that uses Pulseaudio. Use a tool such as sysv-rc-conf to remove it from your runlevels so it doesn&#8217;t start with the OS.</p>
<p>2) Edit the file /etc/mozpluggerrc and basically delete everything in that file except type in (or edit) the following:</p>
<p><code>audio/mid:midi,mid:MIDI audio file<br />
audio/x-mid:midi,mid:MIDI audio file<br />
audio/midi:midi,mid:MIDI audio file<br />
audio/x-midi:midi,mid:MIDI audio file<br />
controls noisy stream: timidity "$file"</code></p>
<p>Basically what you are doing is to tell mozplugger to act as a Firefox plugin only for MIDI files.</p>
<p>3) Restart Firefox and do about:plugins in the address bar to make sure you see mozplugger acting as the plugin for MIDI files. Navigate to a webpage with an embedded MIDI such as <a href="http://www.angelfire.com/fl5/html-tutorial/music.htm">this page</a> and test it out.</p>
<p>4) If it doesn&#8217;t work and you don&#8217;t see the 3 play buttons and don&#8217;t hear the music, download a MIDI from somewhere on the Internet and try to play it like &#8220;timidity xxxx&#8221; in a shell and see what it spits out.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>There are two other really cool MIDI programs that are native to Windows but I figured out a way to get them running via Wine and I just think they are really cool so I wanted to share.  Both of these programs are like &#8220;environmental sounds&#8221; generators like those old school bedside radios you used to see from Sharper Image or the places in the mall that sell expensive off-beat stuff.</p>
<p><a href="http://www.peterhirschberg.com/mysoftware.html">Aire Freshener by Peter Hirschberg</a></p>
<p><a href="http://www.cvanepps.com/?p=950">Syntrillium&#8217;s Wind Chimes</a></p>
<p>Apparently Syntrillium was bought out by Adobe and Adobe decided not to proceed with development of most of their software such as Wind Chimes or the venerable Cool Edit Pro that many old school computer geeks will fondly remember.  They also had a lot of other really cool software like screen savers that moved to the rhythm of music and stuff like that.  That was really cutting edge back in the mid-90&#8242;s.</p>
<p>In order to run these programs in Linux via Wine it&#8217;s not so easy to just install the programs and expect them to work with Wine&#8217;s Alsa-Midi device.  At least it didn&#8217;t work for me that easy.  What I finally discovered to get these programs to work is to first make Wine to see the Timidity MIDI mappers via Alsa.  In order to accomplish this, I created some simple scripts to load Timidity as an Alsa sequencer and then run the programs with Wine.</p>
<p>Firstly, I recommend installing these programs into their own Wine environment so as to not mess with your existing main Wine directory under /home/xxxx/.wine and to avoid any potential problems.  In order to use a special &#8220;sandbox&#8221; Wine environment you specify the WINEPREFIX environment variable something like this:  env WINEPREFIX=/home/xxxx/bin/chimes/ wine setup.exe<br />
That will install the program into a Wine environment in /home/xxxx/bin/chimes/  After you get all this figured out it&#8217;s on to making and testing the scripts.  Below is my script for the Syntrillium wind chimes program.</p>
<p><code>#!/bin/bash<br />
timidity -iA &amp; disown<br />
export WINEPREFIX="/home/xxxx/bin/chimes/"<br />
cd /home/xxxx/bin/chimes/drive_c/chimes/<br />
wine ./chimes.exe &amp;<br />
wait<br />
killall timidity</code></p>
<p>Basically what this does is to start up a Timidity Alsa sequencer, then Wine is called to execute the Windows chimes binary, then Timidity is killed after you close the chimes program.  Here is my script for the Aire Freshener program (I didn&#8217;t use a special Wine environment for this one).</p>
<p><code>#!/bin/bash<br />
timidity -iA &amp; disown<br />
cd "/home/xxxx/.wine/drive_c/Program Files/Aire Freshener 2.0/"<br />
wine "Aire Freshener.exe" &amp;<br />
wait<br />
killall timidity</code></p>
<p>Hope you enjoy some old school MIDI on Linux!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linuxmoc.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linuxmoc.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linuxmoc.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linuxmoc.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linuxmoc.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linuxmoc.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linuxmoc.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linuxmoc.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linuxmoc.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linuxmoc.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linuxmoc.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linuxmoc.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linuxmoc.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linuxmoc.wordpress.com/72/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxmoc.wordpress.com&amp;blog=5323156&amp;post=72&amp;subd=linuxmoc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linuxmoc.wordpress.com/2011/06/11/midi-in-linux-via-wine-and-embedded-in-the-browser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2ba5bd8e89a5b1aea85a27608976199d?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mocharhw</media:title>
		</media:content>
	</item>
		<item>
		<title>Gulf of Mexico BP Oil Gusher/Spill Webcam List</title>
		<link>http://linuxmoc.wordpress.com/2010/06/12/gulf-of-mexico-bp-oil-gusherspill-webcam-list/</link>
		<comments>http://linuxmoc.wordpress.com/2010/06/12/gulf-of-mexico-bp-oil-gusherspill-webcam-list/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 20:18:12 +0000</pubDate>
		<dc:creator>mocharhw</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bp]]></category>
		<category><![CDATA[gulf]]></category>
		<category><![CDATA[gusher]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[oil]]></category>
		<category><![CDATA[spill]]></category>
		<category><![CDATA[webcam]]></category>

		<guid isPermaLink="false">http://linuxmoc.wordpress.com/?p=68</guid>
		<description><![CDATA[Here is a VLC/mplayer compatible (pls) playlist of 10 live webcams showing the action at the bottom of the Gulf of Mexico. Just copy and paste the text below into a .pls file and open it with your favorite player. &#8230; <a href="http://linuxmoc.wordpress.com/2010/06/12/gulf-of-mexico-bp-oil-gusherspill-webcam-list/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxmoc.wordpress.com&amp;blog=5323156&amp;post=68&amp;subd=linuxmoc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here is a VLC/mplayer compatible (pls) playlist of 10 live webcams showing the action at the bottom of the Gulf of Mexico.  Just copy and paste the text below into a .pls file and open it with your favorite player.</p>
<p>[playlist]<br />
File1=mms://a1686.l9789245685.c97892.g.lm.akamaistream.net/D/1686/97892/v0001/reflector:45685<br />
Title1=Skandi Neptune<br />
Length1=-2147483648<br />
NumberOfEntries=10<br />
Version=2<br />
File2=mms://a288.l9789244287.c97892.g.lm.akamaistream.net/D/288/97892/v0001/reflector:44287<br />
Title2=mms://a288.l9789244287.c97892.g.lm.akamaistream.net/D/288/97892/v0001/reflector:44287<br />
Length2=-2147483648<br />
NumberOfEntries=10<br />
Version=2<br />
File3=mms://a839.l9789244838.c97892.g.lm.akamaistream.net/D/839/97892/v0001/reflector:44838<br />
Title3=Oceaneering International III<br />
Length3=-2147483648<br />
NumberOfEntries=10<br />
Version=2<br />
File4=mms://a567.l9789246566.c97892.g.lm.akamaistream.net/D/567/97892/v0001/reflector:46566<br />
Title4=Osprey-230<br />
Length4=-2147483648<br />
NumberOfEntries=10<br />
Version=2<br />
File5=mms://a1031.l9789255030.c97892.g.lm.akamaistream.net/D/1031/97892/v0001/reflector:55030<br />
Title5=Viking Poseidon<br />
Length5=-2147483648<br />
NumberOfEntries=10<br />
Version=2<br />
File6=mms://a1236.l9789237235.c97892.g.lm.akamaistream.net/D/1236/97892/v0001/reflector:37235<br />
Title6=Canyon<br />
Length6=-2147483648<br />
NumberOfEntries=10<br />
Version=2<br />
File7=mms://a459.l9789222458.c97892.g.lm.akamaistream.net/D/459/97892/v0001/reflector:22458<br />
Title7=Oceaneering<br />
Length7=-2147483648<br />
NumberOfEntries=10<br />
Version=2<br />
File8=mms://a1176.l9789247175.c97892.g.lm.akamaistream.net/D/1176/97892/v0001/reflector:47175<br />
Title8=Oceaneering International<br />
Length8=-2147483648<br />
NumberOfEntries=10<br />
Version=2<br />
File9=mms://a1146.l9789221145.c97892.g.lm.akamaistream.net/D/1146/97892/v0001/reflector:21145<br />
Title9=Osprey-230<br />
Length9=-2147483648<br />
NumberOfEntries=10<br />
Version=2<br />
File10=mms://a1524.l9789235523.c97892.g.lm.akamaistream.net/D/1524/97892/v0001/reflector:35523<br />
Title10=Canyon<br />
Length10=-2147483648<br />
NumberOfEntries=10<br />
Version=2</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linuxmoc.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linuxmoc.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linuxmoc.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linuxmoc.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linuxmoc.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linuxmoc.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linuxmoc.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linuxmoc.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linuxmoc.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linuxmoc.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linuxmoc.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linuxmoc.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linuxmoc.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linuxmoc.wordpress.com/68/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxmoc.wordpress.com&amp;blog=5323156&amp;post=68&amp;subd=linuxmoc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linuxmoc.wordpress.com/2010/06/12/gulf-of-mexico-bp-oil-gusherspill-webcam-list/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2ba5bd8e89a5b1aea85a27608976199d?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mocharhw</media:title>
		</media:content>
	</item>
		<item>
		<title>Linux Scanner Recorder (rev 3)</title>
		<link>http://linuxmoc.wordpress.com/2009/12/04/linux-scanner-recorder-rev-3/</link>
		<comments>http://linuxmoc.wordpress.com/2009/12/04/linux-scanner-recorder-rev-3/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 07:32:44 +0000</pubDate>
		<dc:creator>mocharhw</dc:creator>
				<category><![CDATA[Audio]]></category>
		<category><![CDATA[pulseaudio]]></category>
		<category><![CDATA[sox]]></category>
		<category><![CDATA[alsa]]></category>
		<category><![CDATA[arecord]]></category>
		<category><![CDATA[ham radio]]></category>
		<category><![CDATA[lame]]></category>
		<category><![CDATA[linux scanner recorder]]></category>
		<category><![CDATA[linux vox]]></category>
		<category><![CDATA[silence]]></category>
		<category><![CDATA[silence detection]]></category>
		<category><![CDATA[silence trim]]></category>
		<category><![CDATA[voice operated recording]]></category>

		<guid isPermaLink="false">http://linuxmoc.wordpress.com/?p=58</guid>
		<description><![CDATA[In the past I posted a few tips and scripts for doing voice operated audio recording (VOX) under Linux.  I&#8217;ve done more research on this over time and now have what I believe to be a more refined version as &#8230; <a href="http://linuxmoc.wordpress.com/2009/12/04/linux-scanner-recorder-rev-3/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxmoc.wordpress.com&amp;blog=5323156&amp;post=58&amp;subd=linuxmoc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In the past I posted a few tips and scripts for doing voice operated audio recording (VOX) under Linux.  I&#8217;ve done more research on this over time and now have what I believe to be a more refined version as well as finally figured out how to make a timed script with the help of folks from LinuxQuestions.org.</p>
<p><code>#!/bin/bash<br />
read -p "How many seconds to run? ==&gt; " count_secs<br />
if [[ $count_secs -gt 0 ]]<br />
then<br />
rec -r 22050 -c 1 -p | sox -p OUTPUT.mp3 silence 1 0.1 1% -1 0.5 1% &amp;<br />
my_PID=$!<br />
sleep $count_secs<br />
kill -15 $my_PID<br />
fi</code></p>
<p>When you run the above script it will ask you to input the total recording time in seconds, then end itself when that time expires.  I&#8217;ve hard coded the sox command to output a 22 kHz, mono, 32 kbps MP3 file.  There are still many many ways to modify and improve this script, but this is working for my needs now.</p>
<p>I&#8217;ve also learned a lot more about how to use the &#8220;silence&#8221; option in sox thanks to <a href="http://digitalcardboard.com/blog/2009/08/25/the-sox-of-silence/" target="_blank">this blog post</a> which I suggest you read to understand how to tweak the parameters.  The way I hardcoded the volume thresholds and silence detection time works well to my ear as far as cutting silence from scanner radio traffic. YMMV.</p>
<p>I have one other revised script which first uses arecord and then sends the output to sox for trimming.  The method below has an advantage in that you can more finely tweak the initial capture parameters.  The disadvantage to this method is that there is a second separate processing step with sox, instead of doing it all in one shot as in the first script.</p>
<p><code>#!/bin/bash<br />
#USAGE:  ./sox_vox_recorder.sh xxx output.mp3<br />
#USAGE:  Records from line-in for xxx seconds to output.mp3, then detects and trims silence<br />
TIME=$1<br />
OUTPUT=$2<br />
arecord -f S16_LE -c1 -r22050 -t raw -d ${TIME} | lame -r -s 22.05 -m m -b 64 - ${OUTPUT} ;<br />
sleep 1 ;<br />
sox ${OUTPUT} ${OUTPUT}_processed.mp3 silence 1 0.1 1% -1 0.5 1% ;</code></p>
<p>I can see lots of tweaks to both of these scripts, such as capturing with OGG, or making a case-selection menu to choose capture parameters, and so forth.  Maybe I&#8217;ll play with this in the future.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linuxmoc.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linuxmoc.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linuxmoc.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linuxmoc.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linuxmoc.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linuxmoc.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linuxmoc.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linuxmoc.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linuxmoc.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linuxmoc.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linuxmoc.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linuxmoc.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linuxmoc.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linuxmoc.wordpress.com/58/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxmoc.wordpress.com&amp;blog=5323156&amp;post=58&amp;subd=linuxmoc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linuxmoc.wordpress.com/2009/12/04/linux-scanner-recorder-rev-3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2ba5bd8e89a5b1aea85a27608976199d?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mocharhw</media:title>
		</media:content>
	</item>
		<item>
		<title>Soft-Telecine PAL to NTSC MPEG2</title>
		<link>http://linuxmoc.wordpress.com/2009/11/24/soft-telecine-pal-to-ntsc-mpeg2/</link>
		<comments>http://linuxmoc.wordpress.com/2009/11/24/soft-telecine-pal-to-ntsc-mpeg2/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 08:43:40 +0000</pubDate>
		<dc:creator>mocharhw</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[25 to 29.97 fps]]></category>
		<category><![CDATA[aspect ratio]]></category>
		<category><![CDATA[dvd]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[mencoder]]></category>
		<category><![CDATA[pal to ntsc]]></category>
		<category><![CDATA[soft-telecine]]></category>

		<guid isPermaLink="false">http://linuxmoc.wordpress.com/?p=51</guid>
		<description><![CDATA[Thought I&#8217;d post this as I haven&#8217;t found all this information in one place.  Sometimes I like to take random movies I&#8217;ve downloaded off the net and encode and burn them to standard NTSC DVD.  The problem is a lot &#8230; <a href="http://linuxmoc.wordpress.com/2009/11/24/soft-telecine-pal-to-ntsc-mpeg2/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxmoc.wordpress.com&amp;blog=5323156&amp;post=51&amp;subd=linuxmoc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Thought I&#8217;d post this as I haven&#8217;t found all this information in one place.  Sometimes I like to take random movies I&#8217;ve downloaded off the net and encode and burn them to standard NTSC DVD.  The problem is a lot of the videos you find are from PAL (25 fps) source and/or they use out of the ordinary aspect ratios like 2.45:1 or 1.91:1.  These two issues can give you major headaches when trying to get them onto DVD and preserve the proper aspect ratio and smooth frame rate.</p>
<p>There&#8217;s a number of solutions to these problems which I&#8217;ll outline below.</p>
<p><strong>Convert &#8220;Any&#8221; PAL to NTSC MPEG2-PS (DVD), Soft-Telecine method<br />
</strong></p>
<p><code>mencoder INPUT_PAL.avi -vf scale=720:480,harddup -srate 48000 /<br />
-af lavcresample=48000 -ovc lavc -oac lavc -of mpeg -lavcopts / vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800: /<br />
vbitrate=5000:keyint=15:vstrict=0:acodec=ac3:abitrate=224: /<br />
aspect=16/9 -mpegopts format=dvd:tsaf:tele_src=25: /<br />
tele_dest=30000/1001 -o OUTPUT_NTSC.mpg</code></p>
<p>This &#8220;soft-telecine&#8221; method flags the frames for 25 fps to 29.97 fps to make the file NTSC compliant without changing the actual frame rate.</p>
<p><strong>Dealing with the Aspect Ratio problem</strong></p>
<p>The mencoder command above is incomplete because if you&#8217;ll notice it assumes you have a source already encoded at 720&#215;480 with a pixel aspect of 1:1 and a display aspect of 16:9.  Of course this is never the case, so you need to make a few modifications.  We need to do some simple math.</p>
<p>Example:  Source file has a display aspect of 2.45:1 and a resolution of 640&#215;261.</p>
<p>Desired output is NTSC-DVD with 16:9 display aspect:  (480)*(16/9)=854, and (854)/(2.45)=349, so we&#8217;ll encode to 720&#215;350 and pad/expand the remainder to 480.</p>
<p>mencoder uses the expand method, portions of the above command line would therefore be modified like this &#8220;-vf scale=720:350,expand=720:480&#8243; and make sure the -lavcopts part has &#8220;aspect=16/9&#8243; in it somewhere.</p>
<p>If you happen to prefer ffmpeg, it uses the padding method and you would achieve the same thing by having the following in the command line &#8220;-s 720:350 -padtop 65 -padbottom 65 -aspect 16:9&#8243;.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linuxmoc.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linuxmoc.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linuxmoc.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linuxmoc.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linuxmoc.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linuxmoc.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linuxmoc.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linuxmoc.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linuxmoc.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linuxmoc.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linuxmoc.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linuxmoc.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linuxmoc.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linuxmoc.wordpress.com/51/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxmoc.wordpress.com&amp;blog=5323156&amp;post=51&amp;subd=linuxmoc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linuxmoc.wordpress.com/2009/11/24/soft-telecine-pal-to-ntsc-mpeg2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2ba5bd8e89a5b1aea85a27608976199d?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mocharhw</media:title>
		</media:content>
	</item>
		<item>
		<title>Karmic + IVTV 1.4.1 + Pulseaudio + MythTV = Ubungo</title>
		<link>http://linuxmoc.wordpress.com/2009/11/21/karmic-ivtv-1-4-1-pulseaudio-mythtv-ubungo/</link>
		<comments>http://linuxmoc.wordpress.com/2009/11/21/karmic-ivtv-1-4-1-pulseaudio-mythtv-ubungo/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 10:38:40 +0000</pubDate>
		<dc:creator>mocharhw</dc:creator>
				<category><![CDATA[Myth TV]]></category>
		<category><![CDATA[pulseaudio]]></category>
		<category><![CDATA[9.10]]></category>
		<category><![CDATA[ivtv]]></category>
		<category><![CDATA[karmic]]></category>
		<category><![CDATA[module]]></category>
		<category><![CDATA[mythtv]]></category>

		<guid isPermaLink="false">http://linuxmoc.wordpress.com/?p=47</guid>
		<description><![CDATA[I just updated my main box to Karmic this past week.  This is a 32 bit box that was first installed with Hardy. Overall it looks like they improved a bunch of stuff.  I noticed a lot of stupid annoyances &#8230; <a href="http://linuxmoc.wordpress.com/2009/11/21/karmic-ivtv-1-4-1-pulseaudio-mythtv-ubungo/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxmoc.wordpress.com&amp;blog=5323156&amp;post=47&amp;subd=linuxmoc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I just updated my main box to Karmic this past week.  This is a 32 bit box that was first installed with Hardy.</p>
<p>Overall it looks like they improved a bunch of stuff.  I noticed a lot of stupid annoyances with Gnome/Nautilus are gone now, and the new Pulseaudio stuff looks good.</p>
<p>I use this box as my main PC as well as MythTV frontend/backend with one other PC on the network as a frontend only.  My capture card is the Hauppauge PVR-250.  I run a heavily patched version of 0.21-fixes from SVN built to my needs.  For Karmic I had to update it to r20877 due to some weirdness with glibc 2.10+, anyway that was the easy part&#8230;</p>
<p>After compiling and attempting to run it, I wasn&#8217;t getting any audio, and the video was choppy.  My first thought was to blame pulseaudio due to the debug messages I was getting and also the fact that if I changed my &#8220;profile&#8221; in the new gnome-volume-control panel it would make audio come and go, but this fact actually turned out to be a semi red herring.</p>
<p>After a little investigating I discovered to my surprise that grabbing video directly from the PVR-250 via &#8220;cat /dev/video0 &gt; output.mpg&#8221; was also producing the same screwed up video/audio as Myth live TV.  Then I checked the behavior of my frontend only machine, same problem there&#8230;  Strange, what could be causing this?  IVTV it must be.  Jaunty had IVTV module v1.4.0, Karmic has v1.4.1 which appears to be non-stable at the present time.</p>
<p>So I wanted to try and compile a 1.4.0 module for Karmic but couldn&#8217;t find the source on the IVTV page, so I gave up on that.  Anyway long story short, I ended up solving these very strange problems by doing the following:</p>
<p>1)  I found out that for some very strange reason, the ivtv module needs to be re-loaded AFTER the mythbackend is started!  WTF!  and why does this fix the problem?  Any feedback on this would be appreciated.  Does it have something to do with this weird new Karmic thing where they start all the init programs in strange order to improve the boot speed?</p>
<p>2)  Declare EXPERIMENTALLY_ALLOW_PULSE_AUDIO=1 in my .profile.</p>
<p>All is well again.  Now to go enjoy Karmic.</p>
<p>UPDATE:  I finally figured out what was giving me the problem with ivtv, it&#8217;s PEBKAC.  Back in Feisty (I think) I added the command &#8220;v4l2-ctl -b off&#8221; to my mythbackend init script.  I did this as a workaround to an Xv rendering playback bug with VLC and recordings made from PVR cards with the VBI closed-captioning enabled.  Anyway, I guess with the newer ivtv module it screws things up, because now I removed that command and all is back to normal.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linuxmoc.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linuxmoc.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linuxmoc.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linuxmoc.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linuxmoc.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linuxmoc.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linuxmoc.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linuxmoc.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linuxmoc.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linuxmoc.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linuxmoc.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linuxmoc.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linuxmoc.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linuxmoc.wordpress.com/47/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxmoc.wordpress.com&amp;blog=5323156&amp;post=47&amp;subd=linuxmoc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linuxmoc.wordpress.com/2009/11/21/karmic-ivtv-1-4-1-pulseaudio-mythtv-ubungo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2ba5bd8e89a5b1aea85a27608976199d?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mocharhw</media:title>
		</media:content>
	</item>
		<item>
		<title>Spikes in xorg and Jerky Video in MythTV and VLC&#8230;.</title>
		<link>http://linuxmoc.wordpress.com/2009/03/02/spikes-in-xorg-and-jerky-video-in-mythtv-and-vlc/</link>
		<comments>http://linuxmoc.wordpress.com/2009/03/02/spikes-in-xorg-and-jerky-video-in-mythtv-and-vlc/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 06:39:58 +0000</pubDate>
		<dc:creator>mocharhw</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[jittery video]]></category>
		<category><![CDATA[mythtv]]></category>
		<category><![CDATA[stuttering video]]></category>
		<category><![CDATA[vlc]]></category>
		<category><![CDATA[xorg cpu spike]]></category>

		<guid isPermaLink="false">http://linuxmoc.wordpress.com/?p=44</guid>
		<description><![CDATA[This might be of some use to folks running Gnome 2.24 in Ubuntu or Fedora or whatever.  I was recently trying to debug a very annoying problem where every minute or so my MythTV playback would get jittery with a &#8230; <a href="http://linuxmoc.wordpress.com/2009/03/02/spikes-in-xorg-and-jerky-video-in-mythtv-and-vlc/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxmoc.wordpress.com&amp;blog=5323156&amp;post=44&amp;subd=linuxmoc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This might be of some use to folks running Gnome 2.24 in Ubuntu or Fedora or whatever.  I was recently trying to debug a very annoying problem where every minute or so my MythTV playback would get jittery with a corresponding CPU spike in xorg usage.  The same thing would happen in other video players like VLC.  It didn&#8217;t make any difference what kind of output rendering was being used.</p>
<p>It turns out this <strong>extremely annoying</strong> problem is due to stupid gnome-screensaver!  At least it was on my machine.  Take a look at <a href="https://bugs.launchpad.net/ubuntu/+source/gnome-screensaver/+bug/230749">this</a>.  It&#8217;s supposed to be fixed in Gnome 2.26+.  Well, I just thought I&#8217;d put this one out there, because it&#8217;s very difficult to debug, and I see occasional posts about jittery video playback in Linux.  Of course, a great majority of those problems are due to proprietary video drivers though.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linuxmoc.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linuxmoc.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linuxmoc.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linuxmoc.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linuxmoc.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linuxmoc.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linuxmoc.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linuxmoc.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linuxmoc.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linuxmoc.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linuxmoc.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linuxmoc.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linuxmoc.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linuxmoc.wordpress.com/44/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxmoc.wordpress.com&amp;blog=5323156&amp;post=44&amp;subd=linuxmoc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linuxmoc.wordpress.com/2009/03/02/spikes-in-xorg-and-jerky-video-in-mythtv-and-vlc/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2ba5bd8e89a5b1aea85a27608976199d?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mocharhw</media:title>
		</media:content>
	</item>
		<item>
		<title>VOX Recording in Linux (part 2)</title>
		<link>http://linuxmoc.wordpress.com/2009/01/20/vox-recording-in-linux-part-2/</link>
		<comments>http://linuxmoc.wordpress.com/2009/01/20/vox-recording-in-linux-part-2/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 07:17:37 +0000</pubDate>
		<dc:creator>mocharhw</dc:creator>
				<category><![CDATA[Audio]]></category>
		<category><![CDATA[arecord]]></category>
		<category><![CDATA[ham radio]]></category>
		<category><![CDATA[lame]]></category>
		<category><![CDATA[pulseaudio]]></category>
		<category><![CDATA[scanner recorder]]></category>
		<category><![CDATA[silence detection]]></category>
		<category><![CDATA[silence trim]]></category>
		<category><![CDATA[sox]]></category>
		<category><![CDATA[voice operated recording]]></category>
		<category><![CDATA[vox]]></category>

		<guid isPermaLink="false">http://linuxmoc.wordpress.com/?p=40</guid>
		<description><![CDATA[After I made my last post about how to do line-in recordings from your scanner radio with silence detection and cutting, also known as VOX recording in the old days, I started looking at SoX the Linux Sound eXchange CLI &#8230; <a href="http://linuxmoc.wordpress.com/2009/01/20/vox-recording-in-linux-part-2/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxmoc.wordpress.com&amp;blog=5323156&amp;post=40&amp;subd=linuxmoc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After I made my last post about how to do line-in recordings from your scanner radio with silence detection and cutting, also known as VOX recording in the old days, I started looking at <a href="http://sox.sourceforge.net/">SoX</a> the Linux Sound eXchange CLI audio processing application.  Using SoX is a lot slicker than my arecord-mp3splt-mpgjoin method.  It lets you do the recording, silence detection, and mp3 encoding in one line, and it puts everything into one audio file, no muss no fuss.</p>
<p>Here are some examples:</p>
<p>rec -r 44100 -p | sox -p OUTPUT.mp3 silence -l 1 00:00:00.5 -45d -1 00:00:00.5 -45d</p>
<p>rec -r 22050 -c 1 -p | sox -p OUTPUT.mp3 silence -l 1 00:00:00.5 -45d -1 00:00:00.5 -45d</p>
<p>The first one will give you a 44.1 kHz, stereo, 128 kbps MP3.  The second one will give you a 22.05 kHz, mono, 32 kbps MP3.</p>
<p>The rec command does the recording, -r specifies the sampling rate and -c sets the amount of audio channels, &#8220;-p&#8221; means the input is piped to another command.  The sox pipe also needs a &#8220;-p&#8221; to tell it that its input is coming from a pipe, in this case the rec command.</p>
<p>The crypt CLI switches in the piped sox command &#8220;silence -l 1 00:00:00.5 -45d -1 00:00:00.5 -45d&#8221; is what does the silence detection and trimming.  It means to cut silence from the beginning of the file and parts within the middle and end.  &#8220;xx:xx:xx.x&#8221; is in hh:mm:ss.s format and tells sox the minimum duration to consider valid audio.  In my examples I have this set to 0.5 seconds for valid audio.  The &#8220;-45d&#8221; means -45dB and is the minimum valid audio level to do trimming.  In other words, if you were to say -100d, basically everything would be considered valid and there would be no trimming, you will need to play with this depending on your input levels.</p>
<p>I made a test for almost 2 hours with my scanner connected and scanning the aircraft bands.  I ended up with a 22 minute file.  Very nice!!  Now I&#8217;d say we have a very nice Linux-style &#8220;scanner recorder&#8221; program, and it&#8217;s a hell of a lot slicker than anything you&#8217;d find in Windows.</p>
<p>If you are a Debian or Ubuntu user, you will need to compile your own version of SoX if you want to encode to MP3.  <a href="https://bugs.launchpad.net/ubuntu/+source/sox/+bug/223783">This bug</a> explains that the version of SoX in the Debian repos was compiled without MP3 support.  Anyway, all you need to do is download the latest source, make sure you have all the build deps (apt-get build-dep sox), make sure you have the libmp3lame and libmp3lame-dev packages installed, then just do ./configure, make, make install.</p>
<p>When you do the ./configure you&#8217;ll see a list at the end of the output of what capabilities will be compiled into sox, just make sure that it says you will have MP3 support.  Your compiled version will go into /usr/local by default, so you don&#8217;t need to uninstall the repo version of sox, since that one is in /usr and programs in /usr/local always take precedance.  You can verify that by doing &#8220;which sox&#8221; after installing it and it should show you &#8220;/usr/local/bin/sox&#8221;.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linuxmoc.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linuxmoc.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linuxmoc.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linuxmoc.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linuxmoc.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linuxmoc.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linuxmoc.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linuxmoc.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linuxmoc.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linuxmoc.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linuxmoc.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linuxmoc.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linuxmoc.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linuxmoc.wordpress.com/40/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxmoc.wordpress.com&amp;blog=5323156&amp;post=40&amp;subd=linuxmoc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linuxmoc.wordpress.com/2009/01/20/vox-recording-in-linux-part-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2ba5bd8e89a5b1aea85a27608976199d?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mocharhw</media:title>
		</media:content>
	</item>
		<item>
		<title>Voice Operated Recording in Linux (VOX recording)</title>
		<link>http://linuxmoc.wordpress.com/2009/01/14/voice-operated-recording-in-linux-vox-recording/</link>
		<comments>http://linuxmoc.wordpress.com/2009/01/14/voice-operated-recording-in-linux-vox-recording/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 05:13:40 +0000</pubDate>
		<dc:creator>mocharhw</dc:creator>
				<category><![CDATA[Audio]]></category>
		<category><![CDATA[arecord]]></category>
		<category><![CDATA[ham radio]]></category>
		<category><![CDATA[lame]]></category>
		<category><![CDATA[mp3splt]]></category>
		<category><![CDATA[mpgjoin]]></category>
		<category><![CDATA[pulseaudio]]></category>
		<category><![CDATA[scanner recorder]]></category>
		<category><![CDATA[voice operated recording]]></category>
		<category><![CDATA[vox]]></category>

		<guid isPermaLink="false">http://linuxmoc.wordpress.com/?p=32</guid>
		<description><![CDATA[Many ham radio operators and scanner enthsiasts have a need to do long time recordings from a line-in source (such as a scanner or ham radio), but they don&#8217;t want to record all of the silence in between the transmissions.  &#8230; <a href="http://linuxmoc.wordpress.com/2009/01/14/voice-operated-recording-in-linux-vox-recording/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxmoc.wordpress.com&amp;blog=5323156&amp;post=32&amp;subd=linuxmoc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Many ham radio operators and scanner enthsiasts have a need to do long time recordings from a line-in source (such as a scanner or ham radio), but they don&#8217;t want to record all of the silence in between the transmissions.  Enter the concept of VOX recording.  Those of you that used to use tape recorders back in the good ol days will remember the VOX detection circuit that the higher end recorders used to have.  So, how do we do this with a computer?  In Windows there are a number of applications, <a href="http://davee.com/scanrec.html">Scanner Recorder</a> and <a href="http://www.sagebrush.com/recpro.htm">Rec-All Pro</a> come to mind.  These apps let you record from the line in and pause the recording when the levels go below a user specified threshold.  They also let you record directly to MP3 as well as set the sampling and bit rate, for compression of the recording.</p>
<p>In Linux I&#8217;ve been able to get Rec-All Pro to work, but it&#8217;s kind of a kludge since you have to use Wine.  It works, but you cannot encode directly to MP3, I assume this is because of the way the Wine programs use DLLs.  I never was able to figure it out.  Anyway, I prefer to use a Linux native method.</p>
<p>I start off by setting up the radio to the station I want to record, then I use the PulseAudio VU meter along with the Alsa Mixer to set my Line-In level and Capture level to the proper amplitude, by watching feedback from the VU meter.  Then I execute the following to begin the recording:</p>
<p><code>arecord -D plughw:0,0 -f cd | lame -m s -a -b 64 - FILE.mp3</code><br />
or<br />
<code>arecord -D plughw:0,0 -f S16_LE -c1 -r22050 -t raw | lame -r -s 22.05 -m m -b 64 - FILE.mp3</code></p>
<p>The first command will produce a file called &#8220;FILE.mp3&#8243; with 16 bit resolution, 44.1 kHz sampling, mono.  The second command will encode to 16 bit, 22 kHz, mono.</p>
<p>When you are finished recording do a Ctrl-C to end arecord.  Now we need to do the silence detection.</p>
<p><code>mp3splt -s -p th=-30,min=1,rm FILE.mp3</code></p>
<p>The command above will split the input file using a silence threshold of -30 dB, a minimum silence duration of 1 second, and removes the silence from the resulting split files.  And you will end up with a directory full of &#8220;Track 0*.mp3&#8243; files.  Now we just need to join all these files into one file.  So go ahead and execute:</p>
<p><code>mpgjoin *.mp3 -o JOINED.mp3</code></p>
<p>Below is a little script to automate all of this.  The only thing you need to change before running it is the bit in the arecord command &#8220;-d 300&#8243;.  Change the 300 part to however many seconds you want to run the recording for.</p>
<p><code>#!/bin/sh<br />
#USAGE:  Records from line-in for -d xx seconds, then splits tracks removing silence between tracks, and combines all into one file<br />
arecord -D plughw:0,0 -f S16_LE -c1 -r22050 -t raw -d 300 | lame -r -s 22.05 -m m -b 64 - Recording.mp3 ;<br />
sleep 3 ;<br />
mp3splt -s -p th=-30,min=1,rm Recording.mp3 ;<br />
sleep 2 ;<br />
mv Recording.mp3 Recording.mp3.original ;<br />
sleep 2 ;<br />
mpgjoin *.mp3 -o Joined_Output.mp3 ;<br />
sleep 2 ;<br />
rm Track*.mp3 ;</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linuxmoc.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linuxmoc.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linuxmoc.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linuxmoc.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linuxmoc.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linuxmoc.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linuxmoc.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linuxmoc.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linuxmoc.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linuxmoc.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linuxmoc.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linuxmoc.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linuxmoc.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linuxmoc.wordpress.com/32/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxmoc.wordpress.com&amp;blog=5323156&amp;post=32&amp;subd=linuxmoc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linuxmoc.wordpress.com/2009/01/14/voice-operated-recording-in-linux-vox-recording/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2ba5bd8e89a5b1aea85a27608976199d?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mocharhw</media:title>
		</media:content>
	</item>
		<item>
		<title>Working with Modules in Linux</title>
		<link>http://linuxmoc.wordpress.com/2009/01/08/working-with-modules-in-linux/</link>
		<comments>http://linuxmoc.wordpress.com/2009/01/08/working-with-modules-in-linux/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 19:14:46 +0000</pubDate>
		<dc:creator>mocharhw</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[/etc/modprobe.d/options]]></category>
		<category><![CDATA[/etc/modules]]></category>
		<category><![CDATA[compiling]]></category>
		<category><![CDATA[modules]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://linuxmoc.wordpress.com/?p=28</guid>
		<description><![CDATA[I use Ubuntu on my desktops because I like the fact that it is a fully built desktop distro with all the goodies already setup for you.  No need to mess with X, etc..  However no distro is perfect, I &#8230; <a href="http://linuxmoc.wordpress.com/2009/01/08/working-with-modules-in-linux/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxmoc.wordpress.com&amp;blog=5323156&amp;post=28&amp;subd=linuxmoc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I use Ubuntu on my desktops because I like the fact that it is a fully built desktop distro with all the goodies already setup for you.  No need to mess with X, etc..  However no distro is perfect, I tend to find many software packages in the repositories are outdated, crippled, missing, buggy, and so on.  A lot of times I&#8217;ll also find that hardware support is missing, or Ubuntu&#8217;s version is buggy.  Anyway, as long as you know how to compile and install software and drivers, then these are non-issues.</p>
<p>Say you have some hardware which is not supported, or Ubuntu&#8217;s driver is buggy.  First you need to find drivers, for example, the Atheros wifi driver in Ubuntu has bugs that cause system freezes, or I want to get my webcam working.  So you need to do this research first.  Then just follow the instructions for compiling and installing the module.</p>
<p>In the case of the webcam module, after compiling the module was installed at</p>
<p>/lib/modules/2.6.27-11-generic/extra/ov51x-jpeg.ko</p>
<p>To load this module I type:</p>
<p>sudo modprobe ov51x_jpeg<br />
then run &#8220;dmesg&#8221; and you should see the messages that the hardware was found and registered, assuming you had the hardware connected when you loaded the module.</p>
<p>You should also run &#8220;lsmod&#8221; to make sure your module is loaded.  Something like &#8220;lsmod | grep ov&#8221; with provide an output showing modules with &#8220;ov&#8221; in their name.  I do that just to limit the output and make it easier to find specific things.</p>
<p>To unload a module:</p>
<p>sudo modprobe -r MODULE</p>
<p>Most if not all modules have options available to them.  You may be wondering where a lot of options for hardware devices are hiding in Linux.  This is the place.  In order to see what options are available just type:</p>
<p>modinfo MODULE</p>
<p>In the case of my webcam, this showed me about 25 options ranging from control of the LED to the autogain and backlighting controls and so forth.  Very useful to say the least.</p>
<p>As root, edit the file &#8220;/etc/modprobe.d/options&#8221; and add a line like this:</p>
<p>options MODULE OPT1=x OPT2=x</p>
<p>where MODULE is the module name, and OPT1, OPT2 and so on, are the names of the options you got when running modinfo.  So a real world example would be like &#8220;options ov51x_jpeg led=1 autogain=0 backlight=1&#8243;</p>
<p>In order to figure out what variables these options will take, sometime it will tell you when you run modinfo, other times you might need to go to the driver documentation or the source code.  For example, in the *.c files (the source code) for the webcam driver, the devs were nice enough to include lots of comments about what the options do and how to use them.</p>
<p>Note that the options that you add to /etc/modprobe.d/options will always apply whether you load the module manually or during boot.  If you need to temporairly change or disable the options, just comment out the line, then unload and reload the module.</p>
<p>In closing, once you are satisfied that the newly compiled and installed module is working and you have the options set to your needs, to automatically load the module during bootup, as root edit &#8220;/etc/modules&#8221; and add the module&#8217;s name to the bottom of the file.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linuxmoc.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linuxmoc.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linuxmoc.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linuxmoc.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linuxmoc.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linuxmoc.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linuxmoc.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linuxmoc.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linuxmoc.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linuxmoc.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linuxmoc.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linuxmoc.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linuxmoc.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linuxmoc.wordpress.com/28/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxmoc.wordpress.com&amp;blog=5323156&amp;post=28&amp;subd=linuxmoc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linuxmoc.wordpress.com/2009/01/08/working-with-modules-in-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2ba5bd8e89a5b1aea85a27608976199d?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mocharhw</media:title>
		</media:content>
	</item>
		<item>
		<title>Linux Emulator Frontends</title>
		<link>http://linuxmoc.wordpress.com/2009/01/04/linux-emulator-frontends/</link>
		<comments>http://linuxmoc.wordpress.com/2009/01/04/linux-emulator-frontends/#comments</comments>
		<pubDate>Sun, 04 Jan 2009 06:45:06 +0000</pubDate>
		<dc:creator>mocharhw</dc:creator>
				<category><![CDATA[Emulation]]></category>
		<category><![CDATA[gelide]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mamepgui]]></category>
		<category><![CDATA[sdlmame]]></category>

		<guid isPermaLink="false">http://linuxmoc.wordpress.com/?p=24</guid>
		<description><![CDATA[As I mentioned in another post, I really like this new SDLMAME frontend called MAMEPGUI. The author just updated it with some really nice features. I also just discovered a nice comprehensive frontend called Gelide. This is one of those &#8230; <a href="http://linuxmoc.wordpress.com/2009/01/04/linux-emulator-frontends/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxmoc.wordpress.com&amp;blog=5323156&amp;post=24&amp;subd=linuxmoc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As I mentioned in another post, I really like this new SDLMAME frontend called <a href="http://www.mameworld.info/ubbthreads/showflat.php?Cat=&amp;Number=174768&amp;page=&amp;view=&amp;sb=5&amp;o=&amp;vc=1">MAMEPGUI</a>.  The author just updated it with some really nice features.</p>
<p>I also just discovered a nice comprehensive frontend called <a href="http://sourceforge.net/projects/gelide/">Gelide</a>.  This is one of those frontends that you see often in Windows which gathers all your ROMs and emulators into one frontend and lets you launch the ROMs in the appropriate emulator, kind of like a frontend to many other frontends.    Similar to <a href="http://quickplay.sourceforge.net/">QuickPlay</a> for Windows.  </p>
<p>It&#8217;s a very early release, but it looks like the dev has a great deal of features covered; snaps, customization of emulators, parameter customization, easy to understand interface, etc..  I haven&#8217;t played with it much yet, but what I have tried so far has impressed me.  For example, I noticed that the default setup doesn&#8217;t have anything for C64 emulation.  So all I had to do was right click on the games library and add an entry for the Commodore 64, then in the lower box I right clicked and added a definition and parameters for the emulator I use.  Then I told it the directory to find the ROMs and supporting files, refreshed the list, then double clicked a game and off it went!!  Very nice!!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linuxmoc.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linuxmoc.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linuxmoc.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linuxmoc.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linuxmoc.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linuxmoc.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linuxmoc.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linuxmoc.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linuxmoc.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linuxmoc.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linuxmoc.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linuxmoc.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linuxmoc.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linuxmoc.wordpress.com/24/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxmoc.wordpress.com&amp;blog=5323156&amp;post=24&amp;subd=linuxmoc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linuxmoc.wordpress.com/2009/01/04/linux-emulator-frontends/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2ba5bd8e89a5b1aea85a27608976199d?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mocharhw</media:title>
		</media:content>
	</item>
	</channel>
</rss>
