How to create a fragmented MP4 file for streaming
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.gzcd ~/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
Web casting, or broadcasting over the internet, is a media file (audio-video mostly) distributed over the internet using streaming media technology. Streaming implies media played as a continuous stream and received real time by the browser (end user). Streaming technology enables a single content source to be distributed to many simultaneous viewers. Streaming video bandwidth is typically calculated in gigabytes of data transferred. It is important to estimate how many viewers you can reach, for example in a live webcast, given your bandwidth constraints or conversely, if you are expecting a certain audience size, what bandwidth resources you need to deploy.