Saving Video Streams
Input video packets (received either from network or file system) can be captured and saved to Kafka. The incoming videos are first processed by the Video Capture and then the MGR reads the Video Capture output topics as input.
This is a supporting feature which can be run together with any demos and can be useful for saving live video for later processing as well as for running multiple analyses on the same video stream.
Prerequisites
Before continuing with the tutorial, ensure the following:
- UVAP is installed as instructed in Setting Up UVAP
Capturing video streams in base mode
Base mode is already prepared for saving incoming video packets using video capture microservice.
To enable the feature, simply configure the UVAP in base
mode with the addditional
--video-processing-mode vc
parameter following the instructions in Configuring UVAP for Base Demo Mode
The MGR will be also be configured to read and process the output kafka topics of Video Capture.
- Start video capture:
"$UVAP_HOME"/scripts/run_vc.sh -- --net=uvap
- Restart MGR:
docker restart uvap_mgr
Capturing video streams in fve or skeleton mode
For saving video packets in fve
or skeleton
mode, the Video Capture and the MGR configuration has to be updated with the apropriate input streams / topics.
For configuring the Video Capture microservice, simply configure the UVAP in the required mode with the additional
--video-processing-mode vc
parameter.
For further processing of the captured video packets by MGR, the file_name
input field of MGR configuration has to be updated with the output topic created by Video Capture with the additional kafka:
prefix.
Example:
input
{
file_name: "kafka:base.cam.0.vc.Packet.upw"
For further description of MGR and Video Capture configuration fields please refer to Configuring Multi-Graph Runner and Configuring Video Capture.