Check out using ffprobe
instead of ffmpeg
. It doesn't try to play
the video and you can pick an output format that suits you.
$ ffprobe -i http://bennugd-vlc.googlecode.com/files/sintel_trailer-48
+0p.mp4 -show_streams -print_format csv 2>/dev/null
stream,0,h264,H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10,video,1/48,avc
stream,1,aac,Advanced Audio Coding,audio,1/48000,mp4a,0x6134706d,s16,4