title: Read SEI data from a HEVC video with FFmpeg
body: <p>I’ve been trying to create some HEVC videos programmatically using FFmpeg C++ libraries and x265 encoder, using  <a href="http://x265.readthedocs.org/en/default/cli.html#cmdoption--master-display" rel="nofollow"><code>--master-display</code></a>, <a href="http://x265.readthedocs.org/en/default/cli.html#cmdoption--max-cll" rel="nofollow"><code>--max-cll</code></a> and other SEI data options from x265.  Now, to make sure this information is being written correctly I’ll like to know how I can read back this SEI data from the generated video file, preferably using the FFmpeg C++ library and functions.</p>
  
  <p>I have implemented a video decoder which works using <code>av_read_frame()</code> and decoding frames from each <code>AVPacket</code> obtained. I’m not sure if somehow I can get SEI information before this process, from these packets or with a similar approach.</p>