I have a video file, and I need to encode it as H264/AVC and feed to client via HTTP. What i need is that i player at client side can play back the video as it is being encoded.
You can move the MOOV Atom to the beginning of a file by rewriting the file using a tool in ffmpeg called qt-faststart. You will need to compile it yourself from source code (but is quite easy at least in Linux / Mac OS). Just download the source of libavcodec, for example: http://libav.org/releases/libav-0.8.tar.xz
Untar it and go the tools directory, there is a file called qt-faststart.c, just build it with:
make qt-faststart
you can now reallocate MOOV Atom by calling it like this: qt-faststart input.mp4 output.mp4