OpenWrt Forum Archive

Topic: recording stream from IP camera

The content of this topic has been archived on 18 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi all,

I am thinking of getting the Yi Smart Camera Night Vision(Chinese version online) to use it in my garage. It's around $50 and comes with custom Linux firmware.
There is a firmware hack to enable RTSP streaming.
I would like to record to the HDD connected to my Openwrt router whenever motion is detected. Is there a package that I can use to record the RTSP stream?
I am guessing it is possible, read somewhere that if used with Xiaomi Mi router, it can record to the  Mi router HDD and Xiaomi Mi router is openwrt based.

Thanks
yud!

Both Xiaomi and ZoneMinder should work fine.
I am running ZoneMinder (although it's a real pain to get to to the point where you want to be)

Hi Ceaus,

Thanks for confirming.
I will be getting the Yi smart cam but dont think I will go with zoneMinder, heard it takes quite a bit of space and I dont need the full functionality, just somewhere to save the feed when motion detected.

cheers
Yudi

Is this the same one? If so, why it has two versions, i.e. PAL, NTSC? Sounded like this one is analog while the one you provided on your link is digital?

mazilo wrote:

Is this the same one? If so, why it has two versions, i.e. PAL, NTSC? Sounded like this one is analog while the one you provided on your link is digital?


listing says:
  PAL = Standard Edition
NTSC = Night Vision Edition 

I am getting the night vision edition.

OK and thank you.

Hi Ranger,

without going into much tech detail, I just want something that records when there is movement.
I am going by the info in the below two links.
https://www.ozbargain.com.au/node/231140
http://twigstechtips.blogspot.com.au/20 … -ants.html

seems to be a decent spec device and it runs linux, so the firmware is available and I am hoping I will be able to modify it to suit my needs. Lets see what happens when I get it.

cheers
yudi

Xiaomi Yi Smart Camera can records motion itself on microSD card. All you need is to have WiFi where you going to place it.
Yi Home smartphon app allows to play all recorder motion (~5 days for 32GB card). It has also motion alert notification.

some ip camera got a smb/ftp support so you can just link your samba/ftp share in your router and youre good to go. Else, it is possible to grab the it using ffmpeg wihtout transcoding assuming its h264 stream (meaning just packing it on a standard container eg mp4 and set a fps on it based on your preference) if the ip camera is streaming on mjpeg, you can still record it without transcoding but the size of the recorded video will be much bigger (actually 7x of the expected size of a h264 stream in 1 day recording) it is possible to make ffmepg to transcode it but routers are not designed on this kind of task and it will just make youre router slow as hell.

yudi wrote:

Is there a package that I can use to record the RTSP stream?
yud!

The short answer is no. It's all in the IP cam. The built-in sdcard could be all you'll need. If you still want to record to a drive attached to openwrt though, you'll (most likely; didn't see it in Xiaoyi specs) find smb/cifs/nas/ftp storage option in the camera's webgui. If you do find that option, most likely it'll rotate recordings according to the free space available, overwriting the old ones. Same goes for the sdcard. You will have to wait for a week or so to see how far back your recordings go, with the disk space you have.

(Last edited by wrt2000 on 10 Jun 2016, 14:28)

the most easy way, although inefficient: use tcpdump to save the whole interface traffic if you use it only for the webcam.
and in a pc, extract the stream from .pcap using gstreamer / ffmpeg to view it.

The discussion might have continued from here.