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

Config question #6

Closed
phoenixaus opened this issue Oct 29, 2023 · 5 comments
Closed

Config question #6

phoenixaus opened this issue Oct 29, 2023 · 5 comments
Labels
support User support

Comments

@phoenixaus
Copy link

phoenixaus commented Oct 29, 2023

Hey Guys,

Firstly, thanks for your efforts on Frigate and offering the Arlo-streamer!

I'm having a bad time trying to configure it though, which I suspect has something to do with the FFMPEG_OUT string as I can't get a stream.

I'm currently using:
FFMPEG_OUT: c:v copy -c:a copy -f flv rtmp://127.0.0.1:1935/live/{name}

The aarlo-streamer and frigate are both running in docker, so when I create the Arlo-streamer container, I map -p 1935:1935

I figure that the 127.0.0.1 should work, however, I can't see anything, and get errors in the log for Frigate. I have also tried changing this to both the host IP 192.168.100.86 and the docker container IP, but no luck.

The other issue is the name from Arlo the camera name, i.e. rear_stairs, or the technical name, i,e, 4WA16B79A85F7:

2023-10-29 21:18:52,894 [INFO] root: rear_stairs motion: True
2023-10-29 21:18:52,894 [INFO] root: rear_stairs state: streaming
2023-10-29 21:18:52,899 [DEBUG] pyaarlo: 4WA16B79A85F7: _start_stream2::reqs='set()',local='{'streaming'}',remote='set()'
2023-10-29 21:18:53,264 [DEBUG] urllib3.connectionpool: https://myapi.arlo.com:443 "POST /hmsweb/users/devices/startStream?eventId=FE!d14fb1d3-045c-4dca-9b8f-5872e22574a9&time=1698578332899 HTTP/1.1" 200 None
2023-10-29 21:18:53,265 [DEBUG] pyaarlo: 4WA16B79A85F7: url=rtsps://arlostreaming262-z3-prod.wowza.arlo.com:443/vzmodulelive/4WA16B79A85F7_1698578333106?egressToken=****************&userAgent=iOS&cameraId=4WA16B79A85F7_1698578333106&txnId=FE!d14fb1d3-045c-4dca-9b8f-5872e22574a9
2023-10-29 21:18:53,506 [WARNING] root: Proxy stream for pool_room exited unexpectedly with code 1. Restarting...
2023-10-29 21:18:53,668 [DEBUG] pyaarlo: backend: packet: device update
2023-10-29 21:18:53,669 [DEBUG] pyaarlo: backend: sending cameras/4WA16B79A85F7 to 4WA16B79A85F7
2023-10-29 21:18:53,671 [DEBUG] pyaarlo: 4WA16B79A85F7: Rear Stairs CAMERA got one cameras/4WA16B79A85F7
2023-10-29 21:18:53,672 [DEBUG] pyaarlo: 4WA16B79A85F7: set:ArloCamera/4WA16B79A85F7/activityState=startUserStream
2023-10-29 21:18:53,673 [DEBUG] pyaarlo: 4WA16B79A85F7: activityState: NEW startUserStream
2023-10-29 21:18:53,991 [DEBUG] pyaarlo: backend: packet: device update
2023-10-29 21:18:53,992 [DEBUG] pyaarlo: backend: sending cameras/4WA16B79A85F7 to 4WA16B79A85F7
2023-10-29 21:18:53,993 [DEBUG] pyaarlo: 4WA16B79A85F7: Rear Stairs CAMERA got one cameras/4WA16B79A85F7
2023-10-29 21:18:54,782 [DEBUG] pyaarlo: backend: packet: device update
2023-10-29 21:18:54,782 [DEBUG] pyaarlo: backend: sending cameras/4WA16B79A85F7 to 4WA16B79A85F7
2023-10-29 21:18:54,783 [DEBUG] pyaarlo: 4WA16B79A85F7: Rear Stairs CAMERA got one cameras/4WA16B79A85F7
2023-10-29 21:18:54,783 [DEBUG] pyaarlo: 4WA16B79A85F7: _event::stream::reqs='set()',local='{'streaming'}',remote='{'streaming'}'
2023-10-29 21:18:54,783 [DEBUG] pyaarlo: 4WA16B79A85F7: set:ArloCamera/4WA16B79A85F7/activityState=userStreamActive
2023-10-29 21:18:54,783 [DEBUG] pyaarlo: 4WA16B79A85F7: activityState: NEW userStreamActive
2023-10-29 21:18:59,069 [WARNING] root: Proxy stream for rear_stairs exited unexpectedly with code 1. Restarting...
2023-10-29 21:18:59,359 [WARNING] root: Proxy stream for pool_room exited unexpectedly with code 1. Restarting...
2023-10-29 21:19:03,210 [DEBUG] pyaarlo: backend: packet: device update
2023-10-29 21:19:03,210 [DEBUG] pyaarlo: backend: sending cameras/4WA16B79A85F7 to 4WA16B79A85F7
2023-10-29 21:19:03,211 [DEBUG] pyaarlo: 4WA16B79A85F7: Rear Stairs CAMERA got one cameras/4WA16B79A85F7
2023-10-29 21:19:03,211 [DEBUG] pyaarlo: 4WA16B79A85F7: recent activity key
2023-10-29 21:19:03,211 [DEBUG] pyaarlo: 4WA16B79A85F7: turning recent ON for Rear Stairs
2023-10-29 21:19:03,211 [DEBUG] pyaarlo: 4WA16B79A85F7: set:ArloCamera/4WA16B79A85F7/motionDetected=False
2023-10-29 21:19:03,211 [DEBUG] pyaarlo: 4WA16B79A85F7: motionDetected: NEW False
2023-10-29 21:19:03,211 [INFO] root: rear_stairs motion: False
2023-10-29 21:19:04,720 [WARNING] root: Proxy stream for rear_stairs exited unexpectedly with code 1. Restarting...

and the Frigate config is:
RearSteps:
ffmpeg:
input_args: preset-rtmp-generic
inputs:
- path: rtmp://192.168.100.85:1935/live/rear_stairs
roles:
- detect
objects:
track:
- person
- dog
- cat
snapshots:
# Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
# This value can be set via MQTT and will be updated in startup based on retained value
enabled: True
retain:
# Required: Default retention days (default: shown below)
default: 10

2023-10-30 10:07:49.939486911 [2023-10-30 10:07:49] frigate.video ERROR : RearSteps: ffmpeg process is not running. exiting capture thread...
2023-10-30 10:07:59.948456613 [2023-10-30 10:07:59] watchdog.RearSteps ERROR : Ffmpeg process crashed unexpectedly for RearSteps.
2023-10-30 10:07:59.948462743 [2023-10-30 10:07:59] watchdog.RearSteps ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2023-10-30 10:07:59.948465305 [2023-10-30 10:07:59] ffmpeg.RearSteps.detect ERROR : [rtmp @ 0x5560337c1f80] Cannot read RTMP handshake response
2023-10-30 10:07:59.948467935 [2023-10-30 10:07:59] ffmpeg.RearSteps.detect ERROR : rtmp://192.168.100.85:1935/live/rear_stairs: Connection reset by peer
2023-10-30 10:07:59.999149292 [2023-10-30 10:07:59] frigate.video ERROR : RearSteps: Unable to read frames from ffmpeg process.
2023-10-30 10:08:00.001720821 [2023-10-30 10:08:00] frigate.video ERROR : RearSteps: ffmpeg process is not running. exiting capture thread...
Any help or pointers would be greatly appreciated!!!

Thanks

@kaffetorsk
Copy link
Owner

Might be several issues.

First of all, make sure the FFMPEG_OUT is correct. I don't know how familiar you are with .env files, but the correct string in your case should be:
FFMPEG_OUT="-c:v copy -c:a copy -f flv rtmp://127.0.0.1:1935/live/{name}"

Second, if you are running both the rtmp server and arlo-streamer in docker containers addressing 127.0.0.1 won't work. This is because 127.0.0.1 points to the interface inside the container.

However there are two solutions:

  1. Make the containers part of the same network. You can then address the name of the rtmp container (e.g. rtmp://rtmp-server:1935. Easiest way to do this is by using docker compose:
services:
  rtmp-server:
    image: ...
    ...
    ports:
      - "1935:1935"
  arlo-streamer:
    image: kaffetorsk/arlo-streamer
    ...
  1. Adding an extra_host to the arlo-streamer container. Using compose this would be:
services:
  arlo-streamer:
    image: kaffetorsk/arlo-streamer
    ...
    extra_hosts:
     - "host.docker.internal:host-gateway"

You can then reach the rtmp by rtmp://host.docker.internal:1935

Good luck!

@phoenixaus
Copy link
Author

Thanks @kaffetorsk!!
I thought originally that I didn't need another container for the rmtp server. Currently trying to get arlo into frigate, so thought I only needed the aarlo streamer and exposing port 1935, i could pick it up in frigate. I'll get woking and update this issue when done, incase anyone has the same issue.

@kaffetorsk
Copy link
Owner

Added example to README

@kaffetorsk
Copy link
Owner

Looks like your post was interrupted after "or:"

What is FFMPEG_OUT set to now? are you running the rtmp as part of a compose, or is it a separate container?

@phoenixaus
Copy link
Author

Hey @kaffetorsk,

I have deleted that post, it was one of those "oh...." moments. Apologies, I thought I had hidden it / deleted it.

Can report back that it's all working!!

I'm at work at the moment, but I will add what I did wrong to this issue and close it tonight. It was mainly an issue with the FFMEG (arlo-streamer) outstring. Originally as per the docs, it was 127.0.0.1, then I updated it to host.docker.internal however this was still not right. As you pointed out above, it needs to be rtmp://rtmp-server:1935

@kaffetorsk kaffetorsk added the support User support label Dec 12, 2023
@kaffetorsk kaffetorsk pinned this issue Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support User support
Projects
None yet
Development

No branches or pull requests

2 participants