article

vidhan avatar image
vidhan posted

How to View Video on an IoT Device with Telnyx Video

IoTVideo.png

In this tutorial, we will walk you through the steps to run Telnyx Video Rooms locally on Raspberry Pi to capture and share video.

Requirements

To complete this tutorial, you will need:

Step 1: Clone the project and install dependencies

git clone https://github.com/team-telnyx/telnyx-meet.git

  • Go to the API Keys page and copy the API Key. Incase there is no API Key, then create one.

  • Next, copy the .env.sample file and name the new file .env.local and add TELNYX_API_KEY to it.

  • To install dependencies, open location where folder is in terminal and run following command: yarn

  • Once dependencies are installed, initialize the server: yarn dev

Run app locally

  • Open the link mentioned in the terminal in the default browser and click on "Join A Room"

Join a Room page

  • Make sure that a webcam is attached to the Raspberry Pi or else you will get an error

  • You will be asked to provide your name (optional), room ID and enable camera.

Provide room ID

  • Next, we need to acquire the Room ID

Step 2: Acquire Room ID

To work with Telnyx Video, we need to create a Room and acquire Room ID.

  • Run CURL command in terminal on Raspberry Pi

curl -X POST \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer API_KEY" \
  --data '{"enable_recording":true,"max_participants":10, "unique_name":"RPi Room"}' \
  https://api.telnyx.com/v2/rooms
  • Copy the id value which is your Room ID and keep it with you.

CURL Command

Step 3: Provide Room ID and Join the Room

Once you have acquired Room ID, fill the values and click on 'Join Room'

Join Room

You should be able to see the Video on your Raspberry Pi

videoiotvideo-roomsraspberrypicurl
10 |600

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Manage Your Content

Article

Contributors

vidhan contributed to this article