It is more complex than that. It splits on key frames only, and this means that if the media file's keyframe interval isn't aligned with that 10 second target chunk size you end up (as I did for my test) with chunks of differing sizes:
So I think you'd need to sort of abstract all that within the streaming server. Take a look at Wowza if you have time. The eval license is free. Content that's in an on demand folder isn't chunked, but the server obviously parses the media file at the time it's requested and figures it all out. Clearly a significant endeavour, but to my knowledge no other server is able to stream remuxed h264 to iOS devices (and there are lots of them).
- Code:
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXTINF:12,
http://192.168.1.69/moon1-1.ts
#EXTINF:10,
http://192.168.1.69/moon1-2.ts
#EXTINF:11,
http://192.168.1.69/moon1-3.ts
#EXTINF:10,
http://192.168.1.69/moon1-4.ts
#EXTINF:12,
http://192.168.1.69/moon1-5.ts
#EXTINF:11,
http://192.168.1.69/moon1-6.ts
#EXTINF:12,
http://192.168.1.69/moon1-7.ts
#EXTINF:10,
http://192.168.1.69/moon1-8.ts
#EXTINF:10,
http://192.168.1.69/moon1-9.ts
#EXTINF:10,
http://192.168.1.69/moon1-10.ts
#EXTINF:13,
http://192.168.1.69/moon1-11.ts
#EXTINF:7,
http://192.168.1.69/moon1-12.ts
In other testing, it seems that in Apple's eyes at least, MPEG-4 ASP is not a legal video codec for the mpegts container.
It should be - the resulting file does play in VLC.
It is possible to convert DivX/Xvid AVI files to mp4 pretty quickly without touching the video, though not on the fly because you can't live stream mp4. I had hoped the iPad would play mp3 audio in mp4 video files, meaning a simple remux would be all that was needed - but sadly it really does need to be aac audio

Once they're remuxed to mp4 and audio transcoded with the following command line, they're playable from within the Media Link Player Lite DLNA client:
C:\Temp>ffmpeg -i "g:\video\Trailers and samples\testclip.avi" -vcodec copy -acodec libfaac -aq 85 -ac 2 "g:\video\Trailers and samples\testclip.mp4"
You can get the Win32 binary of the latest git version of FFmpeg compiled with libfaac support, and libfaac.dll from:
http://oss.netfarm.it/mplayer-win32.php