-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c384216
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# ev1 Format decoder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import os, sys | ||
import tkinter | ||
from tkinter.messagebox import showinfo | ||
import windnd | ||
|
||
def dnd_file(files): | ||
for file in files: | ||
file = file.decode() | ||
print("Convert " + file) | ||
with open(file, 'rb+') as f: | ||
raw = f.read(100) | ||
data = bytearray(raw) | ||
|
||
for idx, b in enumerate(data): | ||
data[idx] = b ^ 0xff | ||
|
||
raw = bytes(data) | ||
f.seek(0) | ||
f.write(raw) | ||
f.close() | ||
|
||
os.rename(file, file + '.flv') | ||
|
||
|
||
root = tkinter.Tk() | ||
root.geometry('400x300') | ||
root.title('EV1 decode') | ||
windnd.hook_dropfiles(root, func=dnd_file) | ||
label = tkinter.Label(root, text ='Drop *.ev1 on me :)') | ||
label.place(relx = 0.5, rely = 0.5, anchor = 'center') | ||
root.mainloop() | ||
|
||
|
||
# if (len(sys.argv) != 2): | ||
# print("ev1 format decoder: missing input file!") | ||
# print("Usage: python3 dec.py [enc file]") | ||
# exit(1) | ||
|