The Complete Guide for Setting Up Subsonic Music Server on Mac

A compiled guide to setting up Subsonic Music Server on Mac OS 10.8.2 from the beginning till the end.

The Ultimate Guide to Download Like A Pro

Follow this 3 parts of guide to download like a pro!

Exporting Good Quality Video to YouTube using Final Cut Pro X

A tutorial that teaches you to export high quality video using the highest compression for uploading to YouTube, all using Final Cut Pro X

Friday, May 24, 2013

Quick Review on Sennheiser HD 600

Hey guys, finally got my hand on HD600 today!

Just a heads up, my previous headphone was FA-003 and it really serves its purpose well and is definitely the best bang for buck. In fact, I had been taking a great amount of notice about this HD600 vs HD650 debate for a very long time now but decided to go for FA-003 previously for lacking the bucks to buy one of this. One thing I dislike about FA-003 is that wearing it to listen for music for a long period always makes my head feel uncomfortable (even after adjusting the head band in various level), particularly the clamping force that I had. The listening experience is good, but the comfort always prevent me from really enjoying music for a long time.

Now this review is coming from a non-seasoned audiophile and never watched any unboxing video of this product before. I just read tons of written reviews about them. I'm not a professional reviewer of any kind so please bear with me if I spoke something that might sounds funny to you. What is written below is what I have thought in my mind right now.

Here goes the quick review:

When unboxing it from the outer jacket, I'm instantly amazed on how well Sennheiser designed their box. Kind of like a jewelry luxury like box you might say, which I think it should be given this hefty price tag :) Further opening the jewelry box reveals a 'white instruction manual', with the headphone in its great luxury just behind it! Frankly and jokingly speaking, it was the white instruction manual that first grab my attention when opening it (well I suppose because it is white while the rest is black in color)! I thought that it is the last thing that I should see after picking up the HD600. Well normally it should have laid somewhere under the product instead of having it 'in-front' of the spotlight, which is the HD600 itself. I think you might find it amusing as this is the first time that someone actually spoke of something like this :-P

When trying to put on HD600 for the first time, I instantly noticed how comfort it is (after the proper adjustment of the head band of course) and the ear pad is really comfortable. I already wear it for almost an hour now and I am still yet to feel any heat coming from my face. HD600 also give a whole new listening experience due to its open can design. Now don't get me wrong. I still feel that FA-003 gives the almost similar soundstage and sound signature as HD600, but not exactly the same. There is definitely a difference between close can and open can design. But FA-003 really did great even for its closed can design.

Regarding the sound leakage that most people is concerned with open can design, I would say it is of relatively small amount. Well perhaps I am not used to listening to very loud music. With my normal listening level on New Age/Soul music (well how loud can you go when listening to these kind of music. Loudness will definitely have adverse effect whereby these type of genre are supposed to carry a very soothing and relaxing listening experience), I can barely hear the sound leak. Well there is still a small audible sound coming out from it but that is only important if someone is sitting very close right next to you and paying a really close attention to the sound in their surrounding. Otherwise you won't be bothering them much.

Talking about cable, it is very much thinner than the Fischer FA-003 so I guess you need to take deliberate care of it, especially the bending. Some people might find this a cons but I actually prefer a thinner and lighter cable. I always take deliberate care of cable so its not an issue here. I just lay it on top of the table now instead of having it 'hanging' around the floor just as I used to do with my FA-003 cable.

I'm currently connecting this babe to iCAN <--> Fiio E17 and the listening experience is really superb.
Now previously I'm always afraid to purchase any open can design because of the sound leak and no noise isolation. But after trying an open can design, which is the HD600 itself for the first time now, I found it to be very pleasing. In fact, I prefer to hear some external noise so that I can still know who is coming into my room and I can also speak with them without having to remove my headphone. You might have different thought but I guess you just had to try it out for yourself to feel it.
All in all, I must say that this HD600 really worth its price tag. Well it might be a bit pricier but there's always FA-003 as an alternative if you don't mind the slight comfort issue that it had.

P/S: Come to think of it, my most long used earbud is actually from Sennheiser too! The MX-660. Already used it for more than 8 years now and it is still working great!! This only proves that Sennheiser really makes GREAT QUALITY product!!

More pictures in the future!




Monday, April 15, 2013

PS Vita Unboxing!

Finally got my PS Vita today!!

Overall it cost me NTD 9410 (~RM 956) for all the items in the box and NTD 980 (~RM99) for Metal Gear Solid (US) and NTD 145 (~RM147)for Persona The Golden (JP).

The price for the console is actually NTD 9410 - NTD 2750 (the actual price for 32GB memory card (free due to promotion event by SEN in Taiwan) - NTD 580 for the 365 PSN Card (free) - NTD 190 for the AR Card) (free) = NTD 5890 (~RM598).

So here are some pictures for your viewing enjoyment.


















Wednesday, January 9, 2013

[Tutorial] Enable network connection in Android x86 4.0 ICS using VirtualBox

If you're an Android developer like me, you'll come to hate the sluggish performance of the emulator that came bundled with the SDK. So you try to install Android x86 as a VM in Virtual Box. Things work out pretty good and there's no more annoyance of the slow down. But one thing that you'll realize fast enough is THERE IS NO NETWORK CONNECTION! Googling for this and you'll come across to many workaround, which you might find it not working.

Following the instruction below to get the network connection working in Android x86 4.0 RC (eecpc version) on VirtualBox.

Several shortcut that you should know:
Alt+F1 : Enter terminal mode
Alt+F7 : Return to the GUI

1. Before starting your Android x86 VM, open up your terminal and enter the following. This will create a NAT rule:
VBoxManage modifyvm "Your Android VB name" --natpf1 adb,tcp,*,5555,*,5555

2. Make sure the network is set as NAT. I've tried Bridged Networking but no avail.

3. Start up your VM and wait until it is boot up. Then enter terminal mode by pressing Alt+F1.

4. Type netcfg to make sure the interface is up and running. Try to send a ping to your default gateway and it should be successful.

5. Enter the following to use the Google DNS. You can use your own DNS server too.
setprop net.dns1 8.8.8.8

6. Return to GUI mode and you can now start to browse the Internet!

Tuesday, January 8, 2013

Installing DLCs for Final Fantasy Theatrhythm (iOS)

If you were a FF fan like me, I believe you will feel happy when realizing that FF Theatrhythm was released on AppStore for Free. However, the developer had a plan behind that move, which is by implementing the dreaded DLC which will surely rip off your wallet unless you are uber rich. Purchasing all the songs will cost you more than twice the amount that you can pay for a 3DS version for similar game. Compared to the original release for 3DS, the iOS port has the RPG element removed. However it is compensented by offering several lengthly songs not available for the 3DS version, such as One-Winged Angel from FFVII: Advert Children.

Luckily there was a Thailand guy that had cracked all the DLCs and kind enough to share it with the rest of the world. Follow the instructions below to download the DLCs at zero $!

1. Grab the link here: http://www.putlocker.com/file/5D88BBF3D2E5B1F5

2. SSH into your iOS devices and find the folder for the game under the /private/var/mobile/Applications directory.

* Since the folders are named using a unique ID such as 0BE5D130-0EDF-4A42-B287-3BAD56C7575B, you might find it difficult to find the correct folder. You can do this in either the quick or slow way.

Slow way: Open each of the folder until you see tffencore.app.
Quick way: Removing the game from your device and then re-intall it. After that sort the folders by Date. The folder for the game should now be located at the top.

3. After pinpointing the folder, copy all the files from the downloaded archive into each of the directory.

4. Make sure that you change the group owner to mobile instead of root after copying for all of the folders copied. This is to make sure that your game progress will be saved when you exit the game.

Q&A

Why my game progress for Final Fantasy Theatrhythm did not save whenever I quit the game?
It is because you haven't set the correct group owner for the DLCs files. Follow step 4 to solve this problem.

Link

http://www.iapphacks.com/viewtopic.php?f=3&t=5650&sid=68e1cf91214c76c9cfe7e0de9472c84f&start=160

[Tutorial] How to port forward in VMware Fusion 5

1. Edit the NAT configuration file.

$ sudo vi "/Library/Preferences/VMware Fusion/vmnet8/nat.conf"'
...
[incomingtcp] 3128 = 192.168.19.69:3128 
... 

E.g. I want to forward the client request from port 3128 into a web server running on VM using port 3128.

Typically you will need to restart the VM for the effect to take changes. Another solution is just restarting the NAT service by executing the following command:

sudo "/Applications/VMware Fusion.app/Contents/Library/vmnet-cli" [--stop|--start]

Sunday, October 21, 2012

[Tutorial] The Complete Guide for Installing Your Own Subsonic Music Streaming Server

IMPORTANT: This guide is continually updated from time to time.

TODO

  • Guide to setting up transcoding.
  • Changing the subsonic source code and compile.

Introduction


Subsonic (or Subsonic Music Streamer) is an open source media player server that allows even normal user to share their multimedia files online. The following tutorial is prepared to guide you to fresh install SubSonic mods such as MusicCabinet and Madsonic on Mac OS X. The setup is done on a Mountain Lion 10.8.2 system.

At the end of this tutorial you will:
  • Have a Subsonic streaming server setup on your Mac.
  • Setup Subsonic registration engine so that other user can register without manually creating the users.

Prerequisite

  • Java 7
  • Tomcat 6
  • Postgre
  • Macports
Before you proceed with this tutorial, you must make sure that you have the aforementioned components setup. This guide will cover the installation of Tomcat and Postgre as well.

You will have to download the installer from Oracle to install the latest Java 7 as it is not distributed by Apple.

NOTE: The latest Java version distributed by Apple is Java 6, which doesn’t meet the minimum requirements of Subsonic.

The mods might comes with two distribution, namely:
  • Standalone - Bundle together with Jetty Web Server. This is the easiest deployment. 
  • WAR (Web Archive) format - To be deployed on a Java Web Server such as Tomcat. More complicated.

Method 1 - Standalone Deployment (e.g. Music Cabinet)

1. Download the latest standalone deployment here at http://forum.subsonic.org/forum/viewforum.php?f=11

2. Extract it to somewhere convenient, e.g. /Desktop and change your working directory there

cd /Desktop/subsonic-installer-standalone

3. The archive file normally have name such as subsonic-installer-standalone which contains files such as subsonic.war, subsonic-booter-jar-with-dependencies.jar, subsonic.bat (startfup script for windows) and subsonic.sh (startup script for *NIX/Mac)

4. Before launching the startup script, you will need to assign +x rights to the subsonic.sh file.
sudo chmod +x subsonic.sh

5. Create a new directory called /subsonic under /var/ and assign the ownership to it. This directory is used to store subsonic database and log files.
$ sudo mkdir /var/subsonic
$ sudo chown dsync /var/subsonic

6. Launch the script by entering:
./subsonic.sh

7. Access the page by going to http://localhost:4040. You should see a login page.

8. Log in using the default admin account using ‘admin’ for both the username and password.

9. You should see a getting started page that require you to have a Postgre database setup. Proceed here install Postgre if you haven’t got it setup.

10. After setting it up, click on the Configure System. You will be asked to enter a password for the user ‘postgres’. The default password is ‘postgres’ if you installed it using the installation guide on step 8. Otherwise enter the password that you supplied when installing PostgreSQL.

11. That’s it, you’re done.

Method 2 - WAR deployment using Tomcat

Currently it is stated in the site that Subsonic only works well on Tomcat version 6. So this tutorial will proceed to install with Tomcat 6.

1. Refer to the guide (http://wolfpaulus.com/journal/mac/tomcat7)

2. To start the server, simply type:
$ /Library/Tomcat/bin/startup.sh
or the following to stop the server:
$ /Library/Tomcat/bin/shutdown.sh

3. To check which JRE that Tomcat is running, enter (http://localhost:8080) and click the Manager.

4. By default, there isn’t any user created to access the manager interface. You will need to create it by editing:
$ nano /Library/Tomcat/conf/tomcat-users.xml

Then paste the following code just above the '<'/tomcat-users'>'. This will create a user with the name ‘tomcat’ and password ‘s3cret’.
<role rolename="manager-gui">
<user password="s3cret" roles="manager-gui" username="tomcat">
</user></role>

5. Now click the Status and make sure the JVM running is 1.7+. If it is running on version 1.6.x or below, refer here.

6. After making sure that Tomcat is running using JVM version 1.7.x, move the .war file to the following path:
$ mv /Desktop/subsonic.war /usr/local/apache-tomcat-6.0.35/webapps

7. Restart and run the server again. If all goes well you will see the page loading at http://localhost:8080/subsonic

Installing PostgreSQL 9.2

There are two ways of installing it, one is to directly using the .pkg installer found on Postgre official site. The second one is through MacPorts. This tutorial will cover the second method:

1. Update to the latest MacPorts version. Go grab a coffee because this will take up quite some time.
$ sudo port –v selfupdate
$ sudo port –v install postgresql92-server


2. Create the initial database for Music Cabinet:
$ sudo mkdir –p /opt/local/var/db/postgresql92/musiccabinet
$ sudo chown postgres:postgres /opt/local/var/db
$ sudo su postgres –c ‘/opt/local/lib/postgresql92/bin/initdb –D /opt/local/var/db/postgresql92/musiccabinet

3. To run the server manually:
$ sudo su postgres -c '/opt/local/lib/postgresql92/bin/postgres -D /opt/local/var/db/postgresql92/musiccabinet'

NOTE: The default user created is ‘postgres’ with the same password ‘postgres’.

Troubleshooting

How to increase Postgre maximum connection number?
NOTE: Proceed only if you see any FATAL ERROR: too many clients already in the terminal.

If you wish to increase the maximum connection number of Postgre from the default value of 20 to a higher number, the SHMMAX read by the kernel need to be increased as well.

You can check the current SHMMAX value by your running kernel by issuing
$ sysctl –a

and then you will find the following which is the default.
kern.sysv.shmmax: 4194304

To increase this value, you will need to create a file under /etc/sysctl.conf and enter the following lines as recommended by Postgre README file for MBP 2GB RAM. The purpose of creating the file is so that the changes made will be persistent each time you reboot the system.
$ nano /etc/sysctl.conf

kern.sysv.shmmax=1610612736
kern.sysv.shmall=393216
kern.sysv.shmmin=1
kern.sysv.shmmni=32
kern.sysv.shmseg=8
kern.maxprocperuid=512
kern.maxproc=2048

How to Set Java Path to Java 7
1. Go to /Applications/Utilities and select Java Preferences.
2. Drag and drop Java SE 7 so that it is located at the top.

By doing so, your system is now configured to use JRE 7 as its priority and will only fallback if the Java application doesn’t support it.

3. In the terminal, type
/usr/libexec/java_home --version 1.7

4. This should return with a path such as
/Library/Java/JavaVirtualMachines/jdk1.7.0_09.jdk/Contents/Home

5. To include this as the $JAVA_PATH:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_09.jdk/Contents/Home

NOTE: Using the following command would not register JAVA 7 because the latest Java 7 is not distributed by Apple, instead it is by Oracle.
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home

How to integrate PHP-CGI and Tomcat 6


1. Download php-cgi from MacPorts.
sudo port install php5 +fastcgi fcgi php5-gd php5-mysql php5-sqlite php5-curl php5-iconv

2. Add the following lines into /TOMCAT_DIR/conf/web.xml.
php.java.servlet.ContextLoaderListener
PhpJavaServlet php.java.servlet.PhpJavaServlet PhpCGIServlet php.java.servlet.PhpCGIServlet prefer_system_php_execOn php_include_javaOn PhpJavaServlet *.phpjavabridge PhpCGIServlet *.php
3. Follow the instructions here.

4. After extracting the files, put both JavaBridge.jar and php-servlet.jar into /TOMCAT_DIR/lib

5. Open context.xml found under the /TOMCAT_DIR/conf/

6. Append the following line to the Context header.
reloadable="true" privileged="true"

For example:
<Context reloadable="true" privileged="true">

<!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<!-- Uncomment this to disable session persistence across Tomcat restarts -->
<!--
<Manager pathname="" />
-->

<!-- Uncomment this to enable Comet connection tacking (provides events
on session expiration as well as webapp lifecycle) -->
<!--
<Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
-->

</Context>

FAQ

1. Where is the Subsonic log file?
A. It is located under /var/subsonic.

2. Where is Tomcat Log file?
A. It can be found under /tomcat dir/logs. It is very useful to troubleshoot why a page refuses to load.

3. How to increase Tomcat heap size to prevent OutOfMemory error?
Type the following command in the terminal.
export JAVA_OPTS="-Xms1024m -Xmx1024m -XX:MaxPermSize=512m"

Additional Setup

1. Subsonic Registration Engine - http://www.schattorie.com/subsonic-registration-engine/
2. Hiding server status and usage to public user - http://forum.subsonic.org/forum/viewtopic.php?f=3&t=8040&p=36224&hilit=hide#p36224


A. Subsonic Registration Engine


1. Follow the instruction here.

2. Extract and put the file into /TOMCAT_DIR/webapps.

3. Make some necessary changes to the following files:
- register.php

Change the domain name into your subsonic address.

- /lib/config.php
- /lib/mailconf.php


- /lib/mail/passresetmail.txt
Contains the format of the mail received by the user when they reset their password.

- /lib/mail/regmail.txt
Contains the format of the mail received by the user when they register.


Add the following to login.jsp so that it will display both the register and forgot password link.

<!-- REGISTER START -->
<td align="left"><br><a href="http://musicscrape.zapto.org:8080/register/register.php" >Register</a>
<br><a href="http://musicscrape.zapto.org:8080/register/forgotpass.php">Forgot password</a></td>

<!-- REGISTER END -->

References

  1. Installing PostgreSQL9.2 on OS X Mountain Lion - http://phlippers.net/blog/2012/08/03/install-postgresql-9-dot-2-on-os-x-mountain-lion/
  2. Postgres Max Connections and Shared Buffers - http://gabe.grayum.name/?p=postgres_max_connections_and_shared_buffers
  3. FATAL: could not created shared memory segment - http://grokbase.com/t/postgresql/pgsql-general/12a76zj50s/mac-os-x-mountain-lion-fatal-could-not-create-shared-memory-segment-cannot-allocate-memory
  4. Installing TomCat 7.0.x on OS X - http://wolfpaulus.com/journal/mac/tomcat7
  5. Setting JAVA_HOME on Mac OS X 10.5 - http://www.mehtanirav.com/2008/09/02/setting-java_home-on-mac-os-x-105/
  6. Installing Java 7 on Mac OS X - http://www.vineetmanohar.com/2011/03/installing-java-7-on-mac-os-x/
  7. MusicCabinet - http://dilerium.se/musiccabinet/#installation
  8. http://www.helloyi.cn/index.php/2011/09/30/mac-osx-lion-macport-nginx-php/
  9. Serve PHP with Tomcat - http://www.thomasknierim.com/140/java/serve-php-with-tomcat/

musicScrape - Yet Another Music Streaming Service

Just to kill some free time in the past two days, I had decided to play with a new toy, this time it is yet another music streaming service simply name musicScrape. The sole purpose is to enable music streaming by genre (or called radio) and enable easy on-the-go streaming experience. Streaming can be done using HTML5 or any other external player.

This service is provided so that I can listen to music anywhere in the campus, but due to the usage of IPv6 I had decided to allow access to the public too. Don't abuse it.

Visit the site at http://musicscrape.zapto.org:8080.
Best viewed with Firefox. Powered by Blogger.