I am calling ffmpeg from a program and redirecting its output to stdout. From my program I read its output and send the stream to an end client. The problem I’m having is it appears ffmpeg populates the duration property in the header to 0 when it begins writing the output stream and therefore the client sees a 0 duration property. I believe in the case where ffmpeg writes its output to disk, it comes back and fills in the duration property when it's completed its transcoding. I am outputting to an asf container using wmv/a codecs. ffmpeg does write the proper asf header, it’s just that it appears to write a 0 duration property.
Can someone please confirm my assertion is in fact true and if so, is there a way to have ffmpeg write an estimated duration instead of a 0 duration in the header?
I appreciate any information you can provide.
-Chris
