Archive for the ‘Opensource’ Category

Recode BlueRay - M2Ts - On OSX Apple Mac Book Pro - For Apple TV, iPod, or Whatever You Want

Tuesday, September 30th, 2008

Ok, I have seen tons of people asking how to do this.  I came up with a method that seems to work rather well.  I will be working on ways to reduce the cpu time and a script to wrap it all up and make it easier.

Requirements:

1. FFMPEG (open source)

2. MENCODER (open source)

3. MPLAYER (open source)

4. Visual Hub (Pay for it)

Visual Hub is a great application, I highly recommend it.  Since it uses FFMPEG I could remove this step and reduce complexity and time greatly, however, I have not had the time or inclination to do that yet.  I will keep you posted.

Before you post some newb comment like… but Bit Boy, my version of x does not work for y reason, make sure you have the latest svn snapshots.  If necessary, I will post instructions for the extreme newbs, but usually they can be found on the project homepage for these applications.  (it is quite easy)  So please do a little research if you must before you ask me to do your work for you.

Lastly, these instructions do not include those needed to extract encrypted data from commercial BlueRay discs.  This is illegal in many countries and since I dont condone file sharing or illegal infringement on the rights of the authors, I wont post them here.  If you are hell bent on ripping a commercial BlueRay disc, I am sure you can find directions on how to decrypt the files for just about every platform all over the Internet.

 

Step 1:  Extract the audio from the m2ts file to output.wav using mplayer

mplayer -vc null -vo null -ao pcm:fast:waveheader:file=output.wav xxx.m2ts

Step 2: Extract the video from the m2ts file to output.avi using ffmpeg

ffmpeg -i xxx.m2ts -vcodec mpeg2video -sameq -s 1920×1080  -r 23.976 -an -f avi -copyts -benchmark output.avi

Step 3: Create a final .avi file by merging the audio and video using mencoder

mencoder output.avi -o final.avi -ovc copy -oac copy -audiofile output.wav

Step 4: Transcode the final.avi file to whichever format you want using Visual Hub.  On an Apple TV, that would be the AppleTV 5.1 + 2.0 preset.

The total time for this process is about 3 times the length of the original movie on a 2.5 Ghz Macbook Pro.  When I get some more time, I will go ahead and reduce the number of steps and possibly eliminate the need for Visual Hub.  Please make sure that you use a licensed copy of Visual Hub.  Programmers are able to do what they do because people pay for software.  Dont steal movies and really really really dont steal software.  It pisses off programmers like me and makes us not want to help newbs like you.  Just fork over the cash and look at as the price you pay for the convenience of being able to use your media on just about any device you want.

And if you are here to just learn how to steal media and software from the authors… GO FUCK YOURSELF!  YOU PUSSY ASS PILE OF SHIT…

 

Strong language to follow…

 

Perl Script for Creating Zoomify XML & Images

Tuesday, April 1st, 2008

I found this code for slicing a high resolution image for the zoomify image viewer.  Take a look if you are interested.  The code is free to distribute.
~Cheers
slice.pl

Openbravo ERP Installation on Ubuntu 7.1 Server

Thursday, February 14th, 2008

If you have found this, you are probably saying… “Help me Bit-Boy, I’m just a newb!  Share with me your knowledge, wisdom and God-like *nix skills!” (No, thats not a typo newb!)  So, in a moment of kindness, I took it upon myself to document how to install Openbravo ERP.  Yes, after this, you will probably explain to your client just how insanely difficult this software is to configure and that only you at your very reasonable rate of (insert ridiculous amount of $ here) could get it done.  Just remember that the Bit Boy helped you out and beer money is greatly appreciated.

Note:  This installation was completed from a clean installation of Ubuntu 7.1 Server.  No desktop environment was installed. (Didn’t I tell you my *nix powers were God-like?)Even though I have proven my superior intelligence yet again, you should be able to use the same process from the desktop.  If you have just installed Ubuntu server and are trying to figure out how to get the GUI installed, just type: sudo apt-get install ubuntu-desktop at the command line.

Step 1:  Enable Ubuntu Extra Packages

sudo gedit /etc/apt/sources.list Edit and remove the # from the beginning of lines 43 and 44.  This is necessary to install the correct Java Runtime Environment and Java Development Kit.

Step 2: Install Necessary Packages (the easy way) 

sudo apt-get updatesudo apt-get install sun-java6-jdk sun-java6-jre libpg-java postgresql-8.2 tomcat5.5 tomcat5.5-admin tomcat5.5-webappssudo apt-get dist-upgrade [optional - upgrades all currently installed packages]

If you dont feel like typing all of that, you can copy and paste it in, minus the note at the end of course.

Step 3: Setup Postgres Administrator User

  1. sudo su postgrespsql 
  2. Now, in the Postgres client: ALTER USER postgres WITH PASSWORD ‘your perferred password’;
  3. \q to exit

Step 4: Get Openbravo and Begin Installation 

  1. wget [Openbravo installer URL]
  2. sudo chmod a+rwx [Openbravo installer file]
  3. sudo ./[Openbravo installer file]

Generally, you can find the latest installer file here http://sourceforge.net/projects/openbravo/

Step 5: Set Environment Variables

  1. echo ‘JAVA_HOME=”/usr/lib/jvm/java-1.5.0-sun”‘ | sudo tee -a /etc/environment
  2. echo ‘JRE_HOME=”/usr/lib/jvm/java-1.5.0-sun”‘ | sudo tee -a /etc/environment
  3. echo ‘CATALINA_HOME=”/usr/share/tomcat5.5″‘ | sudo tee -a /etc/environment
  4. echo ‘CATALINA_BASE=”/var/lib/tomcat5.5″‘ | sudo tee -a /etc/environment
  5. echo ‘CATALINA_OPTS=”-server -Xms384M -Xmx512M”‘ | sudo tee -a /etc/environment
  6. sudo gedit /etc/init.d/tomcat5.5  There is a problem with JDK 1.5.0_13 and the jsvc binary used in the Apache Tomcat daemon script. Modify it [/etc/init.d/tomcat5.5], by setting the LD_LIBRARY_PATH variable pointing to the path where the libawt.so shared library is located.
    Next, due to the security policies of debian’s tomcat package, it is necessary to either create a rule or disable it. Otherwise it will refuse to load the openbravo context. To disable it, edit /etc/init.d/tomcat5.5 and change TOMCAT5_SECURITY=YES into TOMCAT5_SECURITY=NO.

Step 6: Answer Openbravo’s Questions and Wait 1-2 Hours 

  1. Installation Directory: [Just Type Enter]
  2. Attachments Directory: [Just Type Enter]
  3. Installation Type: [Just Type Enter]
  4. Installation Type: [Just Type Enter]
  5. Database: 1
  6. PostgresJava Directory: [Just Type Enter]
  7. Ant Directory: /usr/share/ant
  8. Tomcat Directory: /usr/share/tomcat5.5
  9. Domain: Enter your domain, if you dont know what a domain is, you are an idiot.  If you are an idiot, just type localhost or your static IP Address.
  10. Port: 8180 Note: This is specific to the Ubuntu installation, normally this value would be the secondary HTTP port 8080.  If you want to change it, that is find, just remember to go back and edit the tomcat configuartion files to indicate this port as well.
  11. Context Name: [Just Type Enter]
  12. PostgreSQL Directory: /usr/lib/postgresl/8.2/bin
  13. Database Host: [Just Type Enter]
  14. Database Port: [Just Type Enter]
  15. Database Name: [Just Type Enter]
  16. Postgres Password: Enter the password you selected in step 3.
  17. Username: [Just Type Enter]
  18. Password: Create another password
  19. Continue?:  y
  20. Now, just kick back, relax and crack open a nice cold beer, look at pictures of Britney Spears or whatever you newbs do.

Step 7: Restart Tomcat

  1. sudo /etc/init.d/tomcat5.5 restart

Step 8: Now Login Newb!

  1. http://yourdomain:8180/openbravo or http//localhost:8180/openbravo or http://yourip:8180/openbravo (That should give you enough options.  I dont want anyone sending me emails saying “But Bit-Boy, your instructions are wrong, my browser cant find the server”)
  2. Login: Openbravo  Pass:openbravo   (Note the caps in the Login!)

This document is copyright 2008 by the Bit-Boy’s-Blog all rights reserved.  Got that bitches!?  You may NOT, I repeat NOT reproduce this content in any way without the express permission of the Bit Boy himself.  Should you violate these copyright restrictions I will have no choice but to send this woman over to sit on you.

eTiny Web-Client Installation

Wednesday, February 13th, 2008

If you receive an error during the TurboGears installation, you probably need to install the Python developer libraries.  At an su command line, enter the following:

apt-get install python2.4-dev

Tiny-ERP Debian Installation

Wednesday, February 13th, 2008

I found these instructions on another site and they turned out to be quite helpful.  Initially I tried installing TinyERP on Ubuntu 7.10, but for a variety of reasons, it was more trouble than it was worth.  We switched over to Debian (which Ubuntu is based on) and the installation went without a hitch.

  • Pre-dependencies
    • PostgreSQL server
  • Install TinyERP server dependencies
    • Python 2.4
      • Incleded in standard base Debian 4.0 R1
    • PostgeSQL client
      • apt-get install postgresql-client
        • Default version is postgresql-7.4
    • Python and PostgreSQL adaptor
      • apt-get install python-psycopg
    • Python time zone
      • apt-get install python-tz
    • libxml2 and python binding
      • apt-get install python-xml python-libxml2
    • libxslt and python binding
      • apt-get install python-libxslt1
    • Reportlab pdf generator for Python
      • apt-get install python-reportlab
    • Python imaging library
      • apt-get install python-imaging
    • Graph visualization software
      • apt-get install graphviz
    • Pyparsing library
      • apt-get install python-pyparsing
  • Get TinyERP server source file and install
    • wget http://tinyerp.com/download/stable/source/tinyerp-server-4.2.0.tar.gz
    • tar vxf tinyerp-server-4.2.0.tar.gz
    • cd tinyerp-server-4.2.0
    • sudo python setup.py install
      • Installation folder is /usr/lib/python2.4/site-packages/tinyerp-server
  • Create TinyERP database
    • su - postgres
    • /usr/local/pgsql/bin/createdb –encoding=UNICODE terp
      • Assume PostgreSQL homed at /usr/local/pgsql and creating database named terp
  • Startup TinyERP Server
    • cd /usr/lib/python2.4/site-packages/tinyerp-server
    • sudo python tinyerp-server.py -d terp -r postgres -w  –db_host=localhost –db_port=5432 –logfile=”tinyerp-server.log”

      • Assume the database name is terp, database owner is postgres, database server located at the same machine, database listening port is 5432, and logfile is tinyerp-server.log right in the current directory.
      • You can make a batch script (ex. run.sh) to shorten the long command typing.