Connect to xiaoyi webcam!

@rpitera How I install ffmpeg in RPI?

Update: installed libav-tools and created a symbolic link. It’s working! Thanks.

Regards,

I’ve seen a lot of people having problems setting this up; would you mind explaining your steps?

Yes.
1/ install libav-tools: sudo apt install libav-tools
2/ create symbolic link: sudo ln -s /usr/bin/avconv /usr/bin/ffmpeg

Regards,

7 Likes

Thanks - I don’t use this but I’m sure this will help a lot of people and I appreciate your taking the time!

You can also install ffmpeg from backports:
https://backports.debian.org/Instructions/

apt-get -t jessie-backports ffmpeg

How would one know the correct suffix after “:554/”? This site uses “:554/tcp/av0_0” while here you use “:554/ch0.h264”. Both cases doesn’t work on my setup.

Please help. Thanks.

This is my entry in configuration.yaml, if it helps you. Works fine for me.

camera:

  • platform: ffmpeg
    name: Living Room
    input: -rtsp_transport tcp -i rtsp://x.x.x.x:554/ch0_0.h264

It depends on how it has been defined in your firmware for the cam.

I have to do reverse engineering.

  1. Using telnet I’ve found the prompt to be RT-IPC

  2. I’ve searched "RT-IPC” using Google and found that the the rtsp urls are as follows:
    rtsp://:554/11 -> 720P resolution or “MainFlow”
    rtsp://:554/12 -> VGA or “MinorFlow”

  3. Verified using VLC

You could also can get more details using this generic query http://<ip address>/cgi-bin/hi3510/param.cgi?cmd=getserverinfo gives me
var serialNum="VVVIPC1507283580HSDS-jPD4tU5cTcv"; var model="RT_IPC"; var hardVersion="3500-ov9712a"; var softVersion="V3.5.4.2301-S50-SMC-B20150723B"; var ipcname="IPCAM"; var startdate="1970-1-1 8:0:17"; var runtimes="0 day, 0:20"; var sdstatus="out"; var sdfreespace="0 "; var sdtotalspace="0 "; var builddate="Jul 28 2015 "; var productmodel="null"; var vendor="RTJ"; var swver=""; var hwver=""; var mppver="mpp2";

The model is RT_IPC and the vendor is RTJ, you can search using this and will find the correct rtsp url.

1 Like

Any one know about how to add xiaomi fang with RTSP?

Check out this project.

i know about it, i ask about how to add it to HA :slight_smile: but i find how so Thanks any way

How did you?

  - platform: ffmpeg
    name: Test Camera
    input: -rtsp_transport tcp -i rtsp://192.168.31.41/unicast
1 Like

Hello,
I have yi 1080p home camera. It’s international version. FW is 2.1.0.0A_201903071456. I have installed ffmpeg from backports. But in the frontend there is an error: Error loading image. There is no error in log file. Any help will be appreciate it.
Thanks.

are you chnage the FW for support RTS[?

I am going to buy the cam 4 times :stuck_out_tongue: so I hope it still works? I already got FFMPEG on my setup … so it should be easy after using fang Hack image right?

how to do this:

  1. Prepare an sd-card with two partitions.

The first partition on the device must be a vfat partition. It will only contain some small scripts so 100MiB should be more than enough. The second partition must be an ext2 partition and will contain all other files.

this works also without the need for the hack. Or is the hack obligatory?

Is two way audio available