MPD Streaming to Shoutcast (ubuntu 10.04 LTS)

So I’ve recently been playing with MPD the Music Player Daemon and am blown away by the ease, options and speed of this awesome program! I have it running locally on my laptop, so it goes through my soundcard easily enough for use as a simple music player, however I also have built in http streaming going out so that I can stream it locally throughout my home network (it works great on my droidx using mpdroid) and I then have it running out across the interwebs connecting to my shoutcast dnas server so that you (if you choose) can listen to it too! The config looks like this (I got a bit carried away with this one and the comments…. you can safely delete anything following a # to clean it up as you see fit.)

[codesyntax lang="make" lines="no" container="pre_valid" capitalize="no" blockstate="expanded" doclinks="0"]
##########################################################
################### REQUIRED SETTINGS ####################
##########################################################
#
follow_outside_symlinks “yes”
follow_inside_symlinks “yes”
db_file “/home/daniel/.mpd/db/tag_cache”
sticker_file “/home/daniel/.mpd/sticker/sticker”
log_file “/home/daniel/.mpd/logs/mpd.log”
# END REQUIRED SETTINGS
##########################################################
################## OPTIONAL SETTINGS #####################
##########################################################
#
music_directory “/home/daniel/Music”
playlist_directory “/home/daniel/.mpd/playlists”
state_file “/home/daniel/.mpd/state/state”
pid_file “/home/daniel/.mpd/pid/pid”
port “6600″
log_level “secure” # default is “default”
# END OPTIONAL SETTINGS
##########################################################
#################### AUDIO SETTINGS ######################
##########################################################
##################### PULSE AUDIO ########################
#
# Ubuntu uses Pulse by default now and I recommend it as
# you can lower the volume in pulse and not effect the
# whole system’s volume like alsa does
#
audio_output {
type “pulse”
name “MPD PulseAudio”
}# END OF PULSE AUDIO
##########################################################
###################### ALSA START ########################
# My Old Settings for alsa when I was running crunchbang linux
#
#audio_output {
#type “alsa”
#name “My Alsa Device”
#format “44100:16:2″ # optional
#mixer_type “software”
#mixer_control “PCM”
#} # END OF ALSA MIXER
##########################################################
##################### HTTP STREAMING #####################
#
# This is a local http stream via http on port 8000
# Works great on my phone :)
#
audio_output {
type “httpd”
name “Dans MPD Stream”
encoder “lame” # optional, vorbis or lame
port “8000″
# quality “5.0″ # do not define if bitrate is defined
bitrate “128″ # do not define if quality is defined
format “44100:16:2″
} # END OF HTTP STREAMING
##########################################################
################## SHOUTCAST STREAMING ###################
#
# Set this to allow mpd to stream its output to Shoutcast or Icecast/2 servers
#
audio_output {
type “shout”
name “I Talk To Machines”               #Also what it reports to pulse server
host “192.168.0.111″
port “11000″
mount “/mpd.mp3″ # needed even for shoutcast…
password “xxxxxxxxxxxxxxxx”
bitrate “128″
format “44100:16:2″
### Optional Parameters
# user “source” # Used for icecast streaming
encoding “mp3″ # ogg by default
protocol “shoutcast”
public “yes”
description “Brought to you by the powers of Open Source!”
genre “Dark”
} # END OF AUDIO SETTINGS
##########################################################[/codesyntax]

And again it work’s PERFECTLY!

As you can see it uses very little resources even doing all of that! (8% processor usage and 0.4 % of my memory used)

Pretty damn impressive. Support MPD if you can!!!

The only con’s I can say isn’t MPD’s fault, it’s licensing issues. The default MPD in ubuntu’s repositories doesn’t support lame (read MP3 Encoding) and has to be built from source to include it. I’ve gone ahead and done just that if you would like a copy of it I’ve included it here: http://dl.dropbox.com/u/623538/mpd_0.16.2-1_i386.deb

Here’s it running!

The terminal client I’m using is ncmpcpp (don’t ask me where they got the name…) and the gui client is gmpc.

I should add that it will also pull the album art if it’s included in the ID3 tags or folders, to your phone or mpd client which just add’s to it’s completeness! LOVE THIS APP!

wigle wifi VS G-MoN – Wardriving App Faceoff.

In my last post I mentioned wardriving, and being a big fan, I figured I’d do a little comparison of the free wardriving apps available on the android marketplace.  Having issues with wardrive (the app) as alot of other’s seem to be for now I’m going to leave it out and only going to do a one on one comparison for now as I’ve only had a few days to play with them, as until now I’ve been happy with my netbook and kismet.

I’ve been looking for uses for my old samsung moment that I bought when I was unhappily with sprint. So I’ve installed both G-MoN which has recieved high praise and seems to be the defacto app people recommend for wardriving. Wigle on the other hand seems to be a lesser known app but is gaining popularity and for good reasons I’ll get into in a bit. First let’s show some screenshots to keep the random stumblers attention for a bit so I actually might get a few hits on this lonely site.

Alright. G-MoN. The app is simple enough, and I have to say I like the layout of the stat’s and map better then the layout on wigle but the output file alone kills this app for me. It ran fine, saw gps quickly and did a good job of collecting the “access points” (AP herein) in a nice layout, and if your a person that loves stat’s, this app has a ton of them! Numbers and lists galore! But back to that darn kml output file. The info just isn’t in the G-MoN output. Here’s an example of G-MoN’s kml file in google earth.

G-MoN info in Google Earth

And here’s a screenshot of what it looks like on the map.

Not a whole lot going on. (Although I do like the smaller icon, especially when you have over 5000 on one map at a time…)

So I fired up wigle wifi. First thing it does is TALK TO ME! Sweet! In the settings you can also control what it says, and how often it says it. Both very nice features, keeping you up to date without having the need or want to check your screen (you wouldn’t do that while driving anyways right?!!!) Next it tells me to optimze the scanning abilities to turn off notifications of new AP. Well heck! that’s just a great idea! So I do and start scanning and after my short test drive, I open the results again in Google Earth and wow what a difference!

wigle wifi info in Google Earth

And then again a screenshot of it in the map.

This is the same street and I already notice several more points meaning that the gps is most likely more accurate or scan’s more frequently (probably the case) then in G-MoN. But again the info included is what get’s me going. Much more to work with.

So if exporting your data to the kml file to import into Google Earth or similar apps I’d deffinatly say go with wigle. Plus they have more of a use for the data as they offer you the ability to import your data from apps like wardrive (the app), kismet, G-Mon, and many other formats to add to their database as well as the ability to upload your data right from your phone.

So all around I am already very pleased with the results you get from wigle wifi wardrive app. And it’s free. Shucks what’s not to like!

Oh Yea, and you can post a badge showing off your AP count ;)

Loving the new server install.

So as you may remember I have updated the server’s hosting this and many other site’s I own (and a few I don’t) and have installed ispconfig3 on debian, and it really is the perfect server setup!

I just updated wordpress automatically (never been able to do that before!) and it worked great! Mad props to wordpress.org, debian, howtofordge apache, lighttpd and ispconfig3 for providing absolutely great and free software and support! I’m a happy sys-admin :D

Uploading to Usenet on debian (or ubuntu) linux

So I’ll start off by saying I do use a graphical user interface (gui) on my debian laptop (Linux Mint Debian Edition) and have also switched from my old love bit torrent over to usenet just for security’s sake. I’ve been reading alot of posts on the net to figure everything out as people and links come and go as does software to do what you want it to do. Here’s the easy way of how I upload to usenet using my laptop.

A few things you’re going to need beforehand.

rar, cksfv, PyPar2 and JBinUp. (cksfv, rar and PyPar2 are available in the repos. and JBinUp is availble online.)

Now you’ll notice a few dependancies are going to be needed just by the names of those apps. PyPar2 is obviously written in python so you’re going to need that and JBinUp is written in java so you’re also going to want that installed. Yes there are other apps such as newsposter (cli) but I’ve been having issues with that and really the gui of JBinUp as well as the .nzb file creations really come in handy for me.

First your going to need to break your video down into smaller parts using rar. Music files are small enough you don’t need to split them apart but movies you do. For files 1.4gb in size or smaller your going to want to split them into 15mb sizes. Here’s the easy gui way of doing that.

Right click the movie file and choose compress.

After some using this, I realized that the rar settings are set to archive not store (read slower and not recommended)

There’s a better way, and I’ve made an earlier post about how to do that using a script so you don’t have to use the commandline (after setting it up the first time that is ;) ). After using that guide, skip down to the next part starting in Green.

Once the Compress window opens click the option that says “Other Options” to expand them, then change the extention to .rar and LEAVE THE BLOODY PASSWORD FIELD BLANK!!! Then check the box that says “Split into volumes of” and set that field to 15.0 then click Create.

Once it’s run it’s path (which could take some time) you’ll be left with many files in your folder which should look something like this:

Skip to here.

Remember that the original file is NOT going to be uploaded but we’ll need it for another step later so leave it in your folder for now.

We’re going to want to create the .svf and .nfo files. NFO Files are just a .txt file that has had it’s extention changed. so feel free to use whatever text editor you feel comfortable with and create your .nfo file. I’m not going to go far into the .nfo creation as that’s really up to you what info you want to put in there, however the output from programs like MediaInfo will suit you quite well. Run MediaInfo on the original file and select view > text and you’ll get something that looks like this:

Copy the info from there and add it to your .nfo file. Your done with this step, so you can now safely remove the original file from your folder now.

Next we’re going to create the parity files. (Par2) so open your PyPar2 app and click on the create tab.

Right click on the window and add all the .rar files in your folder. The default settings will be fine for our needs, so once all your files are in PyPar2 just click on the GO button.

Choose the same folder as your .rar files to save the .par files and let it run it’s magic.

The par files are very important as they let you fix broken or missing .rar files. Make sure they are included in your folder.

To Create the .sfv file, your going to have to check into the commandline (sorry I haven’t found a gui for this part yet) so fire up your terminal emulator. (I like terminator)  Now let’s cd to your working directory which in my case is /home/daniel/NZB/example

then run the cksfv command like so.

The -b command strips out the directorys so that the .sfv file will work on anyone’s system without having to have it in the same directory structure. The > checksum.sfv will create the .sfv file instead of just printing the results to the terminal window. It should look like this:

and the output should look like this:

So now your files are rar’ed and par’ed, you’ve got a .nfo file and a .sfv file, your almost ready to post your files! Fire up JBinUp

 

In JBinUp go to File > Settings and setup your server and poster settings. I’ll wait. I can’t tell you how to enter in this info as each usenet provider has there own url’s and settings, as well as plenty of documentation on how to setup your clients so this shouldn’t be a major issue for you.

After you have your basic settings situated, click on the single (+) button to start setting the posting information. The interface is quite simple, just fill in the blanks. Set your post’s title (aka subject) and choose who’s uploading this post (if you have more then one setup) then click the add button to add the files you want to upload. You want to select every file in your folder, so a simple keyboard command of Ctrl+A will select everything for you and click the Open Button.

Once everything looks right, click Forward and select the groups you want to add this post to. The options here are too varied and numerous so you’ll have to figure out what groups you want yourself but check the alt.binaries.whatever group’s to figure out where you’re going to want to post to. Got your groups? Good! Click the “Add Job” button and it’s off and uploading!

Once your files have finished uploading it’s a good idea to create a .nzb file for them so you can share your posts easily on sites like NzbMatrix and the likes. I am not uploading this example I’ve been using so the option isn’t available for me but if you right click the file you posted in JBinUp after it’s done uploading you’ll get the option to create a nzb file. Again I highly recommend you do this :)

That’s it! Your files are now living on usenet and you have the .nzb file to prove it! Share it with your friends and let’s get some more new content on the net’s!

Deluge Torrent – My New Favorite Bit Torrent app!

So I’ve tried the Deluge-Torrent client a few times before, in different releases and on different os’s. I’m here to tell you in the past couple of years, they’ve made LEAPS and BOUNDS of improvements!

There’s plugins that let you do alot of powerful manipulation (like automatically extract downloads, move them into folders etc.) but my personal favorite option, the daemon with a remote gui.

That mean’s I can run the daemon on my headless server, install the client on any machine I have with me like my laptop, and then connect the laptop’s GUI to the daemon running on my server!

This is a huge game changer imho!

That means that I start my torrent client, it connects to my server which is always on, and let’s me add, remove, or edit any torrent running on my server from the gui on my laptop!

Now seedboxes need to start taking a look at this, as it is so much cleaner then a web-ui (which deluge also offers a great one as well ) and easier as it looks and works just like a normal torrent client, it just happens to connect to a server instead of running locally.

Here’s a screenshot of what I’m talking about (sorry about the very dark theme, I do alot of work at night.)

As you can see the connection manager (found by going to preferences and un-checking the “classic mode” option under interface) is connected internally to my server which is actually doing all of the heavy lifting of sharing those files. (it’s quite resource friendly too being it doesn’t need any gui for itself) it uses python and libtorrent.

Shortly said, get it, try it (fully cross platform compatable!) LOVE DELUGE!