This video has been remixed from Chichi Live Camera photos by Python + OpenCV + Visual Studio Code on mac.
import os import time import datetime import urllib.error import urllib.request import cv2 def download_file(url, dst_path): try: with urllib.request.urlopen(url) as web_file: data = web_file.read() with open(dst_path, mode='wb') as local_file: local_file.write(data) except urllib.error.URLError as e: print(e) fourcc = cv2.VideoWriter_fourcc(* 'h264') fps = 10 out = cv2.VideoWriter('out.mp4', fourcc, fps, (H,V)) startTime = datetime.datetime(yyyy, mm, dd, HH, MM, SS) x = duration for interval in range(x): t = startTime + datetime.timedelta(minutes=interval) print(datetime.datetime.strftime(t, "/%Y%m%d/%H%M%S.jpg")) tstr = datetime.datetime.strftime(t, "/%Y%m%d/%H%M%S.jpg") url = 'https://*********' + tstr dst_path = datetime.datetime.strftime(t, "images/%Y%m%d%H%M%S.jpg") if os.path.exists(dst_path): print("skip") else: download_file(url, dst_path) time.sleep(10) # Don't rush to img = cv2.imread(dst_path, cv2.IMREAD_COLOR) # 画像の大きさを取得 # height, width, channels = img.shape[:3] # print("width: " + str(width)) # print("height: " + str(height)) out.write(img) out.release()
Chichibu Live Camera
You can find out beautiful photos of Chichibu Live camera from here.
https://navi.city.chichibu.lg.jp/cloudview/
Anohana: The Flower We Saw That Day
Chichibu is also famous for the animation “Anohana: The Flower We Saw That Day“. It was on air in 2011, but still may anime fans are visiting Chichibu, the place of anime scenes.