videocompress 1.2.1
This commit is contained in:
@ -4,8 +4,9 @@ import sys
|
||||
import tkinter as tk
|
||||
from tkinter import ttk, messagebox, filedialog
|
||||
import main as main_program
|
||||
from pathlib import Path
|
||||
|
||||
CONFIG_NAME = "config.json"
|
||||
CONFIG_NAME = Path(sys.path[0])/"config.json"
|
||||
|
||||
DEFAULT_CONFIG = {
|
||||
"crf": 18,
|
||||
|
@ -13,8 +13,8 @@ import re
|
||||
|
||||
root = None
|
||||
TRAIN = False
|
||||
ESTI_FILE = Path("esti.out")
|
||||
CFG_FILE = Path("config.json")
|
||||
ESTI_FILE = Path(sys.path[0])/"esti.out"
|
||||
CFG_FILE = Path(sys.path[0])/"config.json"
|
||||
CFG = {
|
||||
"crf":"18",
|
||||
"bitrate": None,
|
||||
@ -348,9 +348,12 @@ def traverse_directory(root_dir: Path):
|
||||
prog.advance(task,t)
|
||||
|
||||
def test():
|
||||
os.environ["PATH"] = Path(__file__).parent.as_posix() + os.pathsep + os.environ["PATH"]
|
||||
|
||||
try:
|
||||
subprocess.run([CFG["ffmpeg"],"-version"],stdout=-3,stderr=-3).check_returncode()
|
||||
except Exception as e:
|
||||
print(__file__)
|
||||
logging.critical("无法运行ffmpeg")
|
||||
exit(-1)
|
||||
try:
|
||||
|
8
VideoCompress/pack.bat
Normal file
8
VideoCompress/pack.bat
Normal file
@ -0,0 +1,8 @@
|
||||
@echo off
|
||||
echo Packing full.
|
||||
nuitka --standalone config.py --enable-plugin=upx --onefile --enable-plugin=tk-inter --include-data-files=ffmpeg.exe=ffmpeg.exe --include-data-files=ffprobe.exe=ffprobe.exe
|
||||
rename config.exe full.exe
|
||||
echo Packing single.
|
||||
nuitka --standalone main.py --enable-plugin=upx --onefile
|
||||
echo Packing config.
|
||||
nuitka --standalone config.py --enable-plugin=upx --onefile --enable-plugin=tk-inter
|
Reference in New Issue
Block a user