title: Extract motion vectors from x265 (HEVC) encoded video with ffmpeg/libavcodec?
body: <p>I know that one can extract the motion vectors from an h264 encoded via by first setting the flag</p>
  
  <pre><code>av_dict_set(&amp;opts, "flags2", "+export_mvs", 0);
  </code></pre>
  
  <p>then you can query the side-data for the motion vectors by doing this</p>
  
  <pre><code>sd = av_frame_get_side_data(frame, AV_FRAME_DATA_MOTION_VECTORS);
  </code></pre>
  
  <p>When I looked online to see if you can do something similar with HEVC encoded videos, I wasn't able to find any information. All I found was this by the definition of "AV_FRAME_DATA_MOTION_VECTORS"</p>
  
  <blockquote>
    <p>Motion vectors exported by some codecs (on demand through the
    export_mvs flag set in the libavcodec AVCodecContext flags2 option).</p>
    
    <p>The data is the AVMotionVector struct defined in
    libavutil/motion_vector.h.</p>
  </blockquote>
  
  <p>but there was no information on exactly which codecs export this motion vector information. How would I go about finding this out?</p>