Sunday, December 23, 2012

Bulk converting of Old PCM Wave audio into new mp2 format for Rivendell

This idea courtesy of Daniel Kahn on the Rivendell mailing list Oct 16, 2012.

 Take a copy of your library over to a machine with a Rivendell install
with nothing in the library.  Now run this on your library:

for i in *;do echo $i;j=`echo $i | sed
's/_[0-9].*.*$//;s/^.*_//'`;rdimport --to-cart="$j"
--normalization-level=-13 --autotrim-level=0 music "$i"; done

rdimport converts your library.  Now move the newly created library back
to your original machine.

I can't think why this shouldn't work.  I am sure someone can write a
cleaner scripted then me.

So my better half Monica modified it ever so slightly because it suited me and made a shell script.


for i in *.wav;
echo $i;
j=`echo $i | sed 's/_[0-9].*.*$//;s/^.*_//'`;
echo $j;
rdimport --verbose --segue-level=-10 --to-cart=$j --normalization-level=-13 --autotrim-level=0  --delete-cuts Album $i >> importlog.txt

#Note the line above this is all one line but gets word wrapped by google blogs.

Saturday, November 10, 2012

Converting m4a files to mp3

If you want to convert m4a files to mp3 so they can be played by a larger variety of users. Use this command to convert them.
ffmpeg -i input.m4a -acodec libmp3lame -ab 192k output.mp3

Saturday, August 11, 2012

Opening firefox pages in the background

This from...

First, type (or copy and paste) "about:config" (minus quotes) into the
Firefox address bar and hit enter.
The next thing you'll see is a window telling you this might void your
warranty (a little humor there, Firefox doesn't have a warranty).

Click the "I'll be careful, I Promise!" button. The about:config page will open.
In the Filter bar, type (or copy and paste)
"browser.tabs.loadDivertedInBackground" minus the quotes. You will
then see an entry under Preference Name that matches what you typed

By default, the value of this entry is false. To change it, double
click the entry and it will toggle so that the value reads true.
Restart Firefox and you're done.

If you need to undo the change, right click on the entry, choose Reset
and restart Firefox. This changes the entry back to its default
setting. You can reset any entry that's been changed in the
about:config page the same way. If you scroll down, you'll see some
entries in bold. Those are entries that have been changed already,
either by setting preferences (in the Tools/Options menu) or by an
add-on. Right clicking any entry in bold and choosing Reset will cause
it to revert to the default entry.

Changing entries in the about:config page can cause Firefox to behave
oddly or not work at all. This isn't a good area to experiment with
unless you'd like to uninstall and then do a clean reinstall of

Wednesday, May 2, 2012

SSH aliases

This cool idea came from the March 2012 Linux Format magazine.

Edit your ~/.ssh/config file and if it doesn't exist create one.
To do this type...
touch ~/.ssh/config

Now edit using your favourite text editor.

Add 4 lines...
Host work
  User myusernameatwork
  Port 2022

Then save the file. Note the domain at work could be an IP number and the port could be the default port of 22.

Then when you want to ssh to your work just type
ssh work

and when prompted enter your password. this saves you typing long commands like ...
ssh -P 2022