So you’ve gotten your NAS4Free box all configured to your liking and you are comfortably using it in your own home. If you’ve read my last article, then you’re also probably enjoying automatic torrent downloading as well. There is so much more you can do with your NAS box and so in this article, I will go over how you can now stream your media files whether they be pictures, music or videos to your Sony Playstation 3 and Xbox 360. Now, I personally don’t have a Xbox 360 anymore so I will only show screenshots on how it will look like on a PS3 but the steps should be similar on each system. By moving your media files over to your NAS4Free box, you can now easily stream them to your big screen HDTV without first having to turn on your personal computer. If you haven’t gotten the drift already, a NAS box stays up 24/7. Because this server consumes much less resources and is much more energy efficient than standalone personal computers, you technically shouldn’t see a big spike in your electricity bill. Well, hopefully. With it being on 24/7 in your household, it makes much more sense to dump your media files on it to better allow for centralize access.
While NAS4Free includes a UPnP service called Fuppes to help you get your media files seen on devices such as the PS3 and Xbox 360, it didn’t work too well for me during my limited testing. In fact, I couldn’t get it to work at all! While my PS3 did see my NAS4Free server box, any files I’ve dumped into the configured folders were invisible. And because I’m not a NAS4Free expert to begin with, I was pulling my hair a bit. After some research, it turns out that Fuppes, which is the service that allows other compliant devices to use the NAS box, was unstable to begin with. That brought some relief to myself because even if I did get the service running correctly, I don’t want to deal with crashes, which of course forces you to read log files and we all know that’s not very fun. So, after more research, I found another simple solution in a client called MiniDLNA.PLEASE READ BEFORE CONTINUING: After all is said and done, I noticed two major issues with MiniDLNA. First, it does NOT do any transcoding! This can’t really be considered an issue since I probably didn’t read all the information about the service in the beginning and so it was my fault. This means that while your PS3 and Xbox 360 will be able to stream down the files from your NAS4Free box, they will not be able to play them unless the device itself have the built-in capability to do so! To put things into perspective, MiniDLNA just allows your NAS4Free server box to be “seen” by your PS3 and Xbox 360 over the network. That’s it. The rest depends on the electronic device itself. The second major issue I found is that whenever I added new files to my media folders, I had to initiate a “rescan” of the folders. The bad news I found out is that in order for my PS3 to also see those new files, I also had to manually restart the MiniDLNA service as well each and every time I performed the rescan! Credit goes out to this forum post where I got pretty much all the information required to get MiniDLNA up and running.
Installing MiniDLNA onto NAS4Free
At the time of this writing, the latest version of MiniDLNA is 1.0.25. However, for the life of me, I cannot get it to download and install within NAS4Free. You see, we need to add it as a package because doing so forces all the other dependencies for MiniDLNA to install as well. Therefore, in this tutorial, I have to go ahead and install version 1.0.24. You do not have to manually download these files onto your computer.
Here is the package download URL if you use a 64-bit processor:
Here is the package download URL if you use a 32-bit processor:
ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9-stable/All/minidlna-1.0.24_2,1.tbzYou can go over this article to learn how to fully install the NAS4Free operating system onto your hard drive. A user commented that for this to work, he had to perform a full installation of the operating system. I also recommend you to do this as well if you will be working with NAs4Free on a permanent basis.
In your NAS4Free sever box, enter option number 6 to get shell access:
Once you have shell access, type in the following command to have NAS4Free automatically fetch, download and install the MiniDLNA components. I am using a 32-bit so this is what I will type:
pkg_add -R -r ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9-stable/All/minidlna-1.0.24_2,1.tbz
Once I hit enter, you should start seeing things getting fetched and installed as such:
At this point, just let NAS4Free do its thing. Once everything has been fetched and installed, note the last section of the screen. The install process created both a user and group called “dlna” with a specific uid and gid, respectively. In most cases, both numbers will be 933. Jot them down just in case because we will need this information later.
If you can believe it, we have just successfully installed MiniDLNA onto our NAS4Free box! Simple right? Well, now comes the configuration part which getting it right is the most important.
First what I’m going to do is create three directories. One directory each will hold my pictures, music and videos. I will create all three under my mount point of Storage as seen here. You can create the directories by using the File Manager within the web management of your NAS4Free server:
The second thing I need to do is manually create a folder to hold the MiniDLNA database and log files. By default, this location will be in /var/db/ with a directory name of ‘minidlna‘:
With those two tasks completed, it’s now time to perform the main configuration of the MiniDLNA. Head over the the advanced File Editor under the Advanced menu. We need to load the main MiniDLNA configuration file so press the three dot button and browse to the /usr/local/etc directory. Within, you should see a file called ‘minidlna.conf‘. Select it and hit the OK button at the top. Back in the File Editor menu, hit the Load button and you should now be able to see the contents of that configuration file.
Everything we need to get MiniDLNA working and configured to our liking is right here in this file. Ready for the good news? Of course your are! Turns out that in order to get just a basic and functioning MiniDLNA setup, you just need to specify two settings. Yups. Just two. The first setting tells MiniDLNA where it is it should monitor for your media files. As you can see in the very beginning of the configuration file, there is a specific syntax when specifying your media folders. If you’re wondering about all the # symbols, you can ignore them. This usually tells the configuration file to ignore all the text after that symbol. The second setting is giving your MiniDLNA server a friendly name.
First we’ll configure the monitored folders. Go ahead and erase the default folder of “media_dir=/opt”. In my case, I created three separate directories for each media file type. Therefore I need to list them here along with tagging each folder for the right type. Remember, do not include the # symbol in front of your settings! Here is what I will used:
Next, I now need to give my MiniDLNA server a friendly name. This name will show up when we browse in our PS3 or Xbox 360 for the server so you can pretty much name it whatever you want. This setting is directly under the first one. Here is what I will used:
friendly_name=PS3 Eyes Only
That’s it! I now need to hit the Save button to save my changes to the configuration file. All of the other settings are purely optional. Here is how my file looks like after the changes have been made:
Another configuration we need to perform on our NAS4Free box is to tell our server to autostart MiniDLNA each and every time. Head over to System –> Advanced and then click on the rc.conf tab. We need to add a new entry so click on the blue plus symbol. In the Name box, type in minidlna_enable. In the Value setting, type in YES. You can optionally give it a description as well.
Hit the Add button and then the Apply Changes button afterwards.
Now it’s time to reboot our server! If you don’t, the next step in the procedure will not succeed.
As for the last step, we need to create a user and group for use with MiniDLNA. When we installed it in the beginning, it created them for us but once we restarted the server, the changes are lost and so we now need to manually create those accounts again for permanent usage. Head under Access –> Users and Groups. First lets create the user. If you remember from earlier, MiniDLNA requires both a user and group account with the name of dlna with a UID and GID of 933 (or whatever number was listed on your screen). So we’ll go ahead and create them. You can leave the password field blank.
Here is the group creation:
Once you have completed both steps, reboot your server once more.
OK, so we’re almost there. Being as this is just my demonstration unit, I now need to dump some files into my media folders. For this I use WinSCP. Of course, if your media folders are already configured as a Windows file share, you can just as easily transfer media files as an SMB file share onto your NAS box.
Once I have my media loaded into the correct folders, it’s now time to perform a rescan. A rescan forces MiniDLNA to rescan the media folders you’ve configured in the configuration file for any new files. To execute commands, head over to Advanced –> Command. Type in: /usr/local/etc/rc.d/minidlna rescan and hit the Execute button.
Here is the irritating part. For each rescan, I found out that my PS3 would still not see the new files unless I also restart the MiniDLNA service. Therefore, I now have to execute the restart command as well right after the rescan by typing in: /usr/local/etc/rc.d/minidlna restart
Finally! We have everything configured! It’s time to actually test this thing out. Again, I don’t have a Xbox 360 (damn you Red Ring of Death!) so my test can only be done on a PS3 (damn you Yellow Light of Death!). Once I turn on my PS3, I should see my MiniDLNA server as so:
Below are screenshots showing that indeed all my media streamed successfully to my PS3:
In the End…
Well, there you have it folks! I successfully demonstrated how I easily am able to install MiniDLNA onto my NAS4Free box and stream my media over to the PS3. Granted, this solution does have two major drawbacks. Actually, there’s only one drawback, depending on how you look at it. If your existing media is already compatible with the device you will be streaming it to, then you won’t view not being able to transcode media on the fly as a drawback. In most cases, this largely depends on your video files and how they were encoded. If you video files are not compatible, then they will simply not play. You can then either convert them to a compatible format or dump MiniDLNA altogether and look for an alternative method.
The actual main drawback is having to restart the MiniDLNA process each and every time we add new media to our library. While a rescan does allow MiniDLNA to notice the new files, your devices may or may not see them unless you also restart the process. Again, I only tested this on my PS3 so I have no idea if this problem also occurs with other media streaming devices like the Xbox 360. If anyone tries this out, I would appreciate it the feedback. Also, because I am not an expert by any means in this area concerning NAS4Free and MiniDLNA, it can be very challenging trying to solve issues without any outside help.