Open dsarel10 opened 3 years ago
No, I looked at that and it seemed pretty complicated. Maybe if I had a very simple generic RTSP sever written in C but I looked around and couldn't find one.
Fair enough :)
Don’t know if this helps but have you looked at https://github.com/aler9/rtsp-simple-server
take a look at what's used natively on other xiaomi based cameras (DaFang, Wyze, etc) https://github.com/EliasKotlyar/Xiaomi-Dafang-Software/tree/master/v4l2rtspserver-master
@gtxaspec , does that code compile and run on the wyze cam out of the box? Or is somehow incompatable with the wyze firmware?
@FiveLeavesLeft from what I looked at, it does compile and run, but no video or audio on stock on the wyze cams (v2), due to the fact that:
on stock, /dev/video can not be used by multiple programs (the iCamera app takes over the interface)
on the rtsp firmware (v2) you can kill the included rtsp server and use this one if I remember correctly. video and audio located in /tmp using unix sockets.
on the v3 cams, haven't tried yet, but will assume no. 1 is the issue again. edit: v3 uses /dev/dsp, /dev/framechan[0,1,or 2]
Wyze also shares their RTSP server from V2 cameras as open source code bundle.
Which file or device does this hack use to get access to the camera feed? I cannot find the source which opens the camera in this repo.
No device or file, there's a function that returns each h264 frame, IMP_Encoder_GetStream, which iCamera loads from libimp.so. The hack wraps this function. The code that wraps it is in src/common.c IMP_Encoder_GetStream().
Ahh, I see that now. What I didn't realize is that iCamera uses libimp.so.
So, the RTSP server which wyze shares via GPL (https://s3-us-west-2.amazonaws.com/download.wyzecam.com/firmware/gpl/live-ini.zip) seems to read from a /tmp/ file:
char const streamName = "live"; char const inputFileName = "/tmp/"; char const* descriptionString = "Session streamed by \"wyze\"";
So, if libimp.so hack used could stream to that file, then the wyze package RTSP could be used as an option.
Is it possible to get a straight RTSP stream directly from the camera?
I'm able to view the stream with VLC, but cannot consume it on my NVR.