1. Introduction
This guide offers a step-by-step process for integrating Drift X Series cameras with applications or Cloud Services to enable two-way communication. It details the setup procedures and technical specifications necessary for successful implementation.
The Drift X Series camera supports two methods to play audio from a remote server, and the selection depends on your scenario requirements:
1. RTSP Audio Stream Method: Suitable for voice calls requiring continuity and strong real-time performance. It plays the audio stream from the remote server via the RTSP protocol (see Figure 1).
2. Audio File Playback Method: Designed for integration with popular AI engines like Chat - GPT. First, input text/image question information into the AI engine to get answer text. Then convert the answer text to an audio file. Finally, control the camera to play the audio file by sending messages (via WebSocket) or issuing HTTP commands (see Figure 2).
Network - Specific Control Methods:
1. Wide Area Network (WAN): Create a WebSocket to send messages, notifying the camera to play RTSP audio streams or audio files.
2. Local Area Network (LAN): Use HTTP commands to control the camera to play RTSP audio streams or audio files.
2. Video/Audio Specifications
2.1 Video Specifications
1. Format: H.264
2. Adjustable Parameters: Resolution and bitrate (adjustable via APIs)
2.2 Audio Specifications
1. Format: AAC
2. Channel: Dual channels
3. Sampling Rate: Fixed at 16KHz (non - adjustable)
Key Capabilities
The Drift X Series camera can:
1. Provide an RTSP video stream for remote access.
2. Play audio streams from a remote RTSP server.
Leveraging these capabilities, you can develop video call applications on mobile Apps or cloud services.
For detailed integration instructions (e.g., configuring Wi-Fi, obtaining the camera's IP address), refer to another blog post 《How to Integrate a Drift Camera into Your APP》. This document also includes a list of HTTP APIs.
3. Playing Remote Audio Streams via RTSP Protocol
The camera supports two methods to configure the RTSP audio stream URL.
3.1 Via Script File (named as fmcam.conf)
Prerequisites
1. Set up an RTSP Server that provides an AAC - format audio stream (dual channels, 16KHz sampling rate).
2. Get the audio stream URL generated by the RTSP Server (e.g., rtsp://LAN IP/stream name).
Configuration Steps
1. put the fmcam.conf file in the root directory of the camera's memory card.
2. Open the file with a text editor (e.g., Notepad) and add the RTSP URL to the rtsp_url field.
Example Configuration:
router_ssid=RD-TEST_5G router_password=foreaml23 stream_resolution=720P stream_bitrate=2000000 rtsp_url=rtsp://192.168.5.52/audio_16K.aac # RTSP audio stream URL qrcode_type=17 |
Activation
When an APP previews the camera's live stream, the camera will automatically activate and play the audio stream from the RTSP Server, establishing a two - way call.
3.2 Via HTTP Commands
Use the following HTTP requests to configure and control the audio stream. Replace 192.168.5.181 with your camera's actual IP address.
Purpose |
HTTP Command |
Configure the RTSP audio stream URL |
http://192.168.5.181/cgi-bin/foream_remote_control?rtsp_url=rtsp://[RTSP Server IP]/[Stream Name] |
Configure the URL and start playing the audio stream |
http://192.168.5.181/cgi-bin/foream_remote_control?start_rtsp=rtsp://[RTSP Server IP]/[Stream Name] |
Stop playing the audio stream |
http://192.168.5.181/cgi-bin/foream_remote_control?stop_rtsp |
4. Playing Remote Audio Files
The camera can play audio files stored locally (on the memory card) or remotely (server side via a network). All audio files must meet the specifications: AAC format, dual channels, 16KHz sampling rate.
4.1 Play Audio Files from the Camera's Memory Card
Steps
1. Place the audio file (e.g., audio_test_file.aac) into the Micro SD card of the camera.
2. Send the following HTTP command to trigger playback (replace 192.168.5.181 with the camera's IP):
http://192.168.5.181/cgi-bin/foream_remote_control?play_audio_file=/tmp/SD0/[Audio File Name].aac |
Example Audio File: audio_test_file.aac
4.2 Play Audio Files from the Network
Send an HTTP command with two required parameters:
1. play_audio_url: The download URL of the audio file.
2. file_size: The size of the audio file (in bytes).
Example Command:
http://192.168.5.181/cgi-bin/foream_remote_control?play_audio_url=http://www.driftlife.co/download/audio_test_file.aac&file_size=23316 |
5. Test Two - Way Calls with a Windows PC (Simulating Cloud Service Mode)
This test uses a Windows PC to simulate a cloud service, enabling two - way calls with the camera.
5.1 Prepare Tools and Files
Tool/File |
Description |
Download Link |
live555MediaServer |
RTSP server software for Windows |
Link (Extracted code: s362) |
VLC Player |
Media player for streaming and playback |
|
Test Audio File |
AAC format, dual channels, 16KHz sampling rate |
Post - Download Setup
Place the downloaded audio_test_file.aac in the same directory as live555MediaServer.exe.
5.2 Check the PC's Wireless IP Address
1. Press Win + R, enter cmd, and open the Command Prompt.
2. Run the command ipconfig and find the "Wireless LAN adapter Wi - Fi" section to get the PC's local IP address (e.g., 192.168.5.15).
5.3 Start the RTSP Server
1. Double - click live555MediaServer.exe to launch the server.
2. Verify the following:
1. The RTSP URL displayed in the server window uses the PC's wireless IP address (e.g., rtsp://192.168.5.15:8554/<filename>).
2. The camera and the PC are connected to the same Wi - Fi router and in the same network segment (e.g., both in 192.168.5.*).
Note on Port Numbers:
If the RTSP URL includes a port (e.g., 8554), use the URL with the port.
If there is no port number in the URL, use the URL without the port.
5.4 Establish and Test the Two - Way Call
Step 1: Configure the Camera's RTSP Audio Stream URL
Write the RTSP audio stream URL (e.g., rtsp://192.168.5.15:8554/audio_test_file.aac) into the camera's fmcam.conf file (refer to Section 3.1 for details).
Step 2: Play the Camera's Live Stream via VLC
1. Open VLC Player, click "Media" > "Open Network Stream".
2. Enter the camera's RTSP live stream URL (format: rtsp://[Camera IP]/live; e.g., rtsp://192.168.5.88/live).
3. Click "Play" to pull and play the camera's audio and video streams.
Verification: If the stream plays successfully, the camera's LCD screen will turn red, and the indicator will flash red.
Step 3: Play the RTSP Audio Stream via VLC
1. Open a second VLC Player window.
2. Click "Media" > "Open Network Stream".
3. Enter the RTSP audio stream URL from the live555 server (e.g., rtsp://192.168.5.15:8554/audio_test_file.aac).
4. Click "Play" to send the audio stream to the camera.
Troubleshooting: VLC Cannot Play the Camera's Stream
If VLC fails to play the camera's stream, check the network connectivity between the PC and the camera:
1. Open the Command Prompt.
2. Run the command ping [Camera IP] (e.g., ping 192.168.5.88).
3. If the ping is successful (replies are received), the network is connected; if not, recheck the Wi - Fi connection of the camera and the PC.
6. X5 Firmware Upgrade Procedure
6.1 Upgrade Steps
1. Download the X5 firmware file (X5.bin) from the provided link.
2. Insert a microSD card into the X5 camera, and connect the camera to a computer (Mac or PC) using the supplied USB cable.
3. The X5 will be recognized as an external device on the computer.
4. Copy the X5.bin file to the root folder of the microSD card (next to the DCIM folder).
5. Safely eject the X5 from the computer.
6. Power on the X5. It will automatically start the firmware update, and you will see an "upgrading firmware" message. The update takes about 1 minute, and the camera will restart automatically 3 times.
7. After the restart, enter the camera's settings menu to check the firmware version and confirm the upgrade was successful.
Note: If you are interested in delving deeper into this category and wish to explore more details (such as technical support, customization needs, or project collaboration), please send an email to sales@driftsee.com. In your email, kindly explain your specific requirements or objectives—this will help us provide you with more targeted assistance.