Suppose you have a video file (maybe you just decrypted your DVD) and you want to discover the container format, the codecs, and the PID (program ID) of various streams in the video.


ffmpeg -if my-dvd.mpeg4 Take note of the final lines, especially those beginngin with Stream. The PIDs are listed in square brackets.
Input #0, mpeg, from 'mr.mpg':
  Duration: 00:21:28.37, start: 0.280633, bitrate: 7497 kb/s
    Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x480 [PAR 8:9 DAR 4:3], 9801 kb/s, 25.18 fps, 59.94 tbr, 90k tbn, 59.94 tbc
    Stream #0.1[0x80]: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s


dvbsnoop -if my-dvd.mpeg4 | grep "MPEG4_video_descriptor"