Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amcrest RTSP possible? #98

Closed
ziptbm opened this issue Oct 14, 2021 · 7 comments
Closed

Amcrest RTSP possible? #98

ziptbm opened this issue Oct 14, 2021 · 7 comments
Labels

Comments

@ziptbm
Copy link

ziptbm commented Oct 14, 2021

Is it possible to use this with Amcrest cameras rtsp?

Still working through the config to see if one of the options will work, but asking in case anyone has found a method that works or knows why it won’t.

@Ranger2959
Copy link

I got it working with my Amcrest IP5M-B1186EB using the RSTP and Frigate options. I haven't gotten the live view to work on my browser yet but it does work in the mobile app. I opened #97 to see why it doesn't work in my browser but works in mobile. That seems like a problem with any stream I use, not just Amcrest so its something non specific to cameras.

@ziptbm
Copy link
Author

ziptbm commented Oct 14, 2021

Thanks! So far I've been able to get it to show a static image in both the browser and iOS app, but I can't get it to stream a Live View.

This camera is an Amcrest IP8M-T2669EW-AI, so the primary stream is 4k so I found that making it think it's a G4 Pro at least brings in the 4k option in the UI.

Here's the command I'm using to get this far, but still haven't successfully enabled Live View. Wonder if this is related to live view issues you're seeing...suggestions/ideas are appreciated.

unifi-cam-proxy -H <host IP> --mac <camera mac> -i <camera IP> -c client.pem -t <token> --model 'UVC G4 Pro' rtsp -s 'rtsp://<username:password@camera IP>:554/cam/realmonitor?channel=1&subtype=0'

UPDATE - I just tried this with an older Amcrest IP3M-HX2 and it appears to work with the stream without issue. This is a only a 3MP camera and H264, so I'm wondering if it's just not liking the 8MP with H265 from the other one.

@Ranger2959
Copy link

What version of protect are you running?

My guess based on reading through some of the issues in this repo is you will have to play around with --ffmpeg-args until you get it to work. Posting any logs from this package and logs from the network console would probably be helpful too.

@stale
Copy link

stale bot commented Nov 13, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 13, 2021
@ziptbm
Copy link
Author

ziptbm commented Nov 14, 2021

If anyone in the future is looking for how to make this work with an Amcrest IP camera, I was successful in using this command syntax.

unifi-cam-proxy --verbose --ip "<ip>" --mac <mac> --host <host ip> --cert <directory>/client.pem --token <token> rtsp -s 'rtsp://<username>:<password>@<ip>:554/cam/realmonitor?channel=1&subtype=0'

@stale stale bot closed this as completed Nov 17, 2021
@ascott18
Copy link
Contributor

ascott18 commented Dec 28, 2021

This proxy outputs an FLV stream from ffmpeg. FLV can't handle HEVC (H265) - the proxy will fail without any feedback, but if you take the ffmpeg command from the program output and run it on its own, you'll see an error from ffmpeg. So, you need to set your camera to H264.

That said, I still haven't managed to get this working. Snapshots work, but live video and recording don't. The ffmpeg command is working and outputting data. Amcrest IP8M-T2599EW

Edit: My issue with recording was that I was running this on Windows, and since the ffmpeg process is spawned with the system shell (cmd.exe) which has really bad pipe performance, ffmpeg is only able to keep up at about 10% of the rate of the video. You can see this if you remove stderr=subprocess.DEVNULL, from base.py.

Update: This comment was the secret sauce to get the live feed working:.

@rkbest13
Copy link

rkbest13 commented May 4, 2022

I have ubuntu server running with docker containers for the unifi protect NVR version 1.20.0. I am trying to get any camera to show up but not even the bigbuck bunny is shown. I don't have any unifi product so everything is virtual. unifi protect on docker and unifi-proxy-cams on docker as well. do I need anything else to make this work?

I have few questions for cameras:

  1. are the cameras auto detected if the proxy cam are set correctly?
  2. how do i make sure amcrest is set up as proxy cam gets added (forced or manually).
    1. my virtual NVR runs in docker at IP:7080, do i need to include port in the proxy-cam setup to make it direct the stream correctly?
      Any help is appreciated. @ascott18 @ziptbm @Chrisgozd
      Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants