dump-klv
This program displays a subset of metadata derived from the KLV packets embedded
in a video file. The default behavior is to print the metadata to standard
output for all frames of the video. This can be restricted to a subset of
frames. The summarized metadata can be saved to a separate file in either
csv or json format, or the full interpreted contents of the KLV packets
can be saved to json (-e klv-json).
The default configuration of this tool depends on algorithm implementations in
the FFmpeg and KLV arrows which will only available
if the KWIVER_ENABLE_FFMPEG and KWIVER_ENABLE_KLV CMake flags are enabled. If
you are planning on using the tool to dump frame images, the default
configuration depends on the OpenCV so this feature will only be
available if the KWIVER_ENABLE_OPENCV CMake flag is enabled. To produce
json output the Serialize JSON is needed, so the
KWIVER_ENABLE_SERIALIZE_JSON CMake flag should be enabled.
kwiver dump-klv [options] video-file
Required arguments:
video-file- name of video file.
Options are:
-h, --helpDisplay applet usage.
-c, --config filenameProvide configuration file.
-c, --config argConfiguration file for tool.
-o, --output argDump configuration to file and exit.
-l, --log argLog metadata to a file. This requires the JSON serialization plugin. The file is structured as an array of frames where each frame contains an array of metadata packets associated with that frame. Each packet is an array of metadata fields. Alternatively, the configuration file, dump_klv.conf, can be updated to use CSV instead.
--frame-range exprFrame range to process, indexed from 1. May be a single number or two numbers separated by a hyphen, either of which may be omitted to process from the start or to the end of the video, respectively, e.g. ‘5’, ‘10-100’, or ‘64-‘.
-f, --frames extensionDump frames into the given image format.
--frames-dir pathDirectory in which to dump frames. Defaults to current directory.
-d, --detailDisplay a detailed description of the metadata.
-q, --quietDo not show metadata. Overrides -d/–detail.
-e, --exporter formatChoose the format of the exported KLV data. Current options are: csv, json, klv-json.
--multithreadUse multithreading to accelerate encoding of frame images. Number of worker threads is not configurable at this time.
--compressCompress output file. Only available for klv-json.
Default configuration
# Default configuration for core dump-klv applet
video_reader:type = ffmpeg
video_reader:vidl_ffmpeg:time_source = misp
metadata_serializer:type = csv
image_writer:type = ocv