How to download the latest thumbnail image from each camera?
danieledge opened this issue · 4 comments
I'm using the below python script (extract) to pull out the last two images from the cameras I have. I actually have 2 cameras, how would I extract the latest image from each camera?
Thanks!
cam = arlo.cameras[0]
printing camera attributes
#cam.serial_number
cam.model_id
cam.unseen_videos
load Arlo videos directly
from pyarlo.media import ArloMediaLibrary
library = ArloMediaLibrary(arlo, days=1)
len(library.videos)
showing a video properties
media = library.videos[0]
displaying thumbnail to stdout
media.download_thumbnail('/home/parallels/arlo/output.jpg')
media = library.videos[1]
media.download_thumbnail('/home/parallels/arlo/output2.jpg')
Hello,
Once you have the arlo object you can download it by executing:
cam = arlo.cameras[0]
cam.last_video.download_thumbnail('/tmp/sample.jpg')
@danieledge did it work for you?
closing this issue for now. @danieledge if you need help, please let us know.
I have probably the same question, problem. I am able to get the latest thumbnail
But subsequent iterations of the loop keep giving me the same thumbnail. The image never refreshes.
If I add the PyArlo instantiation, I will get a fresh image. Do I need to do that?
cam = arlo.cameras[0]
while 1:
timestr = time.strftime("%Y%m%d-%H%M%S")
fname = "/Users/myusername/python/my-thumb/cam2_{}.jpg".format(timestr)
cam.last_video.download_thumbnail(fname)
print("Retrieved thumbnail at " + timestr)
cam.update()
time.sleep(30)