The whole point in this post is to run your own VPN service, and allow you to connect remote devices to your home network.
To start off yo…
Showing posts with label music.
Showing posts with label music.
So I finally decided to build a dedicated Plex Media Server, my desktop wasn’t cutting it.
I used the following Plex link to educate myself about the system requirements.
Basically it stated that for every HD movie I wish to trans-code and stream I needed a passmark of about 2000.
to determine your CPU passmark, and investigate what you need.
I decided that at maximum I would have 3 simultaneous streams going on, of my home movies of course. All these streams being HD – factor in your network upload speeds when determining what you can handle.
So, ballpark I needed a processor capable of about 6000 on the passmark scale – and I also made room for overhead.
I went with the following processor which gave me a passmark around 7300.:
Start with the processor then let this dictate the rest, I like to keep my systems small so I was looking for a mini-ITX that was LGA 1150 compatible. Please remember and check the CPU maker site to confirm motherboard (MB) compatability.
The MB I chose in the end was:
Mini-ITX means smaller case. I went with the following for simplicity.
So I have my processor, my MB, my case. I added 4GB of RAM and a 120GB SSD. The solid state disk was a little large, since I won’t keep my movies locally. This is the RAM and HD:
So to keep things slick I decided to install Plex on Ubuntu, I figure any future services I want to run will no doubt work on Linux, that and I know Ubuntu. Check the official Plex site for more details on setting this up
I installed Ubuntu Server, because I don’t really see a need for a GUI front-end, Plex is configured via the web. After installing Ubuntu Server, installing Plex is simple enough:
Download the .deb package from . if you are putting it on a USB for installing on the Ubuntu Server, you may want to install usbmount to automount inserted USB sticks.
sudo apt-get install usbmount
Once you have the .deb package on your server, go ahead and install with the following command, relative to your .deb filename of course:
sudo dpkg -i plexmediaserver_0.9.8.18.290-11b7fdd_amd64.deb
To setup the server, open a browser window, and go to http://127.0.0.1:32400/web, replacing 127.0.0.1 for the IP of the server if you are configuring this remotely.
Setting Up NAS Shares
The next thing you are going to want to do before getting involved with the configuration is map all your samba shares.
You will need cifs-utils:
sudo apt-get install cifs-utils
I used the following link to work out my samba situation:
Make a .smbcredential file in your home directory so you can map your fstab correctly. In this file put username and equals sign and the access username for the share (and domain if loging into a domain) on the first line, put password and equals sign and the password for that user account on the second line of the file. The file should look like:
# OR: (for cifs on Windows Serve 2003)
Edit fstab to map your mounts (sudo nano /etc/fstab). Entries in your fstab should look similar to the following:
//master/install_files /path/to/mnt cifs iocharset=utf8,credentials=/path/to/.smbcredentials,uid=1000 0 0
//$SERVER/$SHARE $MOUNTPOINT $FS_TYPE credentials=$SMB_CREDENTIALS,uid=$UID,gid=$GID
Once completed exit nano and save the changes to fstab. Make sure that the shares mount correctly:
sudo mount -a
If successful, reboot and make sure that mounts and Plex start automagically.
Now configure your Plex shares! Enjoy.
Firstly, I have to say I cannot take all the credit for this… I got a lot of information from , who in turn got it from NAS4Free wiki.
However, I did find some problems along the way, and as usual I want to keep it somewhere I can get easy access to in future – this blog. Please also note, this will solve any m4a and flac transcoding issues, and possibly other codecs.
The whole process relies on you setting up a jail in NAS4Free so that the changes are not lost on reboot (since this is an embedded guide).
Lets start of with configuring NAS4Free to complete this task:
SSH into your NAS4Free box using putty or similar. NOTE: Change all reference to /mnt/data to the mountpoint on your NAS where you are going to store the jail.
The base system has to be downloaded to make sure you get all
the necessary binaries, config files and scripts. To download it you can
just copy paste the following commands into the ssh shell.
The last command for fetching lib32 is not needed if you are running NAS4Free on an 32bit system. The following two commands extract the base system into the proto folder inside the jail.
NOTE: Obviously exchange EST for
your own time=zone. Next we will configure the mounts that the jail is
going to be able to access.
NOTE: Change DataDisk1 for the mounts that you have on the NAS
that you want to be accessible in the jail.
Copy into the fstab file the following lines:
/mnt/data/DataDisk1 /jail/proto/mnt/DataDisk1 nullfs rw 0 0
The drive is mounted read write for playlist, comments, ratings, podcast access from Subsonic.
The next part of the
configuration is to create the rc.conf file.
Copy into the rc.conf.local the following lines:
jail_enable=”YES” # enable jails YES|NO
jail_list=”proto” # name of the jails to start “proto www…”
jail_proto_rootdir=”/jail/proto” # path to our jail
jail_proto_hostname=”proto” # hostname
jail_proto_ip=”192.168.0.30″ # ip of the jail, replace with a ip in the same subsystem as your NAS
jail_proto_interface=”re0″ # Network Interface to use, replace with your NAS interface name
jail_proto_devfs_enable=”YES” # use devfs
jail_proto_mount_enable=”YES” # mount YES|NO
jail_proto_fstab=”/jail/conf/fstab.proto” # File with Filesystems to mount
Copy into jail_start the following lines:
#mounting to /jail
mount_nullfs /mnt/data/jail /jail
# copy jail binaries to /usr, not needed if N4F is 454 or up
# because Daoyama include needed files, uncomment if you use low .454 version
# cp -r /jail/conf/root/ /
# link config files to /etc
ln -s /jail/conf/rc.conf.local /etc
#start all jails
Make the start-up script executable with the following command:
And to make it run each time the NAS server is started, add the following via the webgui under System|Advanced|Command Scripts.
Save and apply, and reboot your server. After a successful reboot check your new jail via SSH using the jls command, you should see something like this:
JID IP Address Hostname Path
1 192.168.1.201 proto /jail/proto
And that’s how you setup a FreeBSD jail on NAS4Free embedded.
Enter the jail with the following command (based on the output of example jls above we use 1):
The pkg_add command doesn’t function
properly inside the jail. To fix this you have to run the following
command NOTE: I am using a 64-bit install:
Now start installing the packages required by
Now install libmp3lame so that ffmpeg can use it for transcoding:
Now compile and install your own ffmpeg with libmp3lame enabled, (remember –enable-libmp3lame during make config):
Create the folders and download/extract subsonic standalone.
Enter the following
command while you are still inside the jail to see if subsonic starts.
If subsonic started as it should you can connect to it via the
browser at the following adress: Jail-IP:4040, default username is
admin, and password admin.
To make it run each time the NAS server is started add via the webgui under: System|Advanced|Command Scripts.
Command: jexec 1 /var/subsonic/standalone/subsonic.sh
Save and apply, and reboot your server. After a successful reboot you can check your Subsonic install via http://Jail-IP:4040
If your Subsonic installation has problems with the audio (the java
install couldn’t see your audio dev) install
alsa-plugins via the following command:
And if you want to access your new service on your android device, why not try out the official
(4/17/2013 Updated for Subsonic 4.8)
(5/10/2013 Updated based on fsbruva’s comments http://forums.nas4free.org/viewtopic.php?f=79&t=3166&p=19759#p19759)
So I sourced this information from another site, it was referencing iTunes 8.x, however I am using 10.2.
Slow response to starting/stopping application, as well as initiating playback
iTunes music stored on FreeNAS box, one iTunes users DB is remote, the others is local.
Disable unrequired display columns:
Removing unused smart-playlists.
Disabling live updating of playlists:
Disable looking for shared services:
SUCCESS – I have seen a noticable improvement in my iTunes performance for both users.
I have an iPhone and I used to use an application called SimplifyMedia to stream all my music across the nets to my phone – freeing up space on the device.
After about 4 months of using it, I guess, SimplifyMedia was acquired by Google and took their service offline, so I needed to fine a replacement.
(http://www.subsonic.org/pages/index.jsp), a great little service that can run on a variety of OS, including my FreeNAS box if I chose to. I currently run Subsonic on my Ubuntu box, I have donated to the cause allowing me to use the API’s (when I say me, I mean I can use apps that use the API’s).
Along with Subsonic, I use
3.0 (http://isubapp.com/) currently on my iPhone, the whole thing has been such a success I bought the application for my wife’s phone.
I am not going to go into the nitty-gritty here, but Subsonic allows you to access your music (and video to some extent) through an encrypted connection via the web or supporting app. Once connected the user can access any of the folders available to subsonic, make playlists, rate tracks, and scrobble tunes to last.fm (apps have some limitations, but it is mostly catch-up to support APIs). iSub allows me to see what others are playing as well as chat to them, once scrobbling is implemented I am laughing – oh and the caching feature of iSub is awesome too, along with the desire to implement video streaming!
To implement the whole solution, will cost about $14.99 before tax, $10 (min) donation to Subsonic, and $4.99 for the iSub app – well worth it!
Ok once again my iTunes Library looked like it had gone south, but I managed to find a way to recover it. The “iTunes Library.xml” file. I always keep a backup of this bad boy, cause he is the one with all the ratings. I think it is probably good practice to back it up once a month or something. Anyway, my “iTunes Library.itl” file was damaged, god only knows how but the simple solution was to import the xml.
When the “iTunes Library.itl” file is corrupted/damaged, iTunes shits the bed and just creates a new empty one. At this point all you do is File | Library | Import Playlist… and then choose the “iTunes Library.xml” file. Immediately it will start restoring all your playlists/rating and other good stuff.
The source of this information was Apple themselves, you think they would make this an option when finding a damaged itl file….
I feel that you may have to disable copy music to iTunes library when doing this – otherwise you dupe all your material, that’s if you have this feature enabled of course!
I love keeping all my media and music organized, whether it is completing music tag information for some OCD sanity or keeping clean file names for scraping purposes (the task or retrieving the information by parsing data from a website).
Now this can be a bit laborious for TV show names/episodes so I searched to find a convenient/efficient way to do this and came up EpNamer. EpNamer scrapes a couple of sites for file information, you just select the files, specify the series name and then search! EpNamer will come back with the suggested names for the various files you queried, show you a preview of the changes that will be made, and if applied it will make those changes. Find out more about this free application here (mac and windows):
Now, for keeping my music tags up to date I like to use the open source solution MusicBrainz, specifically their Picard tagger. MusicBrainz is an open source publicly maintained database of thousands of albums. The Picard tagger comes with a variety of plugins, allowing album art download, original release date tagging, among many other great features. Maintaining music can be hard, but MusicBrainz is there to help, the software has the ability to lookup tracks based on existing tag/filename information as well as PUID (acoustic fingerprints) – therefore that actual audio data content, rather than name/tag. Be sure not to rename the files unless you know what you are doing, as this will mess up your music database if it uses filename, which iTunes and I imagine most others do, for database management. To find out more about MusicBrainz click on the following link: