title: How to use ffmpeg faststart flag programmatically?
body: <p>I try to convert videos for playback on Android using H264, AAC codecs and mp4 container. Video plays normaly with non-system  players. But system player shows error "Can't play this video".
  I found out that the problem is in moov atom, which is writed in the end of the file.
  When I use "-movflags +faststart" ffmeg flag to convert video, it plays normal, but when I try to do that programmatically, it gives no result. I use following code:</p>
  
  <pre><code>av_dict_set( &amp;dict, "movflags", "faststart", 0 );
  ret = avformat_write_header( ofmt_ctx, &amp;dict );
  </code></pre>