[FFmpeg-user] Could not write header for output file #0 (incorrect codec parameters ?):

Phil Turmel philip at turmel.org
Thu Jun 23 21:40:41 CEST 2016


On 06/23/2016 11:31 AM, juan carlos Rebate wrote:

> Does anyone know how I can do to write the header?

You've been told over and over, pointing at the error messages, that mp4
won't work for streaming.  It is *not* ffmpeg's problem.  MP4 needs
information in it's header that isn't available until *after* encoding,
which is why the encoder needs to *seek* back to the beginning of the
output file to fill it in.  That's not possible with realtime streams.
ffmpeg would need to look into the future and provide data describing
frames that haven't yet been created by your camera to satisfy you.  Let
us know when you've invented a time machine.

You've received recommendations for other formats that don't require
such a header and are therefore real-time streamable.  Pick one.


More information about the ffmpeg-user mailing list