mirror of
https://gitlab.sectorq.eu/jaydee/python.git
synced 2025-12-14 18:44:53 +01:00
bitwarden
This commit is contained in:
@@ -97,20 +97,6 @@ if _ACTION == "flip":
|
|||||||
# accessed = "08/07/2014 18:30:45"
|
# accessed = "08/07/2014 18:30:45"
|
||||||
# )
|
# )
|
||||||
create_date = filedate.File(_FULL_PATH + _FILE).get()
|
create_date = filedate.File(_FULL_PATH + _FILE).get()
|
||||||
c = create_date["created"]
|
|
||||||
m = create_date["modified"]
|
|
||||||
a = create_date["accessed"]
|
|
||||||
new_date = {"created": c.strftime("%m/%d/%Y %H:%M:%S"),
|
|
||||||
"modified": m.strftime("%m/%d/%Y %H:%M:%S"),
|
|
||||||
"accessed":a.strftime("%m/%d/%Y %H:%M:%S")
|
|
||||||
}
|
|
||||||
new_date = {"created": c.strftime("%m/%d/%Y %H:%M:%S"),
|
|
||||||
"modified": m.strftime("%m/%d/%Y %H:%M:%S"),
|
|
||||||
"accessed":a.strftime("%m/%d/%Y %H:%M:%S")
|
|
||||||
}
|
|
||||||
print(create_date)
|
|
||||||
print(create_date["created"])
|
|
||||||
print(new_date)
|
|
||||||
print(_FULL_PATH)
|
print(_FULL_PATH)
|
||||||
print(myCmd)
|
print(myCmd)
|
||||||
os.chdir(_FULL_PATH)
|
os.chdir(_FULL_PATH)
|
||||||
@@ -149,6 +135,7 @@ if _ACTION == "join":
|
|||||||
if os.path.exists(_FULL_PATH + "100GOPRO"):
|
if os.path.exists(_FULL_PATH + "100GOPRO"):
|
||||||
_FULL_PATH = _FULL_PATH + "100GOPRO"
|
_FULL_PATH = _FULL_PATH + "100GOPRO"
|
||||||
for filename in os.listdir(_FULL_PATH):
|
for filename in os.listdir(_FULL_PATH):
|
||||||
|
|
||||||
if filename.endswith(".MP4") and not filename.startswith("joined_"):
|
if filename.endswith(".MP4") and not filename.startswith("joined_"):
|
||||||
prefix = filename[0:2]
|
prefix = filename[0:2]
|
||||||
part = prefix + filename[2:4]
|
part = prefix + filename[2:4]
|
||||||
@@ -195,7 +182,10 @@ if _ACTION == "join":
|
|||||||
f.close()
|
f.close()
|
||||||
f = open("video.txt", "a")
|
f = open("video.txt", "a")
|
||||||
final_size = 0
|
final_size = 0
|
||||||
|
create_date = ""
|
||||||
for p in parts:
|
for p in parts:
|
||||||
|
if create_date == "":
|
||||||
|
create_date = filedate.File(_FULL_PATH + p).get()
|
||||||
f.write(f"file '{p}'\n")
|
f.write(f"file '{p}'\n")
|
||||||
file_stats = os.stat(p)
|
file_stats = os.stat(p)
|
||||||
final_size += file_stats.st_size
|
final_size += file_stats.st_size
|
||||||
@@ -240,6 +230,7 @@ if _ACTION == "join":
|
|||||||
# pbar.update(progress - pbar.n)
|
# pbar.update(progress - pbar.n)
|
||||||
|
|
||||||
cur_stat = 0
|
cur_stat = 0
|
||||||
|
|
||||||
with tqdm(total=100, position=1, desc="Join") as pbar:
|
with tqdm(total=100, position=1, desc="Join") as pbar:
|
||||||
position=0
|
position=0
|
||||||
while proc.returncode is None:
|
while proc.returncode is None:
|
||||||
@@ -273,6 +264,11 @@ if _ACTION == "join":
|
|||||||
print("Size OK")
|
print("Size OK")
|
||||||
try:
|
try:
|
||||||
shutil.move(export_name, export_name.replace("joining","joined"))
|
shutil.move(export_name, export_name.replace("joining","joined"))
|
||||||
|
filedate.File(_FULL_PATH + export_name.replace("joining","joined")).set(
|
||||||
|
created = create_date["created"],
|
||||||
|
modified = create_date["modified"],
|
||||||
|
accessed = create_date["accessed"]
|
||||||
|
)
|
||||||
except:
|
except:
|
||||||
print(f"Failed to move {export_name}")
|
print(f"Failed to move {export_name}")
|
||||||
print("\r\n",flush=True)
|
print("\r\n",flush=True)
|
||||||
@@ -319,8 +315,10 @@ if _ACTION == "encode":
|
|||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
os.chdir(_FULL_PATH)
|
os.chdir(_FULL_PATH)
|
||||||
|
create_date = ""
|
||||||
for p in parts:
|
for p in parts:
|
||||||
|
if create_date == "":
|
||||||
|
create_date = filedate.File(_FULL_PATH + p).get()
|
||||||
export_name = "encoding_" + p
|
export_name = "encoding_" + p
|
||||||
if _FLIP:
|
if _FLIP:
|
||||||
if ops == "win":
|
if ops == "win":
|
||||||
@@ -352,6 +350,11 @@ if _ACTION == "encode":
|
|||||||
#ffmpeg -i .\GH010149.MP4 -c:v hevc_amf -rc cqp -qp_i 42 -qp_p 42 -quality quality -crf 25 output7.mp4
|
#ffmpeg -i .\GH010149.MP4 -c:v hevc_amf -rc cqp -qp_i 42 -qp_p 42 -quality quality -crf 25 output7.mp4
|
||||||
try:
|
try:
|
||||||
shutil.move(export_name, export_name.replace("encoding","encoded"))
|
shutil.move(export_name, export_name.replace("encoding","encoded"))
|
||||||
|
filedate.File(_FULL_PATH + export_name.replace("encoding","encoded")).set(
|
||||||
|
created = create_date["created"],
|
||||||
|
modified = create_date["modified"],
|
||||||
|
accessed = create_date["accessed"]
|
||||||
|
)
|
||||||
except:
|
except:
|
||||||
print(f"Failed to move {export_name}")
|
print(f"Failed to move {export_name}")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user