First non-technical post – Nothing Special

February 9, 2010 Safiqul Islam Leave a comment

Just thought about writing a non-technical post but couldn’t find anything special to write. With extreme pressures and workloads, I am living a despondent life and hoping for good days to come again in life. I am going to overlook my second valentine’s day, as you know; Valentine ’s day is just another ordinary day for researchers :( .

Categories: Non-Technical

Configuring windows xp client for 802.1x authentication support for EAP-MD5

November 4, 2009 Safiqul Islam Leave a comment
In order to use windows X client of windows XP to test the 802.1x port based authentication:   go to network connection and right click on local area connection and select properties.
selection_802
Select the Authentication tab:
auth-tab
And then enable “802.1X authentication for the network” and select the eap method that you want to use. In my case, I have used  “MD5 challenge” but you can select according to your requirements. And then select “authenticate as computer when computer information is available”. And then select OK to apply the rules.
conf-aut-802

Fragmented MP4 File Format

November 4, 2009 Safiqul Islam Leave a comment

As I have already mentioned in one of  my previous posts about MP4 file format with MOOV box and media data box. Each terminology is represented by “box” in MP4 file format. As microsoft used fragmented MP4 in their smooth streaming technique where fragments are internally organized in a simple contiguous MP4 file.  Each fragment section consists of two parts: Movie Fragment (moof) and media data (mdat). Moof section carry more accurate fragment level metadata and media is contained in the mdat section.

We have used MP4split to generate the fmp4 file.  There is another opensource tool MP4 explorer from cmstream that is used to analyze the header information of a MP4 file. Below you can see a snapshot that shows the fragments information of my encoded mp4 file. Chunks information are delivered to the client through client manifest file (*.ismc).

mp4explorer

If you are really interested to see what is in the client manifest file you can look into the following link :

http://mithunme.wordpress.com/2009/11/04/information-in-the-ismc-and-ism-file/

Information in the *.ismc and *.ism file

November 4, 2009 Safiqul Islam Leave a comment

Here is the information in the *.ism server manifest file after using the mp4split:

<?xml version=”1.0″ encoding=”utf-8″?>
<!–Created with mod_smooth_streaming(version=1.0.2)–>
<smil xmlns=”http://www.w3.org/2001/SMIL20/Language”>
<head>
<meta name=”clientManifestRelativePath” content=”manifest” />
</head>
<body>
<switch>
<video src=”video.ismv” systemBitrate=”490000″>
<param name=”trackID” value=”1″ valueType=”data” />
</video>
<audio src=”video.ismv” systemBitrate=”76000″>
<param name=”trackID” value=”2″ valueType=”data” />
</audio>
</switch>
</body>
</smil>

Here is the information in the *.ismc client manifest file after using the mp4split to generate the file:

<?xml version=”1.0″ encoding=”utf-8″?>
<!–Created with mod_smooth_streaming(version=1.0.2)–>
<SmoothStreamingMedia MajorVersion=”1″ MinorVersion=”0″ Duration=”3208550000″>
<StreamIndex Type=”video” Subtype=”H264″ Chunks=”55″ Url=”QualityLevels({bitrate})/Fragments(video={start time})”>
<QualityLevel Bitrate=”490000″ FourCC=”H264″ Width=”208″ Height=”132″ CodecPrivateData=”0000000167640014AC34E60D13F9F01100000300C80000176A8F14291A0000000168EEB2C8B0″ />
<c n=”0″ d=”58058058″ />
<c n=”1″ d=”21354688″ />
<c n=”2″ d=”35368702″ />
<c n=”3″ d=”93426760″ />
<c n=”4″ d=”47380714″ />
<c n=”5″ d=”40707374″ />
<c n=”6″ d=”24024024″ />
<c n=”7″ d=”72739406″ />
<c n=”8″ d=”52052052″ />
<c n=”9″ d=”38038038″ />
<c n=”10″ d=”52052052″ />
<c n=”11″ d=”32699366″ />
<c n=”12″ d=”82082082″ />
<c n=”13″ d=”41374708″ />
<c n=”14″ d=”38038038″ />
<c n=”15″ d=”69402736″ />
<c n=”16″ d=”49382716″ />
<c n=”17″ d=”36703370″ />
<c n=”18″ d=”24691358″ />
<c n=”19″ d=”40040040″ />
<c n=”20″ d=”46046046″ />
<c n=”21″ d=”42042043″ />
<c n=”22″ d=”39372706″ />
<c n=”23″ d=”18685352″ />
<c n=”24″ d=”38705372″ />
<c n=”25″ d=”50050050″ />
<c n=”26″ d=”65398732″ />
<c n=”27″ d=”40707374″ />
<c n=”28″ d=”45378712″ />
<c n=”29″ d=”67400734″ />
<c n=”30″ d=”106106106″ />
<c n=”31″ d=”16683350″ />
<c n=”32″ d=”32032032″ />
<c n=”33″ d=”31364698″ />
<c n=”34″ d=”166833500″ />
<c n=”35″ d=”87420754″ />
<c n=”36″ d=”32699366″ />
<c n=”37″ d=”82082082″ />
<c n=”38″ d=”57390725″ />
<c n=”39″ d=”28695362″ />
<c n=”40″ d=”26693360″ />
<c n=”41″ d=”33366700″ />
<c n=”42″ d=”32699366″ />
<c n=”43″ d=”70070070″ />
<c n=”44″ d=”124791458″ />
<c n=”45″ d=”27360694″ />
<c n=”46″ d=”59392726″ />
<c n=”47″ d=”64064064″ />
<c n=”48″ d=”27360694″ />
<c n=”49″ d=”166833500″ />
<c n=”50″ d=”22022022″ />
<c n=”51″ d=”166833500″ />
<c n=”52″ d=”166833501″ />
<c n=”53″ d=”71404738″ />
<c n=”54″ d=”104104104″ />
</StreamIndex>
<StreamIndex Type=”audio” Subtype=”mp4a” Chunks=”55″ Url=”QualityLevels({bitrate})/Fragments(audio={start time})”>
<QualityLevel Bitrate=”76000″ FourCC=”mp4a” WaveFormatEx=”FF00010044AC0000E02E00000100100002001208″ />
<c n=”0″ d=”58282086″ />
<c n=”1″ d=”21362358″ />
<c n=”2″ d=”35294331″ />
<c n=”3″ d=”93344218″ />
<c n=”4″ d=”47368707″ />
<c n=”5″ d=”40867120″ />
<c n=”6″ d=”23916554″ />
<c n=”7″ d=”72678458″ />
<c n=”8″ d=”52012698″ />
<c n=”9″ d=”38080726″ />
<c n=”10″ d=”52012698″ />
<c n=”11″ d=”32740136″ />
<c n=”12″ d=”82198640″ />
<c n=”13″ d=”41331519″ />
<c n=”14″ d=”38080726″ />
<c n=”15″ d=”69427664″ />
<c n=”16″ d=”49226304″ />
<c n=”17″ d=”36687528″ />
<c n=”18″ d=”24845352″ />
<c n=”19″ d=”39938322″ />
<c n=”20″ d=”45975510″ />
<c n=”21″ d=”42260317″ />
<c n=”22″ d=”39241724″ />
<c n=”23″ d=”18808163″ />
<c n=”24″ d=”38545125″ />
<c n=”25″ d=”50155102″ />
<c n=”26″ d=”65248072″ />
<c n=”27″ d=”40867120″ />
<c n=”28″ d=”45278912″ />
<c n=”29″ d=”67337868″ />
<c n=”30″ d=”106115193″ />
<c n=”31″ d=”16718368″ />
<c n=”32″ d=”32043537″ />
<c n=”33″ d=”31346939″ />
<c n=”34″ d=”166951474″ />
<c n=”35″ d=”87307029″ />
<c n=”36″ d=”32740136″ />
<c n=”37″ d=”82198640″ />
<c n=”38″ d=”57353288″ />
<c n=”39″ d=”28560544″ />
<c n=”40″ d=”26702948″ />
<c n=”41″ d=”33436734″ />
<c n=”42″ d=”32740136″ />
<c n=”43″ d=”70124263″ />
<c n=”44″ d=”124691157″ />
<c n=”45″ d=”27399546″ />
<c n=”46″ d=”59443084″ />
<c n=”47″ d=”64087075″ />
<c n=”48″ d=”27167347″ />
<c n=”49″ d=”166951474″ />
<c n=”50″ d=”22058957″ />
<c n=”51″ d=”166719274″ />
<c n=”52″ d=”166951474″ />
<c n=”53″ d=”71285261″ />
<c n=”54″ d=”102864399″ />
</StreamIndex>
</SmoothStreamingMedia>

How to create a fragmented MP4 file for streaming

November 4, 2009 Safiqul Islam Leave a comment

Microsoft smooth streaming used the fragmented MP4 file for streaming.In fragmented mp4 file, each file is internally fragmented into several chunks. Each chunk is known as an MPEG-4 movie fragment. Each fragment is stored within a contiguous MP4 file. File chunks are created virtually upon a client request. However, the actual video is stored on disk as a full length MP4 file. For each bit rate, one MP4 file is created.

The following file format is used by Microsoft in their smooth streaming approach:

smooth streaming media asset consists of the following files:

  • MP4 files- In order to differentiate from the traditional MP4 files , IIS streaming uses two new file extensions “*.isma” and “*.ismv”. A file with the first extension contains only audio; while a file with the other extension contains either video and audio or only video.
  • Server manifest file (*.ism) This file describes the relationship between the media tracks, bitrates, and files on disk.
  • Client Manifest file (*.ismc) This file describes the availability of streams to the client.It also describes what CODECs are used, encoded bit rates, video resolution, and other information.

I have used an opensource tool  “MP4Split” developed by code-shop.com to create this manifest files and fragmented mp4 in *.ismv format.

Installing mp4split in ubuntu :

wget http://smoothstreaming.code-shop.com/download/mp4split-1.0.2.tar.gz
tar -zxvf mp4split-1.0.2.tar.gz

cd ~/mp4split-1.0.2
./configure –with-expat
make
sudo make install

Generating a server manifest file :

mp4split – i input.mp4 -o output.ism

Generating a client manifest file :

mp4split – i input.mp4 -o output.ismc

Generating a fragmented output :

mp4split – i input.mp4 -o output.ismv

Encoding a video in H264 format and use MP4 as container

November 4, 2009 Safiqul Islam Leave a comment

I have used ffmpeg to encode the input video into H264 format and finally used MP4 as container. The following command line I have used for encoding.

#!/bin/bash
outfile=”video.mp4″
options=”-vcodec libx264 -b 512k -flags +loop+mv4 -cmp 256 \
-partitions +parti4×4+parti8×8+partp4×4+partp8×8+partb8×8 \
-me_method hex -subq 7 -trellis 1 -refs 5 -bf 3 \
-flags2 +bpyramid+wpred+mixed_refs+dct8×8 -coder 1 -me_range 16 \
-g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -qmin 10\
-qmax 51 -qdiff 4″

ffmpeg -y -i “$1″ -an -pass 1 -threads 2 $options “$outfile”

ffmpeg -y -i “$1″ -acodec libfaac -ar 44100 -ab 96k -pass 2 -threads 2 $options “$outfile”

Categories: Streaming Tags: , , ,

Streaming MP4 via HTTP

November 4, 2009 Safiqul Islam Leave a comment

Microsoft introduced “Smooth Streaming”  that provides seamless bit rate switching of video by dynamically detecting the network conditions. In order to deliver the media, they have used MP4 container. Normally, a MP4 file format contains a header and media data where the header contains the metadata information. In order to use it for streaming the header information should be placed in the beginning. But, the traditional MP4 file has the header information at the last. The diagram below shows the traditional file MP4 file format.

MP4_trad

To move the header file in the beginning we have used qt-faststart that can be found in : /ffmpeg/tools/qt-faststart

qt-faststart input.mp4 output.mp4

The format of output.mp4 will be as following:

MP4



Free Radius Configuration with EAP-MD5 Authentication and MySQL for Accounting and Authorization : in Ubuntu

October 18, 2009 Safiqul Islam Leave a comment

Freeradius is most widely used radius server in the world. Freeradius server is fast, rich-feature, modular and scalable. It supplies the AAA ( Authentication, Authorization and Accounting) needs. I have configured freeradius with MYSQL for the part of my project work. Here, I am sharing the information, how you can configure easily freeradius with EAP-MD5 support and I have used HP2524 switch as my authenticator.

Installation:

To install freeradius and freeradius with mysql, use the following command:

 # apt-get install freeradius
 # apt-get install freeradius-mysql

Configuration:

In oder to configure freeradius for EAP-MD5 , in the /etc/freeradius/radiusd.conf file the authorized section must have eap :

authorize {
   preprocess
   files
   eap
}

In the authenticate section must have eap uncommented:

authenticate {
 eap
}

Finally, the EAP module under /etc/eap.conf has to be configured this way to support eap-md5:


eap {
   md5 {
   }
}

In order to use SQL for accounting purpose /etc/freeradius/radiusd.conf must have

$INCLUDE  ${confdir}/sql.conf

and sql.conf file must have the database name, server info and login credentials:
sql {
	# Database type
	# Current supported are: rlm_sql_mysql, rlm_sql_postgresql,
	# rlm_sql_iodbc, rlm_sql_oracle, rlm_sql_unixodbc, rlm_sql_freetds
	driver = "rlm_sql_mysql"

	# Connect info
	server = "localhost"
	login = "root"
	password = ""

	# Database table configuration
	radius_db = "radius"

In the authorize section, uncomment the sql :

authorise {
       preprocess
       chap
       mschap
       suffix
       eap

       files
       sql
       pap
}

Add the line 'sql' to the accounting{} section to tell FreeRADIUS to store accounting records in SQL :

accounting {
       detail
       sql
}

add ’sql’ to the post-auth{} section if you want to log all Authentication attempts to SQL.

post-auth {
 #  Get an address from the IP Pool.
#	main_pool
#	sqlippool

 #
 #  If you want to have a log of authentication replies,
 #  un-comment the following line, and the 'detail reply_log'
 #  section, above.
#	reply_log

 #
 #  After authenticating the user, do another SQL query.
 #
 #  See "Authentication Logging Queries" in sql.conf
 sql

}

In order to use switch as Authenticator in the port based authentication the clients.conf file must have the switch Information and shared secret:

#
# clients.conf - client configuration directives
#
#######################################################################

#######################################################################
#
#  Definition of a RADIUS client (usually a NAS).
client 192.168.30.5 {
	secret		        = radius123
	shortname		= hp
	nas-type		= other
}

Project Overview – OpenCase Team – CSD

August 14, 2009 Safiqul Islam Leave a comment

Here in this video, I am explaining what I have done in the communication system design project at KTH.

Categories: Uncategorized

My Speech with OpenCase Team – Communication System Design (KTH)

August 14, 2009 Safiqul Islam Leave a comment

It was my speech that describes about my project role and activities. It also reminds me about my long hair :)

Categories: Uncategorized