Exercise - Upload a sample video to your edge device
Perform the following steps in Azure Cloud Shell.
Upload the video to your edge device
Open Cloud Shell.
Run the following command to download the Employee safety video from GitHub.
wget https://github.com/Azure-Samples/azure-intelligent-edge-patterns/raw/master/factory-ai-vision/EdgeSolution/modules/CVCaptureModule/videos/scenario2-employ-safety.mkv
Check the path of your video.
ls
To upload the video for further analysis, first you would have to upload the video file to your IoT Edge device through scp command. Replace with username of your virtual machine and IP address of your virtual machine.
scp <path to your video> <edge username>@<edge device IP>:
Then the video file would be copied to your edge device.
Copy the video file to RTSP simulator
Connect to virtual machine. Replace username and IP address with your information.
ssh <username>@<public_ip_address>
Check the video you just uploaded on your virtual machine that running as an edge device.
ls
There would be an RTSP simulator container installed on your edge device. You can first check whether the container exists by running the command below on your edge device:
sudo docker ps
Since the RTSP simulator would only host the video in the specific location in its container. So you would have to put your video file into the container of the RTSP simulator. On your IoT Edge device, you can copy the video file you just upload into the RTSP simulator container through docker cp command:
sudo docker cp <path_to_your_video_on_edge> rtspsim:/live/mediaServer/media/
The video would then be copied into the RTSP simulator container.
Analyze the RTSP stream of your video
After uploading the video to RTSP simulator, you can access the RTSP stream of your video through rtsp://rtspsim:554/media/<video_name>.
For this example, it will be rtsp://rtspsim:554/media/scenario2-employ-safety.mkv. Make a note of RTSP URL.