diff --git a/Convention Centre East/image0001.jpg b/Convention Centre East/image0001.jpg new file mode 100644 index 0000000..9ff79bb Binary files /dev/null and b/Convention Centre East/image0001.jpg differ diff --git a/Convention Centre East/image0002.jpg b/Convention Centre East/image0002.jpg new file mode 100644 index 0000000..2fd58b6 Binary files /dev/null and b/Convention Centre East/image0002.jpg differ diff --git a/Convention Centre East/image0003.jpg b/Convention Centre East/image0003.jpg new file mode 100644 index 0000000..9cff7dc Binary files /dev/null and b/Convention Centre East/image0003.jpg differ diff --git a/Convention Centre East/image0004.jpg b/Convention Centre East/image0004.jpg new file mode 100644 index 0000000..de5159e Binary files /dev/null and b/Convention Centre East/image0004.jpg differ diff --git a/Convention Centre East/image0005.jpg b/Convention Centre East/image0005.jpg new file mode 100644 index 0000000..6e220e4 Binary files /dev/null and b/Convention Centre East/image0005.jpg differ diff --git a/Convention Centre East/image0006.jpg b/Convention Centre East/image0006.jpg new file mode 100644 index 0000000..e65e051 Binary files /dev/null and b/Convention Centre East/image0006.jpg differ diff --git a/Convention Centre East/image0007.jpg b/Convention Centre East/image0007.jpg new file mode 100644 index 0000000..2c11686 Binary files /dev/null and b/Convention Centre East/image0007.jpg differ diff --git a/Convention Centre East/image0008.jpg b/Convention Centre East/image0008.jpg new file mode 100644 index 0000000..1502c62 Binary files /dev/null and b/Convention Centre East/image0008.jpg differ diff --git a/Convention Centre East/image0009.jpg b/Convention Centre East/image0009.jpg new file mode 100644 index 0000000..eb386dc Binary files /dev/null and b/Convention Centre East/image0009.jpg differ diff --git a/Convention Centre East/image0010.jpg b/Convention Centre East/image0010.jpg new file mode 100644 index 0000000..6e343c7 Binary files /dev/null and b/Convention Centre East/image0010.jpg differ diff --git a/Convention Centre East/image0011.jpg b/Convention Centre East/image0011.jpg new file mode 100644 index 0000000..c128a1a Binary files /dev/null and b/Convention Centre East/image0011.jpg differ diff --git a/Convention Centre East/image0012.jpg b/Convention Centre East/image0012.jpg new file mode 100644 index 0000000..2eea0ef Binary files /dev/null and b/Convention Centre East/image0012.jpg differ diff --git a/Convention Centre East/image0013.jpg b/Convention Centre East/image0013.jpg new file mode 100644 index 0000000..4fc5b1d Binary files /dev/null and b/Convention Centre East/image0013.jpg differ diff --git a/Convention Centre East/image0014.jpg b/Convention Centre East/image0014.jpg new file mode 100644 index 0000000..f382717 Binary files /dev/null and b/Convention Centre East/image0014.jpg differ diff --git a/Convention Centre East/image0015.jpg b/Convention Centre East/image0015.jpg new file mode 100644 index 0000000..581a5e2 Binary files /dev/null and b/Convention Centre East/image0015.jpg differ diff --git a/Convention Centre East/image0016.jpg b/Convention Centre East/image0016.jpg new file mode 100644 index 0000000..5d31eac Binary files /dev/null and b/Convention Centre East/image0016.jpg differ diff --git a/Convention Centre East/image0017.jpg b/Convention Centre East/image0017.jpg new file mode 100644 index 0000000..4412a22 Binary files /dev/null and b/Convention Centre East/image0017.jpg differ diff --git a/Convention Centre East/image0018.jpg b/Convention Centre East/image0018.jpg new file mode 100644 index 0000000..c8c5a95 Binary files /dev/null and b/Convention Centre East/image0018.jpg differ diff --git a/Convention Centre East/image0019.jpg b/Convention Centre East/image0019.jpg new file mode 100644 index 0000000..c7f5f6f Binary files /dev/null and b/Convention Centre East/image0019.jpg differ diff --git a/Convention Centre East/image0020.jpg b/Convention Centre East/image0020.jpg new file mode 100644 index 0000000..029f063 Binary files /dev/null and b/Convention Centre East/image0020.jpg differ diff --git a/Convention Centre East/image0021.jpg b/Convention Centre East/image0021.jpg new file mode 100644 index 0000000..88bf56c Binary files /dev/null and b/Convention Centre East/image0021.jpg differ diff --git a/Convention Centre East/image0022.jpg b/Convention Centre East/image0022.jpg new file mode 100644 index 0000000..5141122 Binary files /dev/null and b/Convention Centre East/image0022.jpg differ diff --git a/Convention Centre East/image0023.jpg b/Convention Centre East/image0023.jpg new file mode 100644 index 0000000..afc3898 Binary files /dev/null and b/Convention Centre East/image0023.jpg differ diff --git a/Convention Centre East/image0024.jpg b/Convention Centre East/image0024.jpg new file mode 100644 index 0000000..6d38d7a Binary files /dev/null and b/Convention Centre East/image0024.jpg differ diff --git a/Convention Centre East/image0025.jpg b/Convention Centre East/image0025.jpg new file mode 100644 index 0000000..6d6cdff Binary files /dev/null and b/Convention Centre East/image0025.jpg differ diff --git a/Convention Centre East/image0026.jpg b/Convention Centre East/image0026.jpg new file mode 100644 index 0000000..e267769 Binary files /dev/null and b/Convention Centre East/image0026.jpg differ diff --git a/Convention Centre East/image0027.jpg b/Convention Centre East/image0027.jpg new file mode 100644 index 0000000..c19efe2 Binary files /dev/null and b/Convention Centre East/image0027.jpg differ diff --git a/Convention Centre East/image0028.jpg b/Convention Centre East/image0028.jpg new file mode 100644 index 0000000..175aa55 Binary files /dev/null and b/Convention Centre East/image0028.jpg differ diff --git a/Convention Centre East/image0029.jpg b/Convention Centre East/image0029.jpg new file mode 100644 index 0000000..6af2bfb Binary files /dev/null and b/Convention Centre East/image0029.jpg differ diff --git a/Convention Centre East/image0030.jpg b/Convention Centre East/image0030.jpg new file mode 100644 index 0000000..14511f9 Binary files /dev/null and b/Convention Centre East/image0030.jpg differ diff --git a/Convention Centre East/image0031.jpg b/Convention Centre East/image0031.jpg new file mode 100644 index 0000000..70164fa Binary files /dev/null and b/Convention Centre East/image0031.jpg differ diff --git a/Convention Centre East/image0032.jpg b/Convention Centre East/image0032.jpg new file mode 100644 index 0000000..a92c475 Binary files /dev/null and b/Convention Centre East/image0032.jpg differ diff --git a/Convention Centre East/image0033.jpg b/Convention Centre East/image0033.jpg new file mode 100644 index 0000000..e02b412 Binary files /dev/null and b/Convention Centre East/image0033.jpg differ diff --git a/Convention Centre East/image0034.jpg b/Convention Centre East/image0034.jpg new file mode 100644 index 0000000..9e62353 Binary files /dev/null and b/Convention Centre East/image0034.jpg differ diff --git a/Convention Centre East/image0035.jpg b/Convention Centre East/image0035.jpg new file mode 100644 index 0000000..3ccb34b Binary files /dev/null and b/Convention Centre East/image0035.jpg differ diff --git a/Convention Centre East/image0036.jpg b/Convention Centre East/image0036.jpg new file mode 100644 index 0000000..f867a3f Binary files /dev/null and b/Convention Centre East/image0036.jpg differ diff --git a/Convention Centre East/image0037.jpg b/Convention Centre East/image0037.jpg new file mode 100644 index 0000000..6289270 Binary files /dev/null and b/Convention Centre East/image0037.jpg differ diff --git a/Convention Centre East/image0038.jpg b/Convention Centre East/image0038.jpg new file mode 100644 index 0000000..4a5a58e Binary files /dev/null and b/Convention Centre East/image0038.jpg differ diff --git a/Convention Centre East/image0039.jpg b/Convention Centre East/image0039.jpg new file mode 100644 index 0000000..3aecc72 Binary files /dev/null and b/Convention Centre East/image0039.jpg differ diff --git a/Convention Centre East/image0040.jpg b/Convention Centre East/image0040.jpg new file mode 100644 index 0000000..bdd750e Binary files /dev/null and b/Convention Centre East/image0040.jpg differ diff --git a/Convention Centre East/image0041.jpg b/Convention Centre East/image0041.jpg new file mode 100644 index 0000000..c97862e Binary files /dev/null and b/Convention Centre East/image0041.jpg differ diff --git a/Convention Centre East/image0042.jpg b/Convention Centre East/image0042.jpg new file mode 100644 index 0000000..d57c913 Binary files /dev/null and b/Convention Centre East/image0042.jpg differ diff --git a/Convention Centre East/image0043.jpg b/Convention Centre East/image0043.jpg new file mode 100644 index 0000000..9b21b84 Binary files /dev/null and b/Convention Centre East/image0043.jpg differ diff --git a/Convention Centre East/image0044.jpg b/Convention Centre East/image0044.jpg new file mode 100644 index 0000000..0074499 Binary files /dev/null and b/Convention Centre East/image0044.jpg differ diff --git a/Convention Centre East/image0045.jpg b/Convention Centre East/image0045.jpg new file mode 100644 index 0000000..9a2b55b Binary files /dev/null and b/Convention Centre East/image0045.jpg differ diff --git a/Convention Centre East/image0046.jpg b/Convention Centre East/image0046.jpg new file mode 100644 index 0000000..a33c8e6 Binary files /dev/null and b/Convention Centre East/image0046.jpg differ diff --git a/Convention Centre East/image0047.jpg b/Convention Centre East/image0047.jpg new file mode 100644 index 0000000..f36aaf1 Binary files /dev/null and b/Convention Centre East/image0047.jpg differ diff --git a/Convention Centre East/image0048.jpg b/Convention Centre East/image0048.jpg new file mode 100644 index 0000000..ac45a37 Binary files /dev/null and b/Convention Centre East/image0048.jpg differ diff --git a/Convention Centre East/image0049.jpg b/Convention Centre East/image0049.jpg new file mode 100644 index 0000000..be3b89d Binary files /dev/null and b/Convention Centre East/image0049.jpg differ diff --git a/Convention Centre East/image0050.jpg b/Convention Centre East/image0050.jpg new file mode 100644 index 0000000..7093fc2 Binary files /dev/null and b/Convention Centre East/image0050.jpg differ diff --git a/Convention Centre East/image0051.jpg b/Convention Centre East/image0051.jpg new file mode 100644 index 0000000..87a2048 Binary files /dev/null and b/Convention Centre East/image0051.jpg differ diff --git a/Convention Centre East/image0052.jpg b/Convention Centre East/image0052.jpg new file mode 100644 index 0000000..3cf10e1 Binary files /dev/null and b/Convention Centre East/image0052.jpg differ diff --git a/Convention Centre East/image0053.jpg b/Convention Centre East/image0053.jpg new file mode 100644 index 0000000..39d09a6 Binary files /dev/null and b/Convention Centre East/image0053.jpg differ diff --git a/Convention Centre East/image0054.jpg b/Convention Centre East/image0054.jpg new file mode 100644 index 0000000..381b3ab Binary files /dev/null and b/Convention Centre East/image0054.jpg differ diff --git a/Convention Centre East/image0055.jpg b/Convention Centre East/image0055.jpg new file mode 100644 index 0000000..76bfb59 Binary files /dev/null and b/Convention Centre East/image0055.jpg differ diff --git a/Convention Centre East/image0056.jpg b/Convention Centre East/image0056.jpg new file mode 100644 index 0000000..4cb1c76 Binary files /dev/null and b/Convention Centre East/image0056.jpg differ diff --git a/Convention Centre East/image0057.jpg b/Convention Centre East/image0057.jpg new file mode 100644 index 0000000..b3b9dd5 Binary files /dev/null and b/Convention Centre East/image0057.jpg differ diff --git a/Convention Centre East/image0058.jpg b/Convention Centre East/image0058.jpg new file mode 100644 index 0000000..4eb983d Binary files /dev/null and b/Convention Centre East/image0058.jpg differ diff --git a/Convention Centre East/image0059.jpg b/Convention Centre East/image0059.jpg new file mode 100644 index 0000000..716eced Binary files /dev/null and b/Convention Centre East/image0059.jpg differ diff --git a/Convention Centre East/image0060.jpg b/Convention Centre East/image0060.jpg new file mode 100644 index 0000000..ae42d99 Binary files /dev/null and b/Convention Centre East/image0060.jpg differ diff --git a/Convention Centre East/image0061.jpg b/Convention Centre East/image0061.jpg new file mode 100644 index 0000000..787c284 Binary files /dev/null and b/Convention Centre East/image0061.jpg differ diff --git a/Convention Centre East/image0062.jpg b/Convention Centre East/image0062.jpg new file mode 100644 index 0000000..4b0ca8e Binary files /dev/null and b/Convention Centre East/image0062.jpg differ diff --git a/Convention Centre East/image0063.jpg b/Convention Centre East/image0063.jpg new file mode 100644 index 0000000..1edeaa9 Binary files /dev/null and b/Convention Centre East/image0063.jpg differ diff --git a/Convention Centre East/image0064.jpg b/Convention Centre East/image0064.jpg new file mode 100644 index 0000000..ad397fa Binary files /dev/null and b/Convention Centre East/image0064.jpg differ diff --git a/Convention Centre East/image0065.jpg b/Convention Centre East/image0065.jpg new file mode 100644 index 0000000..e76f07a Binary files /dev/null and b/Convention Centre East/image0065.jpg differ diff --git a/Convention Centre East/image0066.jpg b/Convention Centre East/image0066.jpg new file mode 100644 index 0000000..1d67f7f Binary files /dev/null and b/Convention Centre East/image0066.jpg differ diff --git a/python-webrequest.txt b/python-webrequest.txt index 7f71674..6082f76 100644 --- a/python-webrequest.txt +++ b/python-webrequest.txt @@ -10,6 +10,8 @@ headerz = {'Accept' : 'image/avif,image/webp,image/png,image/svg+xml,image/*;q=0 'https://www.portvancouver.com/' } milliseconds = int(time() * 1000) + + x1 = requests.Response() x2 = requests.Response() x3 = requests.Response() @@ -29,29 +31,33 @@ x16 = requests.Response() x17 = requests.Response() x18 = requests.Response() x19 = requests.Response() +x20 = requests.Response() +astr = ["Hi!"] * 21 -str1 = "https://ehub.portvancouver.com/Webcams/Photos/CommOver?" -str2 = "https://ehub.portvancouver.com/webcams/Photos/DPWExitWest?" -str3 = "https://ehub.portvancouver.com/Webcams/Photos/CentermMainGates?" -str4 = "https://ehub.portvancouver.com/Webcams/Photos/VantermEntrance?" -str5 = "https://ehub.portvancouver.com/Webcams/Photos/VantermGates?" -str6 = "https://ehub.portvancouver.com/Webcams/Photos/ClarkEntrance?" -str7 = "https://ehub.portvancouver.com/Webcams/Photos/ColumbiaContainerCrossing?" -str8 = "https://ehub.portvancouver.com/webcams/Photos/TerminalDock?" -str9 = "https://ehub.portvancouver.com/Webcams/Photos/CommEntrance?" -str10 = "https://ehub.portvancouver.com/Webcams/Photos/CommOverMcGill?" -str11 = "https://ehub.portvancouver.com/Webcams/Photos/CameraDP_FS1?" -str12 = "https://ehub.portvancouver.com/Webcams/Photos/DeltaportGate1?" -str13 = "https://ehub.portvancouver.com/Webcams/Photos/DMSWest?" -str14 = "https://ehub.portvancouver.com/Webcams/Photos/FSMainIntersection?" -str15 = "https://ehub.portvancouver.com/Webcams/Photos/FSTruckInGate?" -str16 = "https://ehub.portvancouver.com/Webcams/Photos/FSVACSGates?" -str17 = "https://ehub.portvancouver.com/Webcams/Photos/FS5TrackCrossing?" -str18 = "https://ehub.portvancouver.com/Webcams/Photos/PortsideNo8?" -str19 = "https://ehub.portvancouver.com/Webcams/Photos/PortsideCoast2000?" +astr[0] = "Hi!" +astr[1] = "https://ehub.portvancouver.com/Webcams/Photos/CommOver?" +astr[2] = "https://ehub.portvancouver.com/webcams/Photos/DPWExitWest?" +astr[3] = "https://ehub.portvancouver.com/Webcams/Photos/CentermMainGates?" +astr[4] = "https://ehub.portvancouver.com/Webcams/Photos/VantermEntrance?" +astr[5] = "https://ehub.portvancouver.com/Webcams/Photos/VantermGates?" +astr[6] = "https://ehub.portvancouver.com/Webcams/Photos/ClarkEntrance?" +astr[7] = "https://ehub.portvancouver.com/Webcams/Photos/ColumbiaContainerCrossing?" +astr[8] = "https://ehub.portvancouver.com/webcams/Photos/TerminalDock?" +astr[9] = "https://ehub.portvancouver.com/Webcams/Photos/CommEntrance?" +astr[10] = "https://ehub.portvancouver.com/Webcams/Photos/CommOverMcGill?" +astr[11] = "https://ehub.portvancouver.com/Webcams/Photos/CameraDP_FS1?" +astr[12] = "https://ehub.portvancouver.com/Webcams/Photos/DeltaportGate1?" +astr[13] = "https://ehub.portvancouver.com/Webcams/Photos/DMSWest?" +astr[14] = "https://ehub.portvancouver.com/Webcams/Photos/FSMainIntersection?" +astr[15] = "https://ehub.portvancouver.com/Webcams/Photos/FSTruckInGate?" +astr[16] = "https://ehub.portvancouver.com/Webcams/Photos/FSVACSGates?" +astr[17] = "https://ehub.portvancouver.com/Webcams/Photos/FS5TrackCrossing?" +astr[18] = "https://ehub.portvancouver.com/Webcams/Photos/PortsideNo8?" +astr[19] = "https://ehub.portvancouver.com/Webcams/Photos/PortsideCoast2000?" +astr[20] = "https://ehub.portvancouver.com/Webcams/Photos/CPCTruckRoute?" -i = [-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1] +i = [-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1] image_name = "image" @@ -78,43 +84,45 @@ def getTimeAndName(index): while True: getTimeAndName(1) - acquireImage(str1 + str(milliseconds), 'Commissioner entrance', x1) + acquireImage(astr[1] + str(milliseconds), 'Commissioner entrance', x1) getTimeAndName(2) - acquireImage(str2 + str(milliseconds), 'Waterfront_road Centerm crossing', x2) + acquireImage(astr[2] + str(milliseconds), 'Waterfront_road Centerm crossing', x2) getTimeAndName(3) - acquireImage(str3 + str(milliseconds), 'Centerm in gate', x3) + acquireImage(astr[3] + str(milliseconds), 'Centerm in gate', x3) getTimeAndName(4) - acquireImage(str4 + str(milliseconds), 'Vanterm Alliance Grain Terminal crossing', x4) + acquireImage(astr[4] + str(milliseconds), 'Vanterm Alliance Grain Terminal crossing', x4) getTimeAndName(5) - acquireImage(str5 + str(milliseconds), 'Vanterm in gate', x5) + acquireImage(astr[5] + str(milliseconds), 'Vanterm in gate', x5) getTimeAndName(6) - acquireImage(str6 + str(milliseconds), 'Clark Drive overpass', x6) + acquireImage(astr[6] + str(milliseconds), 'Clark Drive overpass', x6) getTimeAndName(7) - acquireImage(str7 + str(milliseconds), 'Columbia Container - crossing', x7) + acquireImage(astr[7] + str(milliseconds), 'Columbia Container - crossing', x7) getTimeAndName(8) - acquireImage(str8 + str(milliseconds), 'Terminal dock', x8) + acquireImage(astr[8] + str(milliseconds), 'Terminal dock', x8) getTimeAndName(9) - acquireImage(str9 + str(milliseconds), 'Commissioner truck staging', x9) + acquireImage(astr[9] + str(milliseconds), 'Commissioner truck staging', x9) getTimeAndName(10) - acquireImage(str10 + str(milliseconds), 'Commissioner street overpass', x10) + acquireImage(astr[10] + str(milliseconds), 'Commissioner street overpass', x10) getTimeAndName(11) - acquireImage(str11 + str(milliseconds), 'Deltaport causeway', x11) + acquireImage(astr[11] + str(milliseconds), 'Deltaport causeway', x11) getTimeAndName(12) - acquireImage(str12 + str(milliseconds), 'Deltaport gate 1', x12) + acquireImage(astr[12] + str(milliseconds), 'Deltaport gate 1', x12) getTimeAndName(13) - acquireImage(str13 + str(milliseconds), 'Delta truck staging', x13) + acquireImage(astr[13] + str(milliseconds), 'Delta truck staging', x13) getTimeAndName(14) - acquireImage(str14 + str(milliseconds), 'Fraser Surrey main intersection', x14) + acquireImage(astr[14] + str(milliseconds), 'Fraser Surrey main intersection', x14) getTimeAndName(15) - acquireImage(str15 + str(milliseconds), 'Fraser Surrey in gate', x15) + acquireImage(astr[15] + str(milliseconds), 'Fraser Surrey in gate', x15) getTimeAndName(16) - acquireImage(str16 + str(milliseconds), 'Fraser Surrey VACS gates', x16) + acquireImage(astr[16] + str(milliseconds), 'Fraser Surrey VACS gates', x16) getTimeAndName(17) - acquireImage(str17 + str(milliseconds), 'Fraser Surrey track crossing', x17) + acquireImage(astr[17] + str(milliseconds), 'Fraser Surrey track crossing', x17) getTimeAndName(18) - acquireImage(str18 + str(milliseconds), 'PortsideBlundellNo.8 road intersection', x18) + acquireImage(astr[18] + str(milliseconds), 'PortsideBlundellNo.8 road intersection', x18) getTimeAndName(19) - acquireImage(str19 + str(milliseconds), 'Portside road - westbound', x19) + acquireImage(astr[19] + str(milliseconds), 'Portside road - westbound', x19) + getTimeAndName(20) + acquireImage(astr[20] + str(milliseconds), 'Convention Centre East', x20) diff --git a/testingtemplate.txt b/testingtemplate.txt new file mode 100644 index 0000000..e122bb1 --- /dev/null +++ b/testingtemplate.txt @@ -0,0 +1,23 @@ +import requests +from time import time +from time import sleep + +headerz = {'Accept' : 'image/avif,image/webp,image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5', 'Accept-Encoding' : + 'gzip, deflate, br, zstd', 'Accept-Language' : + 'en-CA,en-US;q=0.9,en;q=0.8', 'Referer' : + 'https://www.portvancouver.com/' } + +while True: + + seconds = int(time()* 1000) + print(seconds) + r = "https://ehub.portvancouver.com/Webcams/Photos/CPCTruckRoute?" + str(time) + response = requests.get(r, headers=headerz) + sleep(1) + image_name = "image" + str(seconds) + ".jpg" + if response.status_code == 200: + with open(image_name, 'wb') as f: + f.write(response.content) + print(response.status_code) + + diff --git a/video-cleanup.txt b/video-cleanup.txt new file mode 100644 index 0000000..bea9aef --- /dev/null +++ b/video-cleanup.txt @@ -0,0 +1,26 @@ +import shutil +import os + +shutil.rmtree("Videos") + +os.mkdir("Videos") +os.mkdir(r"Videos\Centerm in gate - videos") +os.mkdir(r"Videos\Clark Drive overpass - videos") +os.mkdir(r"Videos\Columbia Container - crossing - videos") +os.mkdir(r"Videos\Commissioner entrance - videos") +os.mkdir(r"Videos\Commissioner street overpass - videos") +os.mkdir(r"Videos\Commissioner truck staging - videos") +os.mkdir(r"Videos\Delta truck staging - videos") +os.mkdir(r"Videos\Deltaport causeway - videos") +os.mkdir(r"Videos\Deltaport gate 1 - videos") +os.mkdir(r"Videos\Deltaport gate 3 - videos") +os.mkdir(r"Videos\Fraser Surrey in gate - videos") +os.mkdir(r"Videos\Fraser Surrey main intersection - videos") +os.mkdir(r"Videos\Fraser Surrey track crossing - videos") +os.mkdir(r"Videos\Fraser Surrey VACS gates - videos") +os.mkdir(r"Videos\Portside road - westbound - videos") +os.mkdir(r"Videos\PortsideBlundellNo.8 road intersection - videos") +os.mkdir(r"Videos\Terminal dock - videos") +os.mkdir(r"Videos\Vanterm Alliance Grain Terminal crossing - videos") +os.mkdir(r"Videos\Vanterm in gate - videos") +os.mkdir(r"Videos\Waterfront_road Centerm crossing - videos") diff --git a/videos.txt b/videos.txt index bb7f363..d3fd170 100644 --- a/videos.txt +++ b/videos.txt @@ -1,5 +1,6 @@ import subprocess import os +from datetime import datetime video = ["Centerm in gate - videos", "Clark Drive overpass - videos", "Columbia Container - crossing - videos", @@ -18,18 +19,27 @@ folder = ["Centerm in gate", "Clark Drive overpass", "Columbia Container - cross "Terminal dock", "Vanterm Alliance Grain Terminal crossing", "Vanterm in gate", "Waterfront_road Centerm crossing"] folderpair = list(zip(video, folder)) -print(folderpair) #increment video number def imageToVideo(folder_name, videopath): - v = os.path.join("..", "Videos", videopath, "video.mp4") - v = str(v) os.chdir(folder_name) + t = os.path.getmtime("image0001.jpg") + t = int(t) + dt = datetime.fromtimestamp(t) + print(dt) + name = dt.strftime("%Y-%m-%d %H.%M.%S") + name = name + ".mp4" + print(name) + v = os.path.join("..", "Videos", videopath, name) + v = str(v) + print(v) + + subprocess.run(["ffmpeg", "-f", "image2", "-framerate", "2", "-i", "image%04d.jpg", - "-c:v", "libx265", +"-c:v", "libx265", v]) os.chdir("..")