title: How to set header metadata to encoded video?
body: <p>I'm encoding some images into an h264 video inside an mp4 container. I'm essentially using the ffmpeg example muxing.c. The thing is I'm trying to set some metadata in the mp4 container such as artist, title, etc...</p>
  
  <p>I thought using the following would work but it didn't:</p>
  
  <pre><code>AVDictionary *opts = NULL;
  av_dict_set(&amp;opts, "title", "Super Lucky Dude", 0);
  av_dict_set(&amp;opts, "author", "Jacky Chan", 0);
  av_dict_set(&amp;opts, "album", "Chinese Movie", 0);
  av_dict_set(&amp;opts, "year", "05/10/2013", 0);
  av_dict_set(&amp;opts, "comment", "This video was created using example app.", 0);
  av_dict_set(&amp;opts, "genre", "Action", 0);
  
  // Write the stream header, if any.
  ret = avformat_write_header(oc, &amp;opts);
  </code></pre>
  
  <p>After the whole video is created I don't see any metadata written to the video file. Any pointers how to actually do this properly?</p>