Multimedia - RTSP Streaming V7RC
Materials
- AmebaPro2 [ AMB82 MINI ] x 1
- Android / iOS mobile phone x1
Example
Introduction
In this example, we will use the Ameba Pro2 board to stream video from the on-board camera sensor (JXF37) to V7RC mobile app via RTSP (Real Time Streaming Protocol). V7RC is a remote controller APP that provides two kinds of control UI: one is 2 channels for RC cars, and the other is 4 channels for tanks and bulldozers.
The following examples shows different use cases of RTSP streaming to V7RC APP. You may choose to stream to V7RC only or any other video receiving platform.
1. VideoOnly
2. DoubleVideo
Procedure
Open the StreamRTSP example in “File” -> “Examples” -> “AmebaMultimedia” -> “StreamRTSP” -> “V7RC”.
Since the video receiving end is mobile devices, in the highlighted code snippet, instead of using the default video settings, we will set the video resolution to VIDEO_D1 (720×480) to limit the video receiving latency.
In the highlighted code snippet, fill in the “ssid” with your WiFi network SSID and “pass” with the network password. Since the video streaming receiving end is mobile phone, we suggested to use 5G network since it features lower latency, higher capacity, and increased bandwidth to provide a better video streaming quality.
Compile the code and upload it to Ameba. After pressing the Reset button, wait for the board to connect to the Wi-Fi network. The board’s IP address and network port number for RTSP will be shown in the Serial Monitor.
You may download V7RC APP from the links provided below.
• Android Users: https://play.google.com/store/apps/details?id=com.v7idea.v7rcliteandroidsdkversion&hl=en_US
• iPhone Users: https://apps.apple.com/nz/app/v7rc/id1390983964
Upon the completion of the APP installation, make sure your smart phone is connected to the same network as the Ameba Pro2 board for streaming. Open V7RC APP and select “Control Centre”:
Under NETWORK section, select “WIFI”. Under CAMERA section select “RTSP”. Since RTSP is used as the streaming protocol, key in “rtsp://{IPaddress}:{port}” as the Network URL in V7RC in the text box below CAMERA section, replacing {IPaddress} with the IP address of your Ameba Pro2 board, and {port} with the RTSP port shown in Serial Monitor. The default RTSP port number is 554. In the case of two simultaneous RTSP streams, the second port number defaults to 555. Lastly, click the “Save” button and return to the home page:
Back to the V7RC home page, you can check the Wi-Fi connection status on the top of the APP. Click video button (orange) to monitor the video streaming in real-time.
The video stream from the camera will be shown in V7RC APP. Meanwhile, in your Serial Monitor, the message “rtp started (UDP)” will appear:
Code Reference
The settings below have been tested for better V7RC RTSP streaming quality:
VideoSetting config(VIDEO_HD, CAM_FPS, VIDEO_H264, 0); // 1280x720
VideoSetting config(VIDEO_D1, CAM_FPS, VIDEO_H264, 0); // 720x480