Connecting Xiaomiβs camera to your computer opens up new possibilities, from viewing the archive of recordings on a large screen to integrating with video surveillance systems like Blue Iris or broadcasting to OBS Studio. However, many users face problems β the camera is not defined as a removable disk, the Mi Home application does not find the device through the local network, and the RTSP- thread gives an authentication error. In this article, we will analyze all the current methods of connection (including hidden firmware functions) and give checklists for troubleshooting.
It is important to understand that the methods differ depending on the camera model. For example, Xiaomi Mi Home Security Camera 360Β° 1080p supports live streaming on RTSP only after unlocking through alternative firmware, while Yi Home Camera 2 can stream video over the local network without additional manipulation.
1. Connecting Xiaomi Camera to PC via USB: Myths and Reality
Many users try to connect the camera to a computer via a USB-Type C or Micro-USB, expecting it to be defined as a webcam or a removable drive. In practice, 90% of Xiaomi models (including Mi Home, Yi, IMILAB) do not support USB video streaming β the port is only for power and firmware. Except for rare models like Xiaomi Mi Smart Webcam, which can work as a USB camera but require special drivers.
What can be done via USB:
- π Swipe the camera through the Mi Home PC Suite (official firmware recovery software).
- π Download Logic for Diagnostics (only on certain models via ADB).
- β‘ Charge the battery (if the camera is wireless).
β οΈ Warning: Connecting the Xiaomi Mi Home Security Camera 2K to a PC via USB without first disconnecting from the Wi-Fi network can cause a setting reset. Always turn off power before port manipulation!
If your goal is to get video from the camera, the USB- connection is not suitable.
2. Watch video via the Mi Home app on PC (official method)
The easiest way is to use an Android emulator (like BlueStacks or LDPlayer) to run the Mi Home mobile app on your computer, which will allow you to view live streams, control camera rotation (if supported), and customize notifications.
Step-by-step:
- Download and install BlueStacks.
- Sign in to Google Play and install the Mi Home app.
- Register a Xiaomi account (if not already) and add a camera through Add Device β Cameras.
- After synchronization, the camera will appear in the list of devices β click on it to view.
Advantages of the method:
- π₯ Full functionality, like on a smartphone (including cloud archive).
- π No technical settings are required (RTSP, IP- addresses).
- π± Supports all Xiaomi and Yi camera models.
Disadvantages:
- β οΈ Video delay up to 2-5 seconds (depends on Xiaomi servers).
- π» Requires a powerful PC to run the emulator smoothly.
- π It is not possible to integrate the stream into third-party programs (OBS, VLC).
3 Local Area Network Connection (RTSP and ONVIF)
For advanced users who need to integrate the camera into a video surveillance system (Blue Iris, iSpy) or stream video to OBS Studio, RTSP will do. However, most Xiaomi cameras block this functionality by default.
- Install an alternative firmware (e.g. Hack Mi Home Cameras or OpenIPC).
- Activate RTSP via Telnet or the cameraβs web interface.
- Set up a port (usually 554) and a path to the stream.
Example RTSP- links for Xiaomi Mi Home Security Camera 360Β° after firmware:
rtsp://[IP_ Cameras]:554/stream1
Username: admin
Password: Password from Wi-Fi_networkHow to find out IP-camera:
- Open the Mi Home app β select the camera β Settings β About the device.
- Or check the list of devices on the router (usually at 192.168.1.1).
You can use VLC Player to check the flow:
- Open VLC β Media β Open the URL.
- Insert the RTSP- link and enter the login / password.
β οΈ Warning: Third-party camera firmware voids warranty and may cause unstable performance. Before the procedure, back up the original firmware via Mi Home PC Suite!
Download the firmware from the official repository|Check the camera model (on the back sticker)|Disconnect the camera from the Xiaomi cloud|Connect the camera to the PC USB (if required)|Create a Recovery Point in Mi Home PC Suite-->
4. Cloud Connection via Token (for developers)
If you need to access video from Xiaomiβs camera through an API (for example, to integrate with your Home Assistant or your own server), you can use a cloud token. This method does not require firmware, but you need basic programming knowledge.
The algorithm for obtaining a token:
- Install the extension for the Mi Token Extractor browser (for Chrome).
- Sign in at account.xiaomi.com.
- Copy the token from the extension (example: 5f3b7a1e8d2c9f4e6a1b0c...).
- Use the token in API- Requests (documentation: MiHome API).
Example of request to obtain a list of devices:
GET https://api.io.mi.com/app/device/list
Headers:
User-Agent: Android-7.1.1-1.0.0-ONECLOUD-4.2.0-05211758-app
Cookie: userId=YOUR_USER_ID; serviceToken=YOUR_TOKEN
x-xiaomi-protocal-flag-cli: PROTOCAL-HTTP2/1.0To stream video via the API, use Endpoint:
GET https://{server}/miio/miio camera stream url?did={device_id}&token={token}Servers for different regions:
| Region | API server | RTSP- server (if supported) |
|---|---|---|
| China (Mainland) | api.io.mi.com | rtsp://live.xiaomi.com |
| Europe/Russia | api.euro.mi.com | rtsp://live.euro.mi.com |
| USA | us.api.io.mi.com | rtsp://us.live.xiaomi.com |
| India | in.api.io.mi.com | β |
How to get around the limit on the number of requests to the API Xiaomi?
5.Integration with OBS Studio for streaming
If you want to stream video from Xiaomiβs camera to OBS Studio (like streaming on Twitch or YouTube), there are two ways to go:
Method 1: Through RTSP (recommended)
- Set up RTSP on the camera (see Section 3).
- In OBS, add a media source.
- In the Local File field, insert a RTSP- link (example: rtsp://192.168.1.100:554/stream1).
- Enter the username/password in the source settings.
Method 2: Using an Android emulator (if RTSP is not available)
- Run Mi Home in BlueStacks (see Section 2).
- In OBS, add the source Capture windows and select the emulator window.
- Cut the frame trimming to remove unnecessary interface elements.
The best settings for streaming:
- ποΈ Resolution: 1280Γ720 (if the camera supports 1080p, reduce for smoothness).
- π FPS: 15β20 fps (more CPU load).
- π Sound: Turn off the camera microphone in the settings OBS if you don't need to.
π‘
If the OBS video from the camera is lagging, try to reduce the bitrate in the settings RTSP- stream. To do this, add the option?bitrate=1000 (value in Kbit / s) to the stream address.
6. Solving common errors
When connecting Xiaomi cameras to PCs, users often face typical problems, and letβs look at the most common and ways to fix them.
Error 1: The camera is not on the local network
- π Check that the PC and camera are connected to the same Wi-Fi network (not the guest!).
- π Restart your router and camera (turn off power for 30 seconds).
- π‘ In the router settings, disable AP Isolation.
2 error: RTSP- thread does not open in VLC/OBS
- π Make sure that the login/password for RTSP matches the data from Wi-Fi (sometimes you need to change the password to a simple one, without special characters).
- π οΈ Check if port 554 is open in the Windows firewall (Control Panel β Firewall β Additional settings).
- π If you use VPN or proxies, disable them β they can block local traffic.
Error 3: In the Mi Home emulator, the camera is displayed offline
- π± Check the region of your Xiaomi account (should match the region of the camera). You can change the region in the Mi Home settings β Profile β Region.
- β³ Wait for synchronization (sometimes it takes up to 10 minutes).
- π Update the camera firmware through the official app.
Error 4: Impossible to flash the camera
- π Use the original USB- cable (not all cables support data transmission).
- π₯οΈ Try another PC (on some USB- laptops, the ports don't provide enough current).
- π Check out the camera model β some (like the Xiaomi Mi Home Camera 2) require special versions of the Mi Home PC Suite.
π‘
If your Xiaomi camera stops working after you have firmware, try resetting it to factory settings, and hold the reset button (usually next to the Micro-SD connector) for 10-15 seconds before the beep.