Our client sends a request to download a movie file from a server. As the server receives the request, it will start a ffmpeg process to transcode the movie. The output of ffmpeg is temporarily saved to harddisk. We dont want to make client to wait to download the file after transcoding finish, so we send output data as its generated.
The problem is that ffmpeg seem to rewrite the output file header after finish transcoding, so the downloaded file (on client side) doesnt have correct file header, and player can not play it.
My question is that there is any way to make ffmpeg not to rewrite the header? What should be the solution for this?
EDIT: the command is to transcode to H264/AAC in mp4 container