8000 local storage issue · Issue #1 · roger-/blinkbridge · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

local storage issue #1

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

Open
markwoodward86 opened this issue Jan 9, 2025 · 9 comments
Open

local storage issue #1

markwoodward86 opened this issue Jan 9, 2025 · 9 comments

Comments

@markwoodward86
Copy link
markwoodward86 commented Jan 9, 2025

Thank you for your repo and the offer to review my issue.

I activated cloud subscription for one camera to test (Driveway) and confirm that this now works but Backyard still gets the same error as before. This is the camera still on local storage only.

blinkbridge-1 | [02:40:22] INFO enabled cameras: {'Driveway', 'Backyard'} main.py:60
blinkbridge-1 | INFO Driveway: starting stream server main.py:29
blinkbridge-1 | [02:40:23] INFO Driveway: stream ready at stream_server.py:120
blinkbridge-1 | rtsp://mediamtx:8554/driveway
blinkbridge-1 | WARNING Backyard: no clips found for camera blink.py:83
blinkbridge-1 | INFO Backyard: starting stream server main.py:29
blinkbridge-1 | Exception in thread Thread-2 (_run):
blinkbridge-1 | Traceback (most recent call last):
blinkbridge-1 | File "/usr/local/lib/python3.13/threading.py", line 1041, in _bootstrap_inner
blinkbridge-1 | self.run()
blinkbridge-1 | ~~~~~~~~^^
blinkbridge-1 | File "/usr/local/lib/python3.13/threading.py", line 992, in run
blinkbridge-1 | self._target(*self._args, **self._kwargs)
blinkbridge-1 | ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
blinkbridge-1 | File "/app/blinkbridge/ffmpeg.py", line 122, in _run
blinkbridge-1 | lfg = VideoToLastFrame(file_name_input_video, still_image_file_name) # run in background
blinkbridge-1 | File "/app/blinkbridge/ffmpeg.py", line 57, in init
blinkbridge-1 | self.process = subprocess.Popen(ffmpeg_params, stdout=sys.stdout, stderr=subprocess.PIPE)
blinkbridge-1 | ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
blinkbridge-1 | File "/usr/local/lib/python3.13/subprocess.py", line 1036, in init
blinkbridge-1 | self._execute_child(args, executable, preexec_fn, close_fds,
blinkbridge-1 | ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
blinkbridge-1 | pass_fds, cwd, env,
blinkbridge-1 | ^^^^^^^^^^^^^^^^^^^
blinkbridge-1 | ...<5 lines>...
blinkbridge-1 | gid, gids, uid, umask,
blinkbridge-1 | ^^^^^^^^^^^^^^^^^^^^^^
blinkbridge-1 | start_new_session, process_group)
blinkbridge-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
blinkbridge-1 | File "/usr/local/lib/python3.13/subprocess.py", line 1896, in _execute_child
blinkbridge-1 | self.pid = _fork_exec(
blinkbridge-1 | ~~~~~~~~~~^
blinkbridge-1 | args, executable_list,
blinkbridge-1 | ^^^^^^^^^^^^^^^^^^^^^^
blinkbridge-1 | ...<6 lines>...
blinkbridge-1 | process_group, gid, gids, uid, umask,
blinkbridge-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
blinkbridge-1 | preexec_fn, _USE_VFORK)
blinkbridge-1 | ^^^^^^^^^^^^^^^^^^^^^^^
blinkbridge-1 | TypeError: expected str, bytes or os.PathLike object, not NoneType
blinkbridge-1 | INFO Backyard: stream ready at stream_server.py:120
blinkbridge-1 | rtsp://mediamtx:8554/backyard
blinkbridge-1 | INFO monitoring cameras for motion main.py:71
blinkbridge-1 | [concat @ 0x71c76182a800] Impossible to open '/working/backyard_still_2025-01-09_02-40-23-117457.mp4'
blinkbridge-1 | [concat @ 0x71c761b3a600] Impossible to open '/working/backyard_next.concat'
blinkbridge-1 | [in#0 @ 0x71c75d67b940] Error opening input: No such file or directory
blinkbridge-1 | Error opening input file /working/backyard.concat.
blinkbridge-1 | Error opening input files: No such file or directory
mediamtx | 2025/01/09 02:40:23 INF [RTSP] [conn 172.21.0.2:46460] opened
mediamtx | 2025/01/09 02:40:23 INF [RTSP] [session 1d82d23a] created by 172.21.0.2:46460
mediamtx | 2025/01/09 02:40:23 INF [RTSP] [session 1d82d23a] is publishing to path 'driveway', 2 tracks (H264, MPEG-4 Audio)
blinkbridge-1 | [02:40:27] WARNING Backyard: server failed 1 time(s) main.py:92
blinkbridge-1 | [02:40:28] WARNING Backyard: server failed 1 time(s) main.py:92
blinkbridge-1 | [02:40:30] WARNING Backyard: server failed 1 time(s) main.py:92
blinkbridge-1 | [02:40:32] WARNING Backyard: server failed 1 time(s) main.py:92

@roger-
Copy link
Owner
roger- commented Jan 9, 2025

Looks like we aren't able to get a previous clip from the Backyard camera, which is needed to start the stream. The missing clip causes ffmpeg to crash (I need more error checking too). I assume that camera has at least one previous motion clip?

Can you set logging to DEBUG and post another log? I need to figure out how to get the previous (and future) motion clips from a local camera.

@markwoodward86
Copy link
Author

No problem. I confirm that I have motion clips saved locally for Backyard, yes. I ejected and reseated the USB for good measure and unplugged/reseated the sync 2 module. I confirm it is accessible from the internet aswell.

Debug log below:

blinkbridge-1 | [12:47:53] DEBUG logging into Blink with saved creds blink.py:52
blinkbridge-1 | [12:47:55] DEBUG refreshing video metadata blink.py:62
blinkbridge-1 | INFO enabled cameras: {'Driveway', 'Backyard'} main.py:60
blinkbridge-1 | DEBUG Driveway: getting latest clip main.py:26
blinkbridge-1 | DEBUG Driveway: skipping download, blink.py:75
blinkbridge-1 | /working/driveway_latest.mp4 exists
blinkbridge-1 | INFO Driveway: starting stream server main.py:29
blinkbridge-1 | DEBUG Driveway: starting server with stream_server.py:115
blinkbridge-1 | /working/driveway_latest.mp4
blinkbridge-1 | DEBUG Driveway: making concat file stream_server.py:48
blinkbridge-1 | DEBUG Driveway: starting creating next still stream_server.py:84
blinkbridge-1 | video
blinkbridge-1 | /working/driveway_still_2025-01-09_12-47
blinkbridge-1 | -55-414133.mp4
blinkbridge-1 | DEBUG Driveway: waiting for still video stream_server.py:95
blinkbridge-1 | creation to finish
blinkbridge-1 | DEBUG Driveway: enqueueing stream_server.py:63
blinkbridge-1 | /working/driveway_still_2025-01-09_12-47
blinkbridge-1 | -55-414133.mp4
blinkbridge-1 | INFO Driveway: stream ready at stream_server.py:120
blinkbridge-1 | rtsp://mediamtx:8554/driveway
blinkbridge-1 | DEBUG Backyard: getting latest clip main.py:26
blinkbridge-1 | WARNING Backyard: no clips found for camera blink.py:83
blinkbridge-1 | INFO Backyard: starting stream server main.py:29
blinkbridge-1 | DEBUG Backyard: starting server with None stream_server.py:115
blinkbridge-1 | DEBUG Backyard: making concat file stream_server.py:48
blinkbridge-1 | DEBUG Backyard: starting creating next still stream_server.py:84
blinkbridge-1 | video
blinkbridge-1 | /working/backyard_still_2025-01-09_12-47
blinkbridge-1 | -55-966229.mp4
blinkbridge-1 | Exception in thread Thread-2 (_run):
blinkbridge-1 | DEBUG Backyard: waiting for still video stream_server.py:95
blinkbridge-1 | creation to finish
blinkbridge-1 | Traceback (most recent call last):
blinkbridge-1 | File "/usr/local/lib/python3.13/threading.py", line 1041, in _bootstrap_inner
blinkbridge-1 | self.run()
blinkbridge-1 | ~~~~~~~~^^
blinkbridge-1 | File "/usr/local/lib/python3.13/threading.py", line 992, in run
blinkbridge-1 | self._target(*self._args, **self._kwargs)
blinkbridge-1 | ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
blinkbridge-1 | File "/app/blinkbridge/ffmpeg.py", line 122, in _run
blinkbridge-1 | lfg = VideoToLastFrame(file_name_input_video, still_image_file_name) # run in background
blinkbridge-1 | File "/app/blinkbridge/ffmpeg.py", line 57, in init
blinkbridge-1 | self.process = subprocess.Popen(ffmpeg_params, stdout=sys.stdout, stderr=subprocess.PIPE)
blinkbridge-1 | ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
blinkbridge-1 | File "/usr/local/lib/python3.13/subprocess.py", line 1036, in init
blinkbridge-1 | self._execute_child(args, executable, preexec_fn, close_fds,
blinkbridge-1 | ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
blinkbridge-1 | pass_fds, cwd, env,
blinkbridge-1 | ^^^^^^^^^^^^^^^^^^^
blinkbridge-1 | ...<5 lines>...
blinkbridge-1 | gid, gids, uid, umask,
blinkbridge-1 | ^^^^^^^^^^^^^^^^^^^^^^
blinkbridge-1 | start_new_session, process_group)
blinkbridge-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
blinkbridge-1 | File "/usr/local/lib/python3.13/subprocess.py", line 1896, in _execute_child
blinkbridge-1 | self.pid = _fork_exec(
blinkbridge-1 | ~~~~~~~~~~^
blinkbridge-1 | args, executable_list,
blinkbridge-1 | ^^^^^^^^^^^^^^^^^^^^^^
blinkbridge-1 | ...<6 lines>...
blinkbridge-1 | process_group, gid, gids, uid, umask,
blinkbridge-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
blinkbridge-1 | preexec_fn, _USE_VFORK)
blinkbridge-1 | ^^^^^^^^^^^^^^^^^^^^^^^
blinkbridge-1 | TypeError: expected str, bytes or os.PathLike object, not NoneType
blinkbridge-1 | DEBUG Backyard: enqueueing stream_server.py:63
blinkbridge-1 | /working/backyard_still_2025-01-09_12-47
blinkbridge-1 | -55-966229.mp4
blinkbridge-1 | INFO Backyard: stream ready at stream_server.py:120
blinkbridge-1 | rtsp://mediamtx:8554/backyard
blinkbridge-1 | INFO monitoring cameras for motion main.py:71
blinkbridge-1 | [concat @ 0x7c0b85517800] Impossible to open '/working/backyard_still_2025-01-09_12-47-55-966229.mp4'
blinkbridge-1 | [concat @ 0x7c0b85827600] Impossible to open '/working/backyard_next.concat'
blinkbridge-1 | [in#0 @ 0x7c0b81368940] Error opening input: No such file or directory
blinkbridge-1 | Error opening input file /working/backyard.concat.
blinkbridge-1 | Error opening input files: No such file or directory
mediamtx | 2025/01/09 12:47:56 INF [RTSP] [conn 172.21.0.2:35252] opened
mediamtx | 2025/01/09 12:47:56 INF [RTSP] [session 9fd7af57] created by 172.21.0.2:35252
mediamtx | 2025/01/09 12:47:56 INF [RTSP] [session 9fd7af57] is publishing to path 'driveway', 2 tracks (H264, MPEG-4 Audio)
blinkbridge-1 | [12:48:01] WARNING Backyard: server failed 1 time(s) main.py:92
blinkbridge-1 | [12:48:02] WARNING Backyard: server failed 1 time(s) main.py:92
blinkbridge-1 | [12:48:04] WARNING Backyard: server failed 1 time(s) main.py:92
blinkbridge-1 | [12:48:06] WARNING Backyard: server failed 1 time(s) main.py:92

@roger-
Copy link
Owner
roger- commented Jan 9, 2025

The problem is around here with downloading the latest clip:

media = next((m for m in self.metadata if m['device_name'] == camera_name

I’ll need to dig a bit and see if there’s a different API for local videos.

Do you have Blink working in Home Assistant? Are you running this bridge with Docker?

@roger-
Copy link
Owner
roger- commented Jan 9, 2025

As a work around you can copy a video here: /working/backyard_latest.mp4

Adjust for docker mounts.

@markwoodward86
Copy link
Author

I do have Blink in Home Assistant, yes. I am running this bridge with docker inside of an unprivileged Debian Proxmox LXC.

Thank you for the workaround, i'll import something there to get the bridge up and running and can focus in the frigate config for a little bit.

@markwoodward86
Copy link
Author

Update on my part:

As mentioned, i had subscribed to cloud on just the driveway camera to test. I also uploaded a file to the path specified for the backyard just to get it up and running.

Since then i cancelled my blink subscription and confirmed that it has ended. However, the blinkbridge continues to update (and also in frigate that ive since connected). I confirm that the files are located on my local storage and not cloud.

No other changes have been made to my running blinkbridge nor my blink equipment/subscription.

@roger-
Copy link
Owner
roger- commented Jan 27, 2025

Thanks for the update, glad to hear you've been having some luck with it.

Have you restarted blinkbridge since canceling your subscription? Or perhaps it hasn't ended yet. You should be okay once the XXX_latest.mp4 clips exist for your cameras.

I suspect the issue is related to downloading the historical videos, but it's hard to figure it out since I don't have a local storage Blink system.

@markwoodward86
Copy link
Author

My subscription ended a while back and this kept working (and updating) til i rebooted the container. I then needed to go and add a new xxx_latest.mp4 in to the directory manually but once i did the blinkbridge started running again just fine.

@soto345
Copy link
soto345 commented Apr 11, 2025

I'm currently having the same issue as above. I have added an mp4 named: front_door_latest.mp4 kitchen_latest.mp4 lr_couch_latest.mp4 to /working however the errors persist after restarting the docker. Is there anything else I can try?:

blinkbridge-1 | [concat @ 0x7aa0b5c75800] Impossible to open '/working/front_door_still_2025-04-11_18-53-44-680388.mp4'
blinkbridge-1 | [concat @ 0x7aa0b5f85600] Impossible to open '/working/front_door_next.concat'
blinkbridge-1 | [in#0 @ 0x7aa0b1ac6940] Error opening input: No such file or directory
blinkbridge-1 | Error opening input file /working/front_door.concat.
blinkbridge-1 | Error opening input files: No such file or directory
blinkbridge-1 | [18:53:50] WARNING Kitchen: server failed 1 time(s) main.py:92
blinkbrid 5B04 ge-1 | WARNING LR Couch: server failed 1 time(s) main.py:92
blinkbridge-1 | WARNING Front Door: server failed 1 time(s) main.py:92

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

No branches or pull requests

3 participants
0