Getting started¶
Pre-requisites¶
Install Python version 3.5¶
Install python version 3.5 as per your operating system from the Python website.
Note
Make sure the installed bin path is set in your PATH variable. Run “python –version” on command prompt to check.
Warning
This SDK is tested with python version 3.5 only. Other versions may not work.
Install gstreamer (v1.14.x or higher)¶
Windows¶
Download the latest package from the Gstreamer website.
gstreamer-1.0-x86* (per your architecture)
Note
Make sure the installed bin path is set in your PATH variable. Run “gst-inspect-1.0 –version” on command prompt to check
Linux¶
Install the gstreamer and relevant gstreamer plugin modules
apt-get install libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools
Note
You may have to use sudo
with the above command if you don’t have permission to install packages.
Build and install¶
- Change to the SDk directory
- Fresh installation
cd python_iotcc_sdk pip install -e .
- Updating to new version of the SDK (overwriting previously installed version)
cd python_iotcc_sdk pip install --user --force-reinstall .
Test¶
Quick test (no network connectivity required)¶
Connect device via USB
Connect display via HDMI
Reset the device and setup port forwarding
- Windows
tests\port_forward.bat
- Linux
tests\port_forward.sh
- Run the test script from your machine
python test-preview.py --ip 127.0.0.1
Use –help or -h for all options. And press Ctrl-C for exiting. You can see preview on display via HDMI.
Quick test (with network connectivity)¶
Connect the device to network (WiFi)
Check camera ip
Connect display via HDMI
- Run the test script from your machine
python test-preview.py --ip <ip address>
Use –help or -h for all options. And press Ctrl-C for exiting. You can see the preview on display via HDMI.