Edge Usage Guide

After the container has started and the models are optimized, you can interact with the running container to execute the pipeline using docker exec.

Usage

After the container has started and the models are optimized, you can interact with the running container to execute the pipeline using docker exec.

Processing a Single Video File

You can redact a single video file by executing the following command:

docker exec -it <docker_container_id> redact \
    -i <video_path> \
    -o <output_path> \
    --input-type video \
    --output-type video \
    -s <redaction_service> \
    --pii-type <pii_type>

Explanation of Parameters:

  • <docker_container_id>: This is the ID or name of the running Docker container. You can find the container ID by running docker ps.

  • <video_path>: The path to the input video file that you want to process. This path must be within the mounted /input directory inside the container.

  • <output_path>: The path to where the output video file will be saved. This path must be within the mounted /output directory inside the container.

Processing a Folder of Videos

In addition to processing individual video files, you can also process an entire folder of videos by executing the following command as shortcut "redact" for single files and "redact_folder" for batch processing inside a directory:

docker exec -it <docker_container_id> redact-folder \
...

Explanation of Parameters:

  • <docker_container_id>: This is the ID or name of the running Docker container. You can get the container ID by running docker ps.

  • <input_video_folder>: The input folder containing the videos you want to process. This folder must be mounted within the container and should point to the location where your input videos are stored.

  • <output_folder>: The output folder where the processed videos will be saved. This folder must also be mounted within the container, and the processed files will be saved there.

Processing an RTSP stream

In addition to processing individual video files or directories,
you can also process RTSP streams by running the following command inside the container.

Keep in mind you have to add to the docker run command one line with the RTSP address, after that you can execute as usual.

-p 8555:8555
docker exec -it <container_id> redact \
  -i [rtsp_input_adress] \
  -o [rtsp_output_adress] \
  --input-type rtsp \
  --output-type rtsp \
  -s blur \
  --pii-type face

Explanation of Parameters:

  • <docker_container_id>: The ID or name of the running Docker container.
    You can retrieve it by running docker ps command.

  • <rtsp_input_address>: The address of the RTSP stream to be processed.
    Ensure that this stream is accessible from within the container.

  • <rtsp_output_address>: The address of the anonymized RTSP output stream.
    This address should point to the host machine on which the container is running,
    and its port should be exposed and accessible outside the container.

Example Usage:

If your input RTSP stream is available at:
rtsp://1.2.3.4:8554/input_stream or rtsp://some_server.net:8554/input_stream

And you want to make the anonymized RTSP output stream available at:
rtsp://0.0.0.0:8555/output_stream or rtsp://host_machine.net:8555/output_stream

You would run the following command:

docker exec -it <container_id> redact \
  -i rtsp://172.17.0.1:8554/input \
  -o rtsp://0.0.0.0:8555/output \
  --input-type rtsp \
  --output-type rtsp \
  -s blur \
  --pii-type face

In this example, the container can connect to the input stream,
and the anonymized stream will be available to anyone who can connect to the host machine.

Troubleshooting

If you encounter issues with Redact-Edge, you can enable detailed debugging information to diagnose the problem.
To get more information, run with the GST_DEBUG environment variable set. This will provide verbose logs, which can help you identify issues with elements, linking, and configuration.

Run the script with GST_DEBUG set to a higher level and send them to us:

Example:

docker exec -it \
   -e GST_DEBUG=5 \
   -e GST_DEBUG_FILE=/tmp/[file_name] \
   [container_ID] redact \
   -i /input/[test_file] \
   -o /output/[test_file] \
   --input-type video \
   --output-type video \
   -s blur \
   --pii-type face

GST_DEBUG=3 sets the debug level to capture warnings, errors, and detailed messages. You can increase this to 4 or 5 for even more granular information.