Skip to main content

Processing Video Files

Shipping Container Live can be used to programmatically process video files. The time required to process a video file depends on the machine's CPU Passmark score.

Process a Single Video

To run Shipping Container Live on a video file (e.g. mp4), specify the video filename.

  1. Make sure that the video file is stored within the Shipping Container Live folder.
  2. For example, with the Shipping Container Live directory c:\container-video and the file c:\container-video\Videos\my_video.mp4
  3. Edit url parameter in configurations file:
    url = /container-video-data/Videos/my_video.mp4
  4. After editing, start or restart the docker container.
danger
  • If the configurations file is edited, the container needs to be restarted.
  • You can process a limited number of hours per month. View your current usage in the video column.

File Upload API

If you need to check a variety of video files, so that you don't have to restart the container, you can use the Shipping Container Live as webservice.

  1. Edit the camera url in your container-video-config.ini file and set:
    url = file-upload
  2. Run the container with -p 8081:80. For example:
docker run \
-t \
--name container-video \
--restart="unless-stopped" \
-p 8081:80 \
-v c:\users\kyt\documents\container-video:/container-video-data \
-e LICENSE_KEY=XXXXX \
-e TOKEN=YYYYY \
platerecognizer/container-video
  1. Upload the video. Here's an example using CURL (not using curl? try this).
curl -F "upload=@/path/to/video.avi" http://localhost:8081
  1. Calling the file upload API will not return the prediction results. The JSON response from the call contains information about usage and indicates whether the file processing was successful.

Parameters

The Upload API accepts majority of the parameters with the video upload, allowing modifications to the configurations for the video being uploaded without requiring a restart.

Examples

E.g., to adjust the sample rate for a video, simply append your curl command with a sample form field like this: curl -F "upload=@/path/to/video.avi" -F "sample=3" http://localhost:8081

What is the meaning of "Connection reset by peer"?

This error happens when Shipping Container Live is not able to communicate a response to the client (the program uploading the video). This can happen if the client crashed or was stopped while uploading or waiting for a response. It is an indication that some of the data sent may not have been received. Check if the client is using a timeout.

Floating button icon
CTRL + .