Need to add more camera streams to the code
karanveersingh5623 opened this issue · comments
Hi , How can we add more simultaneous camera streams or video playback streams to the environment?
In gears.py , the camera:0 is hardcoded. How can we handle multiple cameras when executing gears.py through redis gears in init.py .
The stream reader can register to prefix of streams so instead register("camera:0")
you can do register(prefix="camera:*")
. This way the image analysis code will be triggered for each stream with the prefix camera:
Thanks for the info buddy but its throwing exception with prefix .... check the below trace . Any way forward .
Jamess-Mac-Pro:Redisai_edgeAnalytics_old karanveer$ docker logs 74b9038b5bbd
Loading model - b'OK'
Loading script - b'OK'
Creating timeseries keys and downsampling rules - [b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK']
Traceback (most recent call last):
File "init.py", line 70, in
res = conn.execute_command('RG.PYEXECUTE', gear)
File "/usr/local/lib/python3.7/site-packages/redis/client.py", line 775, in execute_command
return self.parse_response(connection, command_name, **options)
File "/usr/local/lib/python3.7/site-packages/redis/client.py", line 789, in parse_response
response = connection.read_response()
File "/usr/local/lib/python3.7/site-packages/redis/connection.py", line 642, in read_response
raise response
redis.exceptions.ResponseError: deco() got an unexpected keyword argument 'prefix'
Loading gear - Jamess-Mac-Pro:Redisai_edgeAnalytics_old karanveer$
`
Seems like a very old version of RedisGears, try to pass it without a named argument like register("camera:*")
Did that as well , no exceptions but nothing shows up in grafana like boxes and people counting , it streams a plain video
do we need to change anything in def storeResults(x) , there are multiple entries for camera:0
Can you share the output of RG.DUMPREGISTRATIONS? Also can you share the RedisGears version you are using?
We have discord for instant messaging, maybe it will be easier to chat there? https://discord.com/invite/6yaVTtp
pinged you as karanveer