Solutions

Video to Base64: Video to NATs Message Broker

2min

Overview

Document image


Running the application using the downloaded Tar File

  1. After Checkout, a tar.gz file is expected to be downloaded
  2. Log in to your LitmusEdge, Navigate to Applications -> Images
  3. Click on Upload Image and upload the tar file there
  4. Navigate back to Applications -> Containers and enter the following command there:
    1. docker run -e NAT_FPS=10 -e VIDEO_URL="<location of video>" -e DATA_IN_BYTES_OR_ARRAY=array -e PUB_TOPIC="images" <image>:<tag>
    2. Replace the <image>:<tag> with the accurate image name and tag name
    3. Replace the <location of video> with the location on ftp-date or HTTP or RTSP location. Example location of video for testing can be something like http://pendelcam.kip.uni-heidelberg.de/mjpg/video.mjpg
    4. Some other environment variables that can be changed: NAT_FPS=10 anything above 15 can affect performance heavily, depending on hardware DATA_IN_BYTES_OR_ARRAY 'byte' or 'array' PUB_TOPIC which nats topic to publish the processed output to
  5. Optionally, node-red-contrib-image-output can be installed in Flows to view the raw images as a live output (this library decodes base64 to a raw image)
    1. Use the topic used in PUB_TOPIC with .rawImage to get the image preview in flows, example in this case- images.rawImage