-
-
Notifications
You must be signed in to change notification settings - Fork 236
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
No live video, snapshots hours behind #144
Comments
I'm using an RTSP stream. Does it matter what model of camera I create in the UniFi protect interface? Should I specify the camera model on the command line when I start up the proxy? Current startup command - |
Can you share the output of (replace username and password): ffprobe "rtsp://xxx:xxx@192.168.xx.103:554/videoMain" The warning about the snapshot file not being ready suggest that the ffmpeg stream is not working correctly which is usually an indicator of an incorrect RTSP source or invalid format |
Thanks, that was a useful command I didn't know about
|
Does your password or username happen to have special characters in it? |
It does indeed
… On 19 Jan 2022, at 2:34 pm, Keshav Varma ***@***.***> wrote:
Does your password or username happen to have special characters in it?
—
Reply to this email directly, view it on GitHub <#144 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABUE5REZGAERWV72WQUNFZTUWYZ57ANCNFSM5LY3XPZA>.
You are receiving this because you authored the thread.
|
the bash/sh system will hit a special character depending on what it is and end up dropping the full argument of the command. the best work around is to remove and bangs, at's, astrix, or hashes from your password. Typically I set up an account on my cams/system that is a user only so it cannot change settings and then give it a plain text password ex: abcABC123. |
Actually, I was incorrect - I have just checked and the test camera I was using has alphanumeric only.
… On 19 Jan 2022, at 2:42 pm, GhostlyCrowd ***@***.***> wrote:
It does indeed
… <x-msg://6/#>
On 19 Jan 2022, at 2:34 pm, Keshav Varma @.***> wrote: Does your password or username happen to have special characters in it? — Reply to this email directly, view it on GitHub <#144 (comment) <#144 (comment)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUE5REZGAERWV72WQUNFZTUWYZ57ANCNFSM5LY3XPZA <https://github.com/notifications/unsubscribe-auth/ABUE5REZGAERWV72WQUNFZTUWYZ57ANCNFSM5LY3XPZA>. You are receiving this because you authored the thread.
the bash/sh system will hit a special character depending on what it is and end up dropping the full argument of the command.
the best work around is to remove and bangs, at's, astrix, or hashes from your password. Typically ! set up an account on my cams/system that is a user only so it cannot change settings and then give it a plain text password asbABC123.
—
Reply to this email directly, view it on GitHub <#144 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABUE5RAHTWRHGHJSXF2KPG3UWY2ZHANCNFSM5LY3XPZA>.
You are receiving this because you authored the thread.
|
can you take the output from the cam proxy specifically "spawning stream" and paste the ffmpeg argument in here. so we can see what the proxy is trying to run as a stream proxy. |
Thank you for looking at this. Let me know if you need verbose output
~ unifi-cam-proxy --ip “192.168.xx.103" --host “192.168.xx.107" --cert /Users/peckc/Documents/Coding/Ubiquity/certs/client.pem --token "CBLLy8xO3mjbtMf83Xm11bQCDNo9EX16" rtsp -s ***@***.***:554/videoMain"
2022-01-19 16:44:37 Penelope.local RTSPCam[45059] INFO Spawning stream for snapshots: ffmpeg -nostdin -y -re -rtsp_transport tcp -i ***@***.***:554/videoMain" -vf fps=1 -update 1 /var/folders/x9/vlq0wr9d7kn22c6_dq4pckbm0000gn/T/tmpf90j6yav/screen.jpg
2022-01-19 16:44:37 Penelope.local Core[45059] INFO Creating ws connection to wss://192.168.xx.107:7442/camera/1.0/ws?token=CBLLy8xO3mjbtMf83Xm11bQCDNo9EX16
2022-01-19 16:44:38 Penelope.local RTSPCam[45059] INFO Adopting with token [CBLLy8xO3mjbtMf83Xm11bQCDNo9EX16] and mac [AABBCCDDEEFF]
2022-01-19 16:44:38 Penelope.local RTSPCam[45059] INFO Processing [ubnt_avclient_hello] message
2022-01-19 16:44:38 Penelope.local RTSPCam[45059] INFO Processing [ubnt_avclient_hello] message
2022-01-19 16:44:38 Penelope.local RTSPCam[45059] INFO Processing [ubnt_avclient_paramAgreement] message
2022-01-19 16:44:38 Penelope.local RTSPCam[45059] INFO Processing [ubnt_avclient_paramAgreement] message
2022-01-19 16:44:38 Penelope.local RTSPCam[45059] INFO Processing [StopService] message
2022-01-19 16:44:38 Penelope.local RTSPCam[45059] INFO Processing [ChangeVideoSettings] message
2022-01-19 16:44:38 Penelope.local RTSPCam[45059] INFO Spawning ffmpeg for video1 (xj0YgG8l7jhCxhIP): ffmpeg -nostdin -y -stimeout 15000000 -rtsp_transport tcp -i ***@***.***:554/videoMain" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=xj0YgG8l7jhCxhIP -f flv - | ***@***.***/bin/python3.9 -m unifi.clock_sync | nc 192.168.xx.107 7550
2022-01-19 16:44:38 Penelope.local RTSPCam[45059] INFO Processing [ChangeVideoSettings] message
2022-01-19 16:44:38 Penelope.local RTSPCam[45059] INFO Spawning ffmpeg for video2 (5HGMH86d7B3h1mej): ffmpeg -nostdin -y -stimeout 15000000 -rtsp_transport tcp -i ***@***.***:554/videoMain" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=5HGMH86d7B3h1mej -f flv - | ***@***.***/bin/python3.9 -m unifi.clock_sync | nc 192.168.xx.107 7550
2022-01-19 16:44:38 Penelope.local RTSPCam[45059] INFO Processing [ChangeVideoSettings] message
2022-01-19 16:44:38 Penelope.local RTSPCam[45059] INFO Spawning ffmpeg for video3 (kn9cUPEgzd5Zizka): ffmpeg -nostdin -y -stimeout 15000000 -rtsp_transport tcp -i ***@***.***:554/videoMain" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=kn9cUPEgzd5Zizka -f flv - | ***@***.***/bin/python3.9 -m unifi.clock_sync | nc 192.168.xx.107 7550
2022-01-19 16:44:38 Penelope.local RTSPCam[45059] INFO Processing [UpdateFirmwareRequest] message
2022-01-19 16:44:38 Penelope.local RTSPCam[45059] INFO Reconnecting...
2022-01-19 16:44:38 Penelope.local RTSPCam[45059] INFO Cleaning up instance
2022-01-19 16:44:38 Penelope.local RTSPCam[45059] INFO Stopping stream video1
2022-01-19 16:44:38 Penelope.local RTSPCam[45059] INFO Stopping stream video2
2022-01-19 16:44:38 Penelope.local RTSPCam[45059] INFO Stopping stream video3
2022-01-19 16:44:38 Penelope.local Core[45059] INFO Backing off connect(...) for 2.0s (True)
2022-01-19 16:44:40 Penelope.local Core[45059] INFO Creating ws connection to wss://192.168.xx.107:7442/camera/1.0/ws?token=CBLLy8xO3mjbtMf83Xm11bQCDNo9EX16
2022-01-19 16:44:40 Penelope.local RTSPCam[45059] INFO Adopting with token [CBLLy8xO3mjbtMf83Xm11bQCDNo9EX16] and mac [AABBCCDDEEFF]
2022-01-19 16:44:40 Penelope.local RTSPCam[45059] INFO Processing [ubnt_avclient_hello] message
2022-01-19 16:44:40 Penelope.local RTSPCam[45059] INFO Processing [ubnt_avclient_hello] message
2022-01-19 16:44:41 Penelope.local RTSPCam[45059] INFO Processing [ubnt_avclient_paramAgreement] message
2022-01-19 16:44:41 Penelope.local RTSPCam[45059] INFO Processing [ubnt_avclient_paramAgreement] message
2022-01-19 16:44:41 Penelope.local RTSPCam[45059] INFO Processing [StopService] message
2022-01-19 16:44:41 Penelope.local RTSPCam[45059] INFO Processing [ChangeDeviceSettings] message
2022-01-19 16:44:41 Penelope.local RTSPCam[45059] INFO Processing [NetworkStatus] message
2022-01-19 16:44:41 Penelope.local RTSPCam[45059] INFO Processing [GetSystemStats] message
2022-01-19 16:44:41 Penelope.local RTSPCam[45059] INFO Processing [NetworkStatus] message
2022-01-19 16:44:41 Penelope.local RTSPCam[45059] INFO Processing [GetSystemStats] message
2022-01-19 16:44:46 Penelope.local RTSPCam[45059] INFO Processing [ChangeIspSettings] message
2022-01-19 16:44:46 Penelope.local RTSPCam[45059] INFO Processing [ChangeOsdSettings] message
2022-01-19 16:44:46 Penelope.local RTSPCam[45059] INFO Processing [ChangeSoundLedSettings] message
2022-01-19 16:44:46 Penelope.local RTSPCam[45059] INFO Processing [ChangeVideoSettings] message
2022-01-19 16:44:46 Penelope.local RTSPCam[45059] INFO Processing [ChangeSmartMotionSettings] message
2022-01-19 16:44:46 Penelope.local RTSPCam[45059] INFO Processing [EnableLogging] message
2022-01-19 16:44:46 Penelope.local RTSPCam[45059] INFO Processing [ChangeDeviceSettings] message
2022-01-19 16:44:46 Penelope.local RTSPCam[45059] INFO Processing [ChangeDeviceSettings] message
2022-01-19 16:44:46 Penelope.local RTSPCam[45059] INFO Processing [SmartMotionTest] message
2022-01-19 16:44:46 Penelope.local RTSPCam[45059] INFO Processing [ChangeVideoSettings] message
2022-01-19 16:44:46 Penelope.local RTSPCam[45059] INFO Processing [UpdateUsernamePassword] message
2022-01-19 16:44:46 Penelope.local RTSPCam[45059] INFO Processing [ChangeVideoSettings] message
2022-01-19 16:44:51 Penelope.local RTSPCam[45059] INFO Processing [NetworkStatus] message
2022-01-19 16:44:51 Penelope.local RTSPCam[45059] INFO Processing [GetSystemStats] message
2022-01-19 16:45:01 Penelope.local RTSPCam[45059] INFO Processing [NetworkStatus] message
2022-01-19 16:45:01 Penelope.local RTSPCam[45059] INFO Processing [GetSystemStats] message
… On 19 Jan 2022, at 2:49 pm, GhostlyCrowd ***@***.***> wrote:
Actually, I was incorrect - I have just checked and the test camera I was using has alphanumeric only.
… <x-msg://7/#>
On 19 Jan 2022, at 2:42 pm, GhostlyCrowd @.> wrote: It does indeed … x-msg://6/# On 19 Jan 2022, at 2:34 pm, Keshav Varma @.> wrote: Does your password or username happen to have special characters in it? — Reply to this email directly, view it on GitHub <#144 <#144> (comment) <#144 (comment) <#144 (comment)>>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUE5REZGAERWV72WQUNFZTUWYZ57ANCNFSM5LY3XPZA <https://github.com/notifications/unsubscribe-auth/ABUE5REZGAERWV72WQUNFZTUWYZ57ANCNFSM5LY3XPZA> https://github.com/notifications/unsubscribe-auth/ABUE5REZGAERWV72WQUNFZTUWYZ57ANCNFSM5LY3XPZA <https://github.com/notifications/unsubscribe-auth/ABUE5REZGAERWV72WQUNFZTUWYZ57ANCNFSM5LY3XPZA>. You are receiving this because you authored the thread. the bash/sh system will hit a special character depending on what it is and end up dropping the full argument of the command. the best work around is to remove and bangs, at's, astrix, or hashes from your password. Typically ! set up an account on my cams/system that is a user only so it cannot change settings and then give it a plain text password asbABC123. — Reply to this email directly, view it on GitHub <#144 (comment) <#144 (comment)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUE5RAHTWRHGHJSXF2KPG3UWY2ZHANCNFSM5LY3XPZA <https://github.com/notifications/unsubscribe-auth/ABUE5RAHTWRHGHJSXF2KPG3UWY2ZHANCNFSM5LY3XPZA>. You are receiving this because you authored the thread.
can you take the output from the cam proxy specifically "spawning stream" and paste the ffmpeg argument in here. so we can see what the proxy is trying to run as a stream proxy.
—
Reply to this email directly, view it on GitHub <#144 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABUE5RGLKDI4FRZU7JVSSCDUWY3WZANCNFSM5LY3XPZA>.
You are receiving this because you authored the thread.
|
youre pipe out to the clock sync looks mangled/wrong is that a fragment of editing? it should look similar to this |
Not sure what happened there. Correct output -
Spawning ffmpeg for video3 (kn9cUPEgzd5Zizka): ffmpeg -nostdin -y -stimeout 15000000 -rtsp_transport tcp -i ***@***.***:554/videoMain" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=kn9cUPEgzd5Zizka -f flv - | ***@***.***/bin/python3.9 -m unifi.clock_sync | nc 192.168.xx.107 7550
… On 20 Jan 2022, at 7:14 am, GhostlyCrowd ***@***.***> wrote:
ffmpeg -nostdin -y -stimeout 15000000 -rtsp_transport tcp -i ***@***.***:554/videoMain" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=xj0YgG8l7jhCxhIP -f flv - | ***@***.***/bin/python3.9 -m unifi.clock_sync | nc 192.168.xx.107 7550
youre pipe out to the clock sync looks mangled/wrong is that a fragment of editing?
—
Reply to this email directly, view it on GitHub <#144 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABUE5RBDDAGKC4MHNMJRRKLUW4PCVANCNFSM5LY3XPZA>.
You are receiving this because you authored the thread.
|
your rtsp link is mangled it should look like this example |
I think that was mangled in pasting. Correct output -
Spawning ffmpeg for video3 (kn9cUPEgzd5Zizka): ffmpeg -nostdin -y -stimeout 15000000 -rtsp_transport tcp -i ***@***.***:554/videoMain" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=kn9cUPEgzd5Zizka -f flv - | ***@***.***/bin/python3.9 -m unifi.clock_sync | nc 192.168.xx.107 7550
…Sent from my iPad
On 20 Jan 2022, at 2:44 pm, GhostlyCrowd ***@***.***> wrote:
your rtsp link is mangled it should look like this example ***@***.***:port/videoMain note the : between IP and port. it looks as though you're using a . instead, i have no idea who you have ***@***.***/bin/python3.9 it should be simply /bin/python3.9
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.
|
try the test stream see if it gives you anything replace your rtsp url in the command with |
Ok, 2022-01-24 13:38:35 Penelope.local RTSPCam[90835] INFO Spawning ffmpeg for video3 (kn9cUPEgzd5Zizka): ffmpeg -nostdin -y -stimeout 15000000 -rtsp_transport tcp -i "rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=kn9cUPEgzd5Zizka -f flv - | /usr/local/opt/python@3.9/bin/python3.9 -m unifi.clock_sync | nc 192.168..107 7550 |
Do you have netcat installed and no firewalls between the device running the proxy and the NVR? |
➜ ~ nc Nothing reported as being blocked anywhere |
Also I have run it on a different host (pi / ubuntu) rather than Mac, same results |
Can you try running this directly (replace the masked out IP with your original):
Based on the logs, I think you're probably hitting #55. Please try the docker image or downgrade ffmpeg for the moment and give it a go. |
~ ffmpeg -nostdin -y -stimeout 15000000 -rtsp_transport tcp -i "rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=xj0YgG8l7jhCxhIP -f flv - | /usr/local/opt/python@3.9/bin/python3.9 -m unifi.clock_sync | nc 192.168.xxx.107 7550 |
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. |
Describe the bug
No live video. Playback only using snapshots. Snapshots are hours behind in time (e.g. showing daytime snapshots at night)
Camera (please complete the following information):
Foscam HD IP Camera, ethernet connected
Additional context
Running under macOS natively (no docker)
2022-01-12 22:56:30 Penelope.local RTSPCam[24597] WARNING Snapshot file /var/folders/x9/vlq0wr9d7kn22c6_dq4pckbm0000gn/T/tmpu60s1xhe/screen.jpg is not ready yet, skipping upload 2022-01-12 22:56:37 Penelope.local RTSPCam[24597] INFO Processing [NetworkStatus] message 2022-01-12 22:56:37 Penelope.local RTSPCam[24597] INFO Processing [GetSystemStats] message 2022-01-12 22:56:45 Penelope.local RTSPCam[24597] INFO Processing [GetRequest] message 2022-01-12 22:56:45 Penelope.local RTSPCam[24597] WARNING Snapshot file /var/folders/x9/vlq0wr9d7kn22c6_dq4pckbm0000gn/T/tmpu60s1xhe/screen.jpg is not ready yet, skipping upload 2022-01-12 22:56:47 Penelope.local RTSPCam[24597] INFO Processing [NetworkStatus] message 2022-01-12 22:56:47 Penelope.local RTSPCam[24597] INFO Processing [GetSystemStats] message 2022-01-12 22:56:55 Penelope.local RTSPCam[24597] INFO Processing [GetRequest] message 2022-01-12 22:56:55 Penelope.local RTSPCam[24597] WARNING Snapshot file /var/folders/x9/vlq0wr9d7kn22c6_dq4pckbm0000gn/T/tmpu60s1xhe/screen.jpg is not ready yet, skipping upload
The text was updated successfully, but these errors were encountered: