How can I get the resolution (width and height) for a video file from a linux command line?
Use ffprobe (part of FFmpeg toolkit) example: ffprobe -v quiet -print_format json -show_format -show_streams ~/Movies/big_buck_bunny_720p_5mb.mp4 output: { “streams”: [ { “index”: 0, “codec_name”: “h264”, “codec_long_name”: “H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10”, “profile”: “Main”, “codec_type”: “video”, “codec_time_base”: “1/50”, “codec_tag_string”: “avc1”, “codec_tag”: “0x31637661”, “width”: 1280, “height”: 720, “coded_width”: 1280, “coded_height”: 720, “has_b_frames”: 0, … Read more