Compiling HandBrake on TFM

Friday April 27thUncategorized Category 216

  1. Get the handbrake from official web site
  2. untar into a temp dir
  3. configure it and change dir to build dir
  4. export HASDOCBOOK=no     (this is needed because we don’t need fontconfig documentation to be rebuilt)
  5. edit contrib/libvorbis/module.defs and change  LIBVORBIS.CONFIGURE.bootstrap to LIBVORBIS.CONFIGURE.bootstrap = rm -fr aclocal.m4 autom4te.cache ; chmod a+x autogen.sh ; ./autogen.sh ;
  6. change dir to build dir. run make

That’s all to have HandBrakeCLI compiled.

The GUI version still requires some work. I will update the post then.

 

From 2.3s to 22ms in 1 minute. Mysql index optimisation

Wednesday August 31stLinux Category 3,408

In my little free time i developed for Tfm Group Software a small php application that read from a mysql table , made some calculation and presented a small table as result. In a cron job at every 5 minutes some data were inserted in the database. So far so good. The application was ok  and did it’s job . Another projects came and i forgot about it. However the data kept being inserted in the table. Several months later  i tried to load the result page . And for my surprise it loaded in 2.3 seconds. For a moment i was thinking that i did something wrong or the application was modified. Well it didn’t . In the database i had 375k rows but no indexes. The most used column was `insert_date` . So instantly i checked if i used index on it . Well i didn’t . So the quick fix came naturally:

create index a1 on tfm (insert_date);

And the page load time decreased magically from 2.3s to 22ms . This is a reminder to power of myql indexes in tfm linux or any other linux of your choice.

 

How to do live video streaming

Wednesday June 22ndStreaming Category 3,557

In this article i will cover live video streaming on the internet using Adobe Flash technology. Why would you need to do live streaming ? If want people to see in real time what is happening in a location , if you want to show to people a sport event or if your friends that are miles away from you want to see your wedding you will need to do live video streaming.

What tools will you need ? Well that depends on two main things: quality of the broadcast and number of people that will watch the live event. Let’s start with a high quality and lots of people that will watch the event. For this you will need:

A very good video and audio signal for the encoder . From my experience there are several ways to do it:

  • a professional camera with firewire works best or even better if you can rent a video mixer and use multiple cameras.
  • If you have SDI signal you can use Osprey HD capture cards

An encoder PC ( or laptop ) with firewire interface.

  • You will need a fast processor and a fast hardisk in it if you want to record the event for later use.
  • Install Adobe Flash Live Encoder (Adobe FMLE) . At the time i write this article the latest version is 3.2.
  • Adobe FMLE comes in 2 flavors: Windows version and Mac OSX version

A CDN ( Akamai , Edgecast, Level 3 Communications, etc ) or if you intend to broadcast yourself and intend do to this for profit you can build you own CDN ( this will be covered in another article )

If you buy services from a CDN you will have to pay on how much bandwidth your viewers will consume. And that can be expensive

If you have built your own CDN  you can achieve 20.000 simultaneous viewers with 1 core and 5 edge servers.

 

Setting up Adobe FMLE

Adobe FMLE settings part1

Adobe FMLE settings part1

Important video parameters are: Format to be H264 , framerate is also important ( i choose 15 or 25 ) , input video size should ALWAYS be greater or at least equal to the output video size.

For audio encoding . This is a little bit tricky . Adobe FMLE does not support AAC encoding by itself . You will need a special plugin for that.

And if you will target Iphone / Ipad and other mobile devices you will also need this settings:

Adobe FMLE settings part 2

Adobe FMLE settings part 2

 

 

 

Linux kernel 3.0 is near

Monday May 30thUncategorized Category 3,555

Linux Torvalds, has signed off the release candidate version as Linux 3.0 RC1.
What is new in it ?

  • New Microsoft Kinect driver
  • updated graphics drivers
  • cleancache support
  • optimizations for Intel and AMD processors

But mainly this new numbering will force companies to keep their products close to the latest kernels. Right now there are many companies that trumpet they support 2.6 kernel and in fact they are supporting the old 2.6.26 or worse version.

Also this move celebrates Linux entering in it’s third decade of life.

Well . I can say that i’m slightly older than linux . But not with much.

 

Svn aborted commits remains in conflict

Friday May 28thUncategorized Category 3,556

I use svn on daily basis. everything was ok until today when a new this kind of error popped up :


root@tfm33: /Space/server/_wks/trunk# svn commit
svn: Commit failed (details follow):
svn: Aborting commit: '/Space/server/_wks/trunk/libmp3lame' remains in conflict

An no matter what i tried it stayed in conflict. doing some google-ing i found out that the fix is quite simple:


svn resolved /Space/server/_wks/trunk/libmp3lame

Linux Kernel where is going

Thursday April 15thUncategorized Category 3,556

At Linux Foundation Collaboration Summit 14 April 2010 it was a very interesting session on Q and A about linux kernel. Here are the main ideas discussed:

1) Documentation (lack of) – The documentation itself should be inside the kernel itself.

2) Need for new blood . Some of the original developers are getting old.

3) Keeping Independent thinkers is very important.

4) Fixing scheduler is around the corner. RTT will be merged into kernel.

5) Android is forking a part of kernel. There will be tries to merge codes between Google and Linux Kernel.

6) A person ( or persons ) are needed to reduce the kernel bloat ( kernel foot print )

Upgrading HP c7000 blades

Thursday February 18thUncategorized Category 3,556

It comes a time when you need to update the ILO firmware / bios rom / OA firmware on a C7000 enclosure.

Best way to do this is like this:

  • Download OA firmware, ILO firmware and rombios ISO image .
  • From the web interface update ILO firmware.
  • Create an ILO user and enable ssh .
  • Activate ILO advanced license
  • Open a terminal and ssh to ilo
  • issue the following command from ilo command line:
vm cdrom insert http://192.168.1.1/ROMPAQINTEL.iso

vm cdrom connect
power on

  • From web browser open an ilo remote console to server and power it off.
  • After the server gracefully powers off issue a “power on” command from ILO
  • Switch to remote console and complete the update
  • After update is complete issue the following commands from ILO

power off
vm cdrom eject
power on

Enjoy updating.

Adventures with Cisco 7945 Phone

Friday December 18thUncategorized Category 3,555

I recently got a Cisco 7945 Phone to play with.
1) I got it out the box , i connected it to my LAN and plugged in the power.
2) The phone started to send requests to my DHCP server . However it never stopped doing that.
Dec 17 21:54:11 localhost dhcpd: DHCPREQUEST for 172.17.1.13 from 00:1f:ca:ea:11:73 (SEP001FCAEA1173) via eth1
Dec 17 21:54:11 localhost dhcpd: DHCPACK on 172.17.1.13 to 00:1f:ca:ea:11:73 (SEP001FCAEA1173) via eth1
Dec 17 21:54:14 localhost dhcpd: DHCPRELEASE of 172.17.1.13 from 00:1f:ca:ea:11:73 (SEP001FCAEA1173) via eth1 (found)

3) A quick search on the net on how to set this phone up ( in the box I found no documentation so i guess google il my friend tonight ) revealed that i need to set up a tftp server to serve a software for the phone.  But to get the software i will need a Cisco account.

Great ( NOT ) … In order to download from Cisco you will need: “Have a valid Technical Support Services Agreement”

Now i have to wait a bit until my friend who has the account will download it for me. Time to get something to eat. This is going to be a loooooooong night.

Got the file. One big zip unpacked in tftp directory. Created a file named: XMLDefault.cnf.xml

4) got the files. DHCP server updated …

class "cisco7945"
{
match if substring (option vendor-class-identifier,0,32) = "Cisco Systems, Inc. IP Phone CP-";    #<----Matches first 32 characters
option tftp-server-name "172.17.0.1";
}

5) Press # while plugin the power and then “123456789*0#” to enter the upgrade sequence.

6) At this point the phone will request from tftp a file named : term45.default.loads

7) The phone is quite bricked. Requesting something via UPNP and there you go … another brick in the wall.

8) After 1 day of intense internet  searching  i found out that SIP45.8-5-2S was the the one firmware to go with. Worked like a charm.The firmware loaded as expected so the phone is now SIP.

9) Time to make it talk to yate. This is much more difficult than i expected. I have a small yate instalation here and usually i’m connecting to it with Xten clients .I added a number and a password for cisco phone ( from freesentral ) but at this point i’m stuck at registering. It doesn’t wat to register to yate.

I guess it will be at least another day of searching.

DRBD is finally in kernel

Monday December 14thUncategorized Category 3,556

DRBD refers to block devices designed as a building block to form high availability (HA) clusters. This is done by mirroring a whole block device via an assigned network. DRBD can be understood as network based raid-1.
Today i happily found that DRBD was added to the upcoming linux kernel 2.6.33. Until now TFM could support DRBD but sometimes it got obsolete or we had lots of compilation problems because we are keeping up to date to kernel tree and DRBD was a little slow when big changes appeared in kernel.
In the next few days we will prepare and add to TFM some ready to use examples regarding DRBD.
Ralink’s RT2860 drivers and support for RT3090 PCI Wi-Fi chips were also added to the kernel. As usual around Christmas there are a lot of developments in Linux World.

Bonding in tfm

Friday November 27thUncategorized Category 3,556

Finally we added support for ip bonding in tfm. How a config will look like?

In  /etc/sysconfig/network-devices directory  create a directory named ifconfig.bond0 with the following content:

ONBOOT=yes
ONHOPLUG=yes
SERVICE=ipv4-bonding
IP=192.168.1.1
PREFIX=24
BROADCAST=192.168.1.255
CHECK_LINK=no
BONDING_SLAVES="eth1 eth2"
BONDING_MODE=4
BONDING_MII_DELAY=100