Showing posts with label media player. Show all posts
Showing posts with label media player. Show all posts

Tuesday, May 28, 2013

Media Server install on Headless Ubuntu Server 12.04

As I mentioned in a previous post, I've been playing around with Ubuntu Server 12.04 on an old laptop of mine. One of the purposes of putting it together is to stream media over my home network. As I mentioned earlier, I'm running this server headless using Putty. So here is a set of instructions I found to work very well with my install. Credit goes to folks at UbuntuForums.org and damo12 for putting this post together. Another potentially useful link in case there are still questions after this post can be found HERE.

 ----------------------------

Guide to Installing and Running MiniDLNA on an Ubuntu Server

I have recently been experimenting with running MiniDLNA on a headless Ubuntu Server and have hit a few snags. After a lot of search and a few pointers from this and other forums I have finally managed to get it running fine. In case anyone else has this problem I have written this guide to hopefully take some of the pain out of installing and configuring an amazing program.


The Hardware

My server is a headless HP Microserver running Ubuntu 10.04.3 LTS 64 bit edition accessed through Putty and Webmin (www.webmin.com). I have also tried this using a virtual setup using Virtual Box and that also worked fine.

As a receiver, I am using an LG HX806SH Blu-ray player connected to my LAN by a Homeplug adapter. I have also tried using Windows Media Player and they both work fine. I would like to try this with VLC to test it on a Linux desktop but configuring VLC to receive streaming media from a server is beyond me right now.


The Server Setup

The server has a standard headless setup including Samba installed (a combination of Windows and Linux machines share files stored on it). If you need any help installing and using Webmin, I suggest you have a look at the excellent guide at http://www.kelvinwong.ca/2010/05/22/...-04-lts-lucid/.


Installing and Configuring MiniDLNA

For some reason, when I tried to install MiniDLNA, through Putty I received error messages. From reading around, it turns out that this is a common problem as some repositories are missing.

In the end, these commands installed the package:

Code:
sudo apt-get install --reinstall python-software-properties && sudo dpkg-reconfigure python-software-properties

sudo add-apt-repository ppa:stedy6/stedy-minidna
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install minidlna
I would also recommend installing the Webmin MiniDLNA module from https://sourceforge.net/projects/minidlnawebmin/

If you are accessing the server through Webmin and are not sure how to install the module, save it to a local location (such as your desktop on your computer). Select the "Webmin Configuration" module which is under the "Webmin" tab. Select the "Webmin Modules" and choose to load the module “From uploaded file". Once the module has been installed it will be automatically be configured and it will be available under the "Servers" tab.

Once this is installed, you need to configure the MiniDLNA conf file located at /etc/minidlna.conf.

You can use your favourite text editor or if you are accessing this through Webmin, you can use the "Edit" option in "File Manager". If you have installed the Webmin module, you can also change all of the settings from there.

My minidlna.conf file reads as follows:

 [refer to link for the full text, but the only changes I had to made were adding the following]

# set this to the directory you want scanned.
# * if have multiple directories, you can have multiple media_dir= lines
# * if you want to restrict a media_dir to a specific content type, you
#   can prepend the type, followed by a comma, to the directory:
#   + "A" for audio  (eg. media_dir=A,/home/jmaggard/Music)
#   + "V" for video  (eg. media_dir=V,/home/jmaggard/Videos)
#   + "P" for images (eg. media_dir=P,/home/jmaggard/Pictures)

media_dir=V,/media/server/server/Media/Films
media_dir=V,/media/server/server/Media/TV
media_dir=V,/media/server/server/Media/Commedy
media_dir=V,/media/server/server/Music/Videos
media_dir=A,/media/server/server/Music/Music
media_dir=P,/media/server/server/Stuff/Pictures

# set this if you want to customize the name that shows up on your clients
friendly_name=MiniDLNA Server

[Basically you need to add the path to the appropriate folders you want to share, and where it says "friendly_name" you can change to something you can easily identify in your network.]

As you can see, I've made a few changes to the standard file:


  • I have added various sources of videos
  • I have changed the name of the server so I can recognise it easily on the network
  • I have moved the location of the database to a location that I backup each day and is shared by Samba (this is for my personal benefit only)
  • I have added extra filenames to the "AlbulmArt" section as I usually call the front cover of an album "Front"

Despite the line “# default presentation url is http address on port 80” MiniDLNA does not have a webpage that it can be controlled from. From what I can gather, this was going to be a future feature that was not completed for whatever reason. However, the Webmin module takes care of everything that you need.

From the "Command Shell" in Webmin or through an SSH session using Putty, you can control MiniDLNA using the commands:

Code:
sudo /etc/init.d/minidlna stop
sudo /etc/init.d/minidlna start
At first run, MiniDLNA will scan all of the folders (and their sub-folders) it has been pointed at and make all of these files available. The scan is extremely quick (less than 10 minutes to scan about 12,000 files).

The Webmin module has a "Restart" button but for some reason (on my set-ups) it does not work properly. It will stop MiniDLNA but when it tries to restart it, it fails. Trying to manually start it using the command "sudo /etc/init.d/minidlna start" after using this "Restart" does not seem to work and the only way I have found to resolve this is to restart the whole server.


Adding or Removing Files of Folders from the Database

In my experience, MiniDLNA tends not to notice if a file has been added or removed from the folders so the database does not update and new files are not shown on your device and old files are still shown even though they have been removed. This seems to be a problem with MiniDLNA and not the receiving soft/hardware. If you change the name of the server, the soft/hardware picks that up fine.

Some people have had success with the command:

Code:
minidlna -R
or by removing the file /tmp/minidlna/files.db and restarting the server using the command:

Code:
rm -rf /tmp/minidlna
Someone else suggested using the command:

Code:
minidlna -R -f /tmp/minidlna.conf
However, I have found the easiest and most successful method is to use the "Rescan" button in the Webmin interface. This button deletes the MiniDLNA database and rescans from scratch. On my system, this new scan took less than 10 minutes to scan about 12,000 files. After the scan, any new files appear in the database and any deleted files are removed.


Outstanding Problems

The only thing I have not been able to get MiniDLNA to do so far is display my photos properly on the Blu-ray player even though they display fine on Windows Media Player. On the Blu-ray, it shows all of the folders where my pictures are stored and even gives me the option to search by camera but when I try to view the pictures or look into the folders, the folders are all empty. This suggests it is something to do with the Blu-ray player and not MiniDLNA however, to be honest this is not an issue for me as my main aim was to stream videos and music and it works perfectly for that.

If anyone can point me to a walkthrough of how to receive streamed videos and music on VLC I would be grateful so I can test this set-up on that and add it to this guide.

I hope you find this guide useful and it takes away some of the headaches I've had with setting up this excellent program.

Monday, November 14, 2011

Easiest printer install EVER !!! & update on my media manager choice

I had been using my printer only on Windows before, just because it was already installed and I figured why bother. Well today I booted my machine on Linux and by mistake I had left my printer on last time I used it. So once I logged into Ubuntu something prompted asking me for root rights and I read that it was my HP printer asking to be installed. Well, I figured there would be no harm in typing my password so I did. The process took a solid 3 minutes and I just had to type a "proceed" type command when prompted and voilĂ . My HP LaserJet 1020 printer was ready to print, I did a print test and it worked. I have to say I'm very impressed with this aspect of my Ubuntu 11.10, that was by far the simplest printer installation I have ever seen.

On a different note, I have tried Rhythmbox Music Player as an alternative to my recent move to Banshee. My first impression is that Rhythmbox is a bit of a plain thing to look at, however, the functionality is a different story. This wonderfully light media manager has been working wonders for me. I now have all my podcasts being subscribed properly on it, and transferring them to my ipod is no longer an issue. Not only that, but my podcasts are now going to their appropriate menus, just like I had on my iTunes. The syncing is very similar to Banshee, where you kind of drag and drop. I think I still prefer iTunes in that respect, but being able to manage my music on Linux and do virtually everything just as well without relying on proprietary iTunes is great. Therefore, I would certainly recommend Rhythmbox to anyone interested in the switch.

Monday, November 7, 2011

Banshee and MediaTomb rant

My PC just recently blew up and I was forced to shell out some money to buy myself a new machine. Anyway, I am taking this unfortunate event to push my reliance on Windows aside as much as possible, what better opportunity to just not install the programs I am used to in order to try cross-plataform applications on my new Linux install.

On my new machine I installed Ubuntu 11.11 Oneiric Ocelot, which from reviews seemed very good and made users happier than the Natty Narwhal release. Well firstly I have to say the aesthetic side of the new release is a nice change. The new menu is certainly better looking, the login screen is OK but I can't say I like it more than what it was in 11.04.

Well there have been 2 things so far that I've been trying to accomplish on Ubuntu that haven't been the most pleasant experiences. First I have been attempting to use Banshee to replace the bulky iTunes that I have been using for many years. I had moved to iTunes initially for the same reason most people did, which was for using our iPods more efficiently. I had a hard time going from something lightweight like Winamp to iTunes. Banshee actually has some very nice features, such as the way it is integrated to the OS which is very nice, the memory usage is another advantage and the fact that it seems to pick up album covers very efficiently is another reason for liking it.



Unfortunately so far my experience hasn't been 100% positive. One of my main needs for a media manager is for managing my iPod. I use my iPod very heavily during the week. I like music and especially enjoy podcasts and audiobooks. iTunes manual sync interface has done all this amazingly well for the last 4 years or so, but I still wanted to move away from it if there was a better open source option available. I way rather not support Apple and other proprietary applications if I have the option.

My first issue with Banshee has been the aparent inability to upload my podcasts to my iPod as podcasts. By that I mean that when you load a podcast to my iPod it doesn't show up under my "podcasts" section. I can get used to not being able to synch my files with a checkbox, but not having a "podcasts" folder is a bit annoying. Perhaps this is a problem with the hardware so that users can't get all the functionality without iTunes, idk. My next problem is that now that I have moved podcast files to my ipod it doesn't seem able to play it. I found them on the player but when I try to play it, it just stays at 0:00 and nothing comes out. I'm going to try a bit more and see if there are ways around these annoyances. If not I'll try a different open source option if it seems to do what I need.

Lastly, I have been trying to share media over my network to my PS3 through Linux. So far I've been using MediaTomb which seems kind of buggy most of the time. I can never tell if things are going to show up on my PS3 and often they show up and don't play. I can't claim that Windows Vista and XP were bug free at first, so I will keep trying with MediaTomb and if that fails I am sure there are other options out there.

I would love to use Windows solely for gaming and the occasional Excel spreadsheet functionality I don't get on LibreOffice. Unfortunately LibreCalc just won't cut it for my spreadsheet needs. I am trying to cut my ties to Windows wherever I can.

Wow, this post probably makes Linux sounds like a bad move. Don't get the wrong impression, these are just a few challenges I've had. I still love the two distros I've tested so far.

Just to even out my post, let me say that windows 7 gave me a blue screen on my 3rd boot after I got my new system. Not only that but I'm not the biggest fan of the Windows 7 task bar. I absolutely hate that I can't easily pin files directly in there. Either it takes 2 extra clicks to achieve the same action now or you have to trick windows with a pseudo-application. Considering the changes are supposed to be an improvement on the interface I would call that a big failure. Not only that but I almost feel like there is less room for customization as well. I still haven't found my loved "desktop" button either on my task-bar which is probably the one I use the most in previous versions of Windows. Sure, I'm sure you can still do it, and I'm sure there is another shortcut available, but I don't want to waste my time learning about an OS I already mastered a decade ago.

I then went to try to disable auto-play on Win7 for when you insert media like a USB drive. Well, not only its extremely difficult to figure out how to do it, but I ended up having to download some random script to do it for me. Microsoft is definitely disappointing me big time with this new version of Windows.

Lastly, what's up with not being able to make my desktop icons smaller. The small size is not small at all. I'm not blind or old, so don't give me that crap.



 edit 1: I have found a way around the missing podcast directory on my ipod, which apparently shows up as a playlist called "podcasts", so that's not too bad. I have also found that some of my podcasts are working on my ipod but not all of them yet. I'm still having a lot of problems with Banshee, it seems buggy and it crashes a lot. I have yet to see any other software on my ubuntu that keeps crashing and Banshee seems to crash about every other time I use. I have done some reading, and found out this may be due to my large library size, the application is still a bit buggy for the moment.
 edit 2: My frustrations with Banshee are leading me to try some other options, my next one will be Rhythmbox which I have heard good things about, we'll see how it does. If this one is also another application that doesn't work for me I will attempt Songbird, which does also look very interesting from what I've seen.