Probe Video Settings

The tcprobe utility included with transcode provides an easy way to get specifications on a video using the command line.

As you begin to experiment with converting videos from one format to another you will find yourself searching for more detailed information about the video than simply whether it ends in .mpg or .avi. For instance, my portable media player is capable of playing a few different video formats up to a certain resolution, so before I copy videos to it, it helps to probe them beforehand to make sure they meet its specifications. Also to do video conversion you often need information such as resolution, video and audio bitrate, codec used, and so forth. There are a number of ways to retrieve this information on Linux. One way is to simply open up the video in your favorite GUI video player and check the file properties. Another is to play the video in mplayer and dig through the verbose output it creates for clues. Probably the fastest and easiest way however is to use the tcprobe utility included with the transcode suite of tools.

Information about the installation and use of transcode is covered in [Hack #63] . Once transcode is installed, it includes a number of useful tools that it uses when processing video, including tcprobe. tcprobe is pretty simple to use. The following command gives you general information about a video file named sample.mpg:

	$ tcprobe -i sample.mpg [tcprobe] MPEG program stream (PS) [tcprobe] summary for sample.mpg, (*) ...

Get Linux Multimedia Hacks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.