title: How to find resolution and framerate values in H.264 MPEG-2 TS?
body: <p>I'm working on a MPEG-2 TS video containing a H.264 stream, and I'm looking for video properties stored in the stream, by scanning PAT, PMT, PES, etc.</p>
  
  <p>I'm able to read PAT, PMT, and elementary streams type and PID. Here I would like to find the resolution and the framerate (fps). Are they located in the PES header, or elsewhere? They are not in PAT or PMT.</p>
  
  <p>Below, <em>Transport Stream Packet Editor</em> is able to find two different informations, one itself and the other from the Haali Media Decoder helper codec. How to get the first one:</p>
  
  <p><img src="https://i.stack.imgur.com/XMLg0.png" alt="enter image description here"></p>
  
  <p>Pseudo-code is welcomed.</p>