How to use ffprobe to obtain certain information about mp4/h.264 files
If you only want the information from the first video stream use -select_streams v:0:

ffprobe -v error -select_streams v:0 -show_entries stream=width,height,duration,bit_rate -of default=noprint_wrappers=1 input.mp4


Example output:

width=640
height=480
duration=10.000000
bit_rate=942704



To see a list all entries use -show_streams and/or -show_format instead of -show_entries.
See FFprobe Documentation: Writers for various output formatting styles.
See FFmpeg Wiki: FFprobe for more examples.