FFMpeg is an open source tool used for manipulating videos, that is used across the industry. There are thousands of parameters and combinations that can be used in a nearly infinite number of combinations. In this post, we'll look at ffprobe, which is a video diagnostic tool. When you run ffprobe against a video, you'll learn all the parameters of the video.
In order to simplify the use of ffprobe, we've launched ffprobe.a.video. This does not use any api.video function, but by entering a video url, you can get all the information about the video in question.
show formats
The show formats response is an overview of your video. For example, when we run the mp4 version of a video through the tool, we get the following output:
filename : https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/1080/source.mp4
nb_streams : 2
nb_programs : 0
format_name : mov,mp4,m4a,3gp,3g2,mj2
format_long_name : QuickTime / MOV
start_time : 0.000000
duration : 20.155000
size : 11300487
bit_rate : 4485432
probe_score : 100
tags : [object Object]
There are 2 streams (an audio and video), and the video is an mp4, 20 seconds long and is 11.3 MB. The bitrate of the video is 4.5 MB per second (MBPS).
When I look at this, I mostly am concerned about the duration, the size and the bitrate. A high video bitrate (and a slow internet connection) can lead to video playback issues.
Show Streams
the show streams parameter will have an entry for each stream (if there is more than one). In most videos there will be two streams,and audio and a video stream. The order of the 2 streams is not important - so while the example here is 0: video; 1: audio, your video may be in the opposite order.
Video
index : 0
codec_name : h264
codec_long_name : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
profile : High
codec_type : video
codec_time_base : 1/60
codec_tag_string : avc1
codec_tag : 0x31637661
width : 608
height : 1080
coded_width : 608
coded_height : 1088
closed_captions : 0
has_b_frames : 2
sample_aspect_ratio : 1215:1216
display_aspect_ratio : 9:16
pix_fmt : yuv420p
level : 30
chroma_location : left
refs : 1
is_avc : true
nal_length_size : 4
r_frame_rate : 30/1
avg_frame_rate : 30/1
time_base : 1/15360
start_pts : 0
start_time : 0.000000
duration_ts : 308224
duration : 20.066667
bit_rate : 4368063
bits_per_raw_sample : 8
nb_frames : 602
disposition : [object Object]
tags : [object Object]
There's a lot of data here to understand, but my highlights are:
- codec - the video encoding
- profile - has to do with the quality of the encoding
- width
- height - the video dimensions
- frame_rate - in the case above - 30 frames per second
I sometimes look at the number of b_frames (more b frames means more compression), the video bitrate - but for the most part, these are the features that interest me,
audio
codec_name : aac
codec_long_name : AAC (Advanced Audio Coding)
profile : LC
codec_type : audio
codec_time_base : 1/44100
codec_tag_string : mp4a
codec_tag : 0x6134706d
sample_fmt : fltp
sample_rate : 44100
channels : 2
channel_layout : stereo
bits_per_sample : 0
r_frame_rate : 0/0
avg_frame_rate : 0/0
time_base : 1/44100
start_pts : 0
start_time : 0.000000
duration_ts : 887777
duration : 20.130998
bit_rate : 127551
max_bit_rate : 128000
nb_frames : 868
disposition : [object Object]
tags : [object Object]
My interests in the audio section: Is there an audio stream? Even the presence of an empty stream adds weight to the video. If the video is going to be a silent video (website background, animated GIF replacement), you might want to consider removing the audio stream.
I generally look at the sample_rate and bit_rate - what is the audio quality? Do we need it to be higher or lower?
Conclusion
Ffprobe is a quick tool that can be used to look at the metadata of a video. ffprobe.a.video is a simple tool to quickly obtain this data from videos already posted on the internet. You can start building right now with a free sandbox account.
Follow our latest news by subscribing to our newsletter
Create your free account
Start building with video now