An attempt to make "YI Home camera" a standalone rtmp streaming solution.
JavaScript Shell HTML CSS
Switch branches/tags
Nothing to show
Clone or download
Latest commit ed7af48 Mar 31, 2016
Failed to load latest commit information.
sd updating file permissions Mar 28, 2016
.gitignore v0.0.1 Mar 28, 2016 updated Mar 31, 2016
screenshot.png Screenshot added Mar 28, 2016

YI stream

YI stream is an attempt to make "YI Home camera" a standalone RTMP live streaming solution. Once YI is started, go to http://[YI IP] enter "Server URL" and "Stream Name" and camera will start publishing video and audio to RTMP server. It has been tested with YouTube and nginx-rtmp-module, but I believe it will work with other RTMP servers as well.


YI stream


This solution is meant for educational purposes only. If you decide to flash your YI with this software, you are the only person responsible for any damages you make. Keep in mind that it is an early stage software and it may not work. You may brick your camera, and - for sure - you are breaking warranty agreement. Moreover, this firmware modification breaks all YI default functionality: YI mobile app will not work; no recording is possible.


YI I bought is Chinese version. The hw platform is 2. I did not tested this on any other YI versions.


  1. ./sd/home - contains proprietary software which I think is a property of Xiaomi Inc.,
  2. ./sd/test/*.g726 files are probably also proprty of Xiaomi Inc., I took them from;
  3. ./sd/test/web/lighttpd - is a LigHttpd web server distributed on revised BSD license;
  4. ./sd/test/avworker-min - is a modified example of ffmpeg remuxing.c, ffmpeg itself is compiled with GPL 2.0 license;
  5. Bootstrap is licensed under the MIT license;
  6. jQuery is released under the MIT license;
  7. Flot is licensed under the MIT license;
  8. The rest (by me) is distributed under GPL 2.0;
  9. Although "YI stream" logo looks the same as the logo on, it is done by me;
  10. let me know if I am omitting anything


  1. YI firmware is, taken from;
  2. Lighttpd is 1.4.39;
  3. ffmpeg is N-78887-g21234c8

FAQ (initial)

How to flash it?

Copy the content of ./sd to the root of your SD card and follow the instructions on

How to setup the camera?

In order to setup wifi, you will still need Xiaomi app. As my camera is Chinese version I am using Chinese version of app from here. Once camera says "Waiting to connect" you need to show it the QR code (from the app) with your wifi SSID and password. Camera will scan it and say "QR code scanned and successful", after few seconds it will say "Wifi is connected". Then (using your router DHCP listing) you find camera IP, go to http://[YI IP] and set up RTMP streaming.

Very useful information on how to setup the camera can be found here:

How does it work?

It uses ffmpeg for re-muxing and re-streaming av stream from RTSP on localhost to RTMP server. Additionaly a simple HTML UI has been made to start/stop streaming, checking an output logs and monitoring bandwidth.

Is this software secure?

Absolutely, not. HTTP of the camera is wide open. Please do not expose it to open Internet.

Does it communicates to Xiaomi servers?

I do not think so. I have removed: /home/cloud and /home/goolink.

What else has been removed?

Check ./sd/test/ (at the end of the file) for all the files that I am removing from /home directory.

Do RTSP, Telnet and FTP work?


How did I build the software?

First, I took Hi3518_SDK_V1.0.7.0.tgz, links can be found on Then compiled lighttpd and ffmpeg with the arm-hisiv100-linux, wrote simple cgi and html/js gui.

Why it cannot stream HD?

The top command shows that ./rmm process takes ~297.4 of %MEM, while ./rtspsvr takes ~86.4 of %MEM. When I am starting avworker-min the out of memory killer kills it. I was able to stream HD, when I killed all processes except rmm and rtspsrv (killall log_server && killall watch_process && killall led_ctl && killall tcpsvd && killall telnetd), but it cannot be treated as a solution. Perhaps you will find a solution for this.