title: How to determine video codec of a file with FFmpeg
body: <p>I often have problems reading AVI files with my TV's DVD player if they are not DivX or Xvid (e.g., DX50 is not readable).</p>
  
  <p>I'd like to make a fast script to determine the video codec of these files before burning them to CD-ROM or DVD.</p>
  
  <p>The command</p>
  
  <pre><code>ffmpeg -i file.avi
  </code></pre>
  
  <p>prints the "container" of the video stream (mpeg4, mpeg2, etc), not the codec.</p>
  
  <p>Any hint?</p>
  
  <p>Thanks</p>