Step 1 execute windows commande
ffmpeg.exe -i <input file> -f mpegts -acodec libmp3lame -ar 48000 -ab 64k -s 320×240 -vcodec libx264 -b 96k -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -subq 5 -trellis 1 -refs 1 -coder 0 -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 200k -maxrate 96k -bufsize 96k -rc_eq ‘blurCplx^(1-qComp)’ -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 -aspect 320:240 -g 30 -async 2 <output MPEG-TS file>

Step 2 execute windows commande
segmenter <input MPEG-TS file> <segment duration in seconds> <output MPEG-TS file prefix> <output m3u8 index file> <http prefix>
segmenter.exe demo.ts 10 demo index.m3u8 http://localhost:81/stream/

Step 3 modifier http.conf
AddType application/x-mpegURL .m3u8
AddType video/MP2T .ts

Step 4 creat a page for iphone
<html>
<head>
<title>Video Test</title>
<meta name= »viewport » content= »width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0; »/>
</head>
<body style= »background-color:#FFFFFF; « >
<center>
<video width=’150′ height=’150′ src= »index.m3u8″ />
</center>
</body>
</html>