updated image names to better work with ffmpeg conversion
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
ffmpeg -f image2 -framerate 2 -i %*.jpg -c:v v210 deltavideo.mov
|
ffmpeg -f image2 -framerate 2 -i %*.jpg -c:v libx265 video.mp4
|
||||||
|
|
||||||
#only works in wsl / linux
|
#only works in wsl
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
os.mkdir("Centerm in gate")
|
os.mkdir("Centerm in gate")
|
||||||
os.mkdir("Clark Drive overpass")
|
os.mkdir("Clark Drive overpass")
|
||||||
os.mkdir("Columbia Container - crossing")
|
os.mkdir("Columbia Container - crossing")
|
||||||
@@ -20,3 +21,26 @@ os.mkdir("Terminal dock")
|
|||||||
os.mkdir("Vanterm Alliance Grain Terminal crossing")
|
os.mkdir("Vanterm Alliance Grain Terminal crossing")
|
||||||
os.mkdir("Vanterm in gate")
|
os.mkdir("Vanterm in gate")
|
||||||
os.mkdir("Waterfront_road Centerm crossing")
|
os.mkdir("Waterfront_road Centerm crossing")
|
||||||
|
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")
|
||||||
|
|||||||
@@ -31,25 +31,28 @@ x18 = requests.Response()
|
|||||||
x19 = requests.Response()
|
x19 = requests.Response()
|
||||||
|
|
||||||
|
|
||||||
astr1 = "https://ehub.portvancouver.com/Webcams/Photos/CommOver?"
|
str1 = "https://ehub.portvancouver.com/Webcams/Photos/CommOver?"
|
||||||
astr2 = "https://ehub.portvancouver.com/webcams/Photos/DPWExitWest?"
|
str2 = "https://ehub.portvancouver.com/webcams/Photos/DPWExitWest?"
|
||||||
astr3 = "https://ehub.portvancouver.com/Webcams/Photos/CentermMainGates?"
|
str3 = "https://ehub.portvancouver.com/Webcams/Photos/CentermMainGates?"
|
||||||
astr4 = "https://ehub.portvancouver.com/Webcams/Photos/VantermEntrance?"
|
str4 = "https://ehub.portvancouver.com/Webcams/Photos/VantermEntrance?"
|
||||||
astr5 = "https://ehub.portvancouver.com/Webcams/Photos/VantermGates?"
|
str5 = "https://ehub.portvancouver.com/Webcams/Photos/VantermGates?"
|
||||||
astr6 = "https://ehub.portvancouver.com/Webcams/Photos/ClarkEntrance?"
|
str6 = "https://ehub.portvancouver.com/Webcams/Photos/ClarkEntrance?"
|
||||||
astr7 = "https://ehub.portvancouver.com/Webcams/Photos/ColumbiaContainerCrossing?"
|
str7 = "https://ehub.portvancouver.com/Webcams/Photos/ColumbiaContainerCrossing?"
|
||||||
astr8 = "https://ehub.portvancouver.com/webcams/Photos/TerminalDock?"
|
str8 = "https://ehub.portvancouver.com/webcams/Photos/TerminalDock?"
|
||||||
astr9 = "https://ehub.portvancouver.com/Webcams/Photos/CommEntrance?"
|
str9 = "https://ehub.portvancouver.com/Webcams/Photos/CommEntrance?"
|
||||||
astr10 = "https://ehub.portvancouver.com/Webcams/Photos/CommOverMcGill?"
|
str10 = "https://ehub.portvancouver.com/Webcams/Photos/CommOverMcGill?"
|
||||||
astr11 = "https://ehub.portvancouver.com/Webcams/Photos/CameraDP_FS1?"
|
str11 = "https://ehub.portvancouver.com/Webcams/Photos/CameraDP_FS1?"
|
||||||
astr12 = "https://ehub.portvancouver.com/Webcams/Photos/DeltaportGate1?"
|
str12 = "https://ehub.portvancouver.com/Webcams/Photos/DeltaportGate1?"
|
||||||
astr13 = "https://ehub.portvancouver.com/Webcams/Photos/DMSWest?"
|
str13 = "https://ehub.portvancouver.com/Webcams/Photos/DMSWest?"
|
||||||
astr14 = "https://ehub.portvancouver.com/Webcams/Photos/FSMainIntersection?"
|
str14 = "https://ehub.portvancouver.com/Webcams/Photos/FSMainIntersection?"
|
||||||
astr15 = "https://ehub.portvancouver.com/Webcams/Photos/FSTruckInGate?"
|
str15 = "https://ehub.portvancouver.com/Webcams/Photos/FSTruckInGate?"
|
||||||
astr16 = "https://ehub.portvancouver.com/Webcams/Photos/FSVACSGates?"
|
str16 = "https://ehub.portvancouver.com/Webcams/Photos/FSVACSGates?"
|
||||||
astr17 = "https://ehub.portvancouver.com/Webcams/Photos/FS5TrackCrossing?"
|
str17 = "https://ehub.portvancouver.com/Webcams/Photos/FS5TrackCrossing?"
|
||||||
astr18 = "https://ehub.portvancouver.com/Webcams/Photos/PortsideNo8?"
|
str18 = "https://ehub.portvancouver.com/Webcams/Photos/PortsideNo8?"
|
||||||
astr19 = "https://ehub.portvancouver.com/Webcams/Photos/PortsideCoast2000?"
|
str19 = "https://ehub.portvancouver.com/Webcams/Photos/PortsideCoast2000?"
|
||||||
|
|
||||||
|
i = [-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
|
||||||
|
|
||||||
|
|
||||||
image_name = "image"
|
image_name = "image"
|
||||||
|
|
||||||
@@ -66,53 +69,55 @@ def acquireImage(request_string, folder_name, response):
|
|||||||
print("Copy detected and removed (folder_name)")
|
print("Copy detected and removed (folder_name)")
|
||||||
|
|
||||||
|
|
||||||
def getTimeAndName():
|
def getTimeAndName(index):
|
||||||
milliseconds = int(time() * 1000)
|
milliseconds = int(time() * 1000)
|
||||||
global image_name
|
global image_name
|
||||||
image_name = "image" + str(milliseconds) + ".jpg"
|
image_name = "image" + f"{i[index]:04}" + ".jpg"
|
||||||
|
i[index] += 1
|
||||||
|
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
getTimeAndName()
|
getTimeAndName(1)
|
||||||
acquireImage(astr1 + str(milliseconds), 'Commissioner entrance', x1)
|
acquireImage(str1 + str(milliseconds), 'Commissioner entrance', x1)
|
||||||
getTimeAndName()
|
getTimeAndName(2)
|
||||||
acquireImage(astr2 + str(milliseconds), 'Waterfront_road Centerm crossing', x2)
|
acquireImage(str2 + str(milliseconds), 'Waterfront_road Centerm crossing', x2)
|
||||||
getTimeAndName()
|
getTimeAndName(3)
|
||||||
acquireImage(astr3 + str(milliseconds), 'Centerm in gate', x3)
|
acquireImage(str3 + str(milliseconds), 'Centerm in gate', x3)
|
||||||
getTimeAndName()
|
getTimeAndName(4)
|
||||||
acquireImage(astr4 + str(milliseconds), 'Vanterm Alliance Grain Terminal crossing', x4)
|
acquireImage(str4 + str(milliseconds), 'Vanterm Alliance Grain Terminal crossing', x4)
|
||||||
getTimeAndName()
|
getTimeAndName(5)
|
||||||
acquireImage(astr5 + str(milliseconds), 'Vanterm in gate', x5)
|
acquireImage(str5 + str(milliseconds), 'Vanterm in gate', x5)
|
||||||
getTimeAndName()
|
getTimeAndName(6)
|
||||||
acquireImage(astr6 + str(milliseconds), 'Clark Drive overpass', x6)
|
acquireImage(str6 + str(milliseconds), 'Clark Drive overpass', x6)
|
||||||
getTimeAndName()
|
getTimeAndName(7)
|
||||||
acquireImage(astr7 + str(milliseconds), 'Columbia Container - crossing', x7)
|
acquireImage(str7 + str(milliseconds), 'Columbia Container - crossing', x7)
|
||||||
getTimeAndName()
|
getTimeAndName(8)
|
||||||
acquireImage(astr8 + str(milliseconds), 'Terminal dock', x8)
|
acquireImage(str8 + str(milliseconds), 'Terminal dock', x8)
|
||||||
getTimeAndName()
|
getTimeAndName(9)
|
||||||
acquireImage(astr9 + str(milliseconds), 'Commissioner truck staging', x9)
|
acquireImage(str9 + str(milliseconds), 'Commissioner truck staging', x9)
|
||||||
getTimeAndName()
|
getTimeAndName(10)
|
||||||
acquireImage(astr10 + str(milliseconds), 'Commissioner street overpass', x10)
|
acquireImage(str10 + str(milliseconds), 'Commissioner street overpass', x10)
|
||||||
getTimeAndName()
|
getTimeAndName(11)
|
||||||
acquireImage(astr11 + str(milliseconds), 'Deltaport causeway', x11)
|
acquireImage(str11 + str(milliseconds), 'Deltaport causeway', x11)
|
||||||
getTimeAndName()
|
getTimeAndName(12)
|
||||||
acquireImage(astr12 + str(milliseconds), 'Deltaport gate 1', x12)
|
acquireImage(str12 + str(milliseconds), 'Deltaport gate 1', x12)
|
||||||
getTimeAndName()
|
getTimeAndName(13)
|
||||||
acquireImage(astr13 + str(milliseconds), 'Delta truck staging', x13)
|
acquireImage(str13 + str(milliseconds), 'Delta truck staging', x13)
|
||||||
getTimeAndName()
|
getTimeAndName(14)
|
||||||
acquireImage(astr14 + str(milliseconds), 'Fraser Surrey main intersection', x14)
|
acquireImage(str14 + str(milliseconds), 'Fraser Surrey main intersection', x14)
|
||||||
getTimeAndName()
|
getTimeAndName(15)
|
||||||
acquireImage(astr15 + str(milliseconds), 'Fraser Surrey in gate', x15)
|
acquireImage(str15 + str(milliseconds), 'Fraser Surrey in gate', x15)
|
||||||
getTimeAndName()
|
getTimeAndName(16)
|
||||||
acquireImage(astr16 + str(milliseconds), 'Fraser Surrey VACS gates', x16)
|
acquireImage(str16 + str(milliseconds), 'Fraser Surrey VACS gates', x16)
|
||||||
getTimeAndName()
|
getTimeAndName(17)
|
||||||
acquireImage(astr17 + str(milliseconds), 'Fraser Surrey track crossing', x17)
|
acquireImage(str17 + str(milliseconds), 'Fraser Surrey track crossing', x17)
|
||||||
getTimeAndName()
|
getTimeAndName(18)
|
||||||
acquireImage(astr18 + str(milliseconds), 'PortsideBlundellNo.8 road intersection', x18)
|
acquireImage(str18 + str(milliseconds), 'PortsideBlundellNo.8 road intersection', x18)
|
||||||
getTimeAndName()
|
getTimeAndName(19)
|
||||||
acquireImage(astr19 + str(milliseconds), 'Portside road - westbound', x19)
|
acquireImage(str19 + str(milliseconds), 'Portside road - westbound', x19)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
print(i)
|
||||||
|
|
||||||
print("Scanned")
|
print("Scanned")
|
||||||
|
|||||||
@@ -11,12 +11,12 @@ headerz = {'Accept' : 'image/avif,image/webp,image/png,image/svg+xml,image/*;q=0
|
|||||||
|
|
||||||
|
|
||||||
milliseconds = int(time() * 1000)
|
milliseconds = int(time() * 1000)
|
||||||
image_check = requests.get("https://ehub.portvancouver.com/Webcams/Photos/DeltaportGate3?" + str(milliseconds))
|
image_check = requests.get("https://ehub.portvancouver.com/Photos/CPCTruckRoute?" + str(milliseconds))
|
||||||
print(image_check)
|
print(image_check)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
milliseconds = int(time() * 1000)
|
milliseconds = int(time() * 1000)
|
||||||
str1 = "https://ehub.portvancouver.com/Webcams/Photos/DeltaportGate3?" + str(milliseconds)
|
str1 = "https://ehub.portvancouver.com/Photos/CPCTruckRoute?" + str(milliseconds)
|
||||||
|
|
||||||
image_name = "image" + str(milliseconds) + ".jpg"
|
image_name = "image" + str(milliseconds) + ".jpg"
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user