Chuyện của sys

DevOps Blog

Using FFprobe to analyze a Video November 28, 2013

FFprobe is a simple multimedia streams analyzer with a command-line interface based on the FFmpeg project libraries.
It may be used to print informations about the format and header of a multimedia file or stream, the multimedia streams and each single packet or frame.
FFprobe may be used both as a standalone application or in combination with a textual filter, which is supposed to perform more sophisticated elaboration (e.g. statistics elaboration or plotting).
OPTIONS
Main options
-h Show help and exit.
-version
Show version and exit.
-L Show license and exit.
-formats
Show available formats, codecs, protocols, …
-pretty
Show every single value using an adequate unit of measure and using
more eye-ball parsable prefixes.
-k Keep going even in case of error, always returns 0.
-read_packets
Read packets info.
-read_frames
Read frames info.
-show_files
Show file info, that is the informations relative to the container.
-show_frames
Show frames info, implies the option -read_frames and
-read_packets.
-show_streams
Show streams info, that is the informations relative to the
monomedia streams contained in the header.
-show_tags
Show tags info: actually are supported only the track, title,
author, copyright, comment, album, year, and genre tags.
-v number
Set the logging verbosity level.
Example:
nhanpt-rad@nhanptrad-G31T-M7:~$ ffprobe -show_streams Nhan.avi
avprobe version 0.8.8-4:0.8.8-0ubuntu0.12.04.1, Copyright (c) 2007-2013 the Libav developers
built on Oct 22 2013 12:35:42 with gcc 4.6.3
Input #0, avi, from ‘Nhan.avi’:
Duration: 00:00:26.75, start: 0.000000, bitrate: 2322 kb/s
Stream #0.0: Video: mjpeg, yuvj422p, 640×480, 13.04 tbr, 13.04 tbn, 13.04 tbc
[STREAM]
index=0
codec_name=mjpeg
codec_long_name=MJPEG (Motion JPEG)
codec_type=video
codec_time_base=250/3261
codec_tag_string=MJPG
codec_tag=0x47504a4d
width=640
height=480
has_b_frames=0
pix_fmt=yuvj422p
level=-99
r_frame_rate=3261/250
avg_frame_rate=0/0
time_base=250/3261
start_time=0.000000
duration=26.755596
nb_frames=349
[/STREAM]

No Comments on Using FFprobe to analyze a Video
Categories: Uncategorized