Skip to content

Commit a7b7afa

Browse files
authored
Add files via upload
1 parent e449980 commit a7b7afa

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

Python Version/Datamosher Pro.py

+13-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
"""
2-
DATAMOSHER PRO Py version 2.2
2+
DATAMOSHER PRO Py version 2.3
33
Author: Akash Bora (Akascape)
44
License: MIT | Copyright (c) 2024 Akash Bora
55
"""
66

7-
currentversion = 2.2
7+
currentversion = 2.3
88

99
#Import installed modules
1010
import tkinter
@@ -26,7 +26,7 @@
2626

2727
#Import the local datamosh library
2828
from DatamoshLib.Tomato import tomato
29-
from DatamoshLib.Original import classic, repeat, pymodes
29+
from DatamoshLib.Original import classic, repeat, pymodes, classic_new
3030
from DatamoshLib.FFG_effects import basic_modes, external_script
3131

3232
# get full base path
@@ -63,7 +63,7 @@ def resource(relative_path):
6363

6464
#Effect List
6565
modelist = sorted(["Bloom", "Invert", "Jiggle", "Overlap", "Pulse", "Reverse",
66-
"Random", "Classic", "Glide", "Sort", "Echo", "Void",
66+
"Random", "Classic", "Classic2", "Glide", "Sort", "Echo", "Void",
6767
"Fluid", "Stretch", "Motion Transfer", "Repeat", "Shear", "Delay", "Sink",
6868
"Mirror", "Vibrate", "Slam Zoom", "Zoom","Invert-Reverse", "Shift",
6969
"Noise", "Stop", "Buffer", "Slice", "Shuffle", "Rise", "Custom Script",
@@ -666,6 +666,11 @@ def dynamic():
666666
showwidgets=[rangeslider, pdelta]
667667
u=1
668668
mode_type.configure(text="Mode Type: FFmpeg")
669+
670+
elif (current=="Classic2"):
671+
showwidgets=[rangeslider2]
672+
u=1
673+
mode_type.configure(text="Mode Type: FFmpeg")
669674

670675
elif (current=="Glide"):
671676
showwidgets=[pdelta]
@@ -799,7 +804,7 @@ def do_the_mosh():
799804
ProcessLabel.configure(text='STEP 3/3 FIXING THE CORRUPTED FILE...')
800805
ffmpeg_convert(mfile,param,sfile)
801806
os.remove(mfile)
802-
elif ((current=="Classic") or (current=="Repeat") or (current=="Glide") or (current=="Sort") or (current=="Echo")):
807+
elif ((current=="Classic") or (current=="Classic2") or (current=="Repeat") or (current=="Glide") or (current=="Sort") or (current=="Echo")):
803808
if not changed:
804809
param = "-bf 0 -b 10000k" # Default ffmpeg parameter for the above modes
805810
ifile = sfile[:-4]+".avi"
@@ -808,6 +813,8 @@ def do_the_mosh():
808813
mfile = sfile[:-4]+"_corrupted.avi"
809814
if current=="Classic":
810815
classic.Datamosh(ifile, mfile,s=int(start_mosh.get()),e=int(end_mosh.get()),p=int(varp.get()), fps=vid.get_meta_data()['fps'])
816+
elif current=="Classic2":
817+
classic_new.Datamosh(ifile, mfile, s=int(start_frame_mosh.get()), e=int(end_frame_mosh.get()), fps=vid.get_meta_data()['fps'])
811818
elif current=="Repeat":
812819
repeat.Datamosh(ifile, mfile, s=int(start_frame_mosh.get()), e=int(end_frame_mosh.get()),
813820
p=int(varp.get()), fps=vid.get_meta_data()['fps'])
@@ -876,7 +883,7 @@ def do_the_mosh():
876883

877884
#Check the result and complete the task
878885
if os.path.exists(sfile):
879-
messagebox.showinfo("Exported!", "File exported successfully, \nFile Location: " +str(sfile))
886+
res = messagebox.showinfo("Exported!", "File exported successfully, \nFile Location: " +str(sfile))
880887
ProcessLabel.configure(text="Last used: "+last_used)
881888
try: os.startfile(sfile)
882889
except: pass

0 commit comments

Comments
 (0)