From c3842165048813f5425ad44e35360374a54bd208 Mon Sep 17 00:00:00 2001 From: phantom1003 Date: Fri, 14 Oct 2022 01:22:49 +0800 Subject: [PATCH] v0.1 --- README.md | 1 + ev1-dec.py | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 README.md create mode 100644 ev1-dec.py diff --git a/README.md b/README.md new file mode 100644 index 0000000..50b13ab --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# ev1 Format decoder diff --git a/ev1-dec.py b/ev1-dec.py new file mode 100644 index 0000000..c7d41aa --- /dev/null +++ b/ev1-dec.py @@ -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) +