V2.2.8
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
from PyInstaller.building.datastruct import Tree
|
||||
from PyInstaller.utils.hooks import get_package_paths
|
||||
|
||||
|
||||
PACKAGE_DIRECTORY = get_package_paths('faster_whisper')[1]
|
||||
datas = [(PACKAGE_DIRECTORY, 'faster_whisper')]
|
||||
|
||||
|
||||
a = Analysis(
|
||||
['Lai.py'],
|
||||
pathex=[],
|
||||
@@ -24,16 +24,13 @@ pyz = PYZ(a.pure)
|
||||
exe = EXE(
|
||||
pyz,
|
||||
a.scripts,
|
||||
a.binaries,
|
||||
a.datas,
|
||||
[],
|
||||
exclude_binaries=True,
|
||||
name='Lai',
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
strip=False,
|
||||
upx=True,
|
||||
upx_exclude=[],
|
||||
runtime_tmpdir=None,
|
||||
console=True,
|
||||
disable_windowed_traceback=False,
|
||||
argv_emulation=False,
|
||||
@@ -41,3 +38,12 @@ exe = EXE(
|
||||
codesign_identity=None,
|
||||
entitlements_file=None,
|
||||
)
|
||||
coll = COLLECT(
|
||||
exe,
|
||||
a.binaries,
|
||||
a.datas,
|
||||
strip=False,
|
||||
upx=True,
|
||||
upx_exclude=[],
|
||||
name='Lai',
|
||||
)
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
# -*- mode: python ; coding: utf-8 -*-
|
||||
|
||||
from PyInstaller.building.datastruct import Tree
|
||||
from PyInstaller.utils.hooks import get_package_paths
|
||||
|
||||
|
||||
PACKAGE_DIRECTORY = get_package_paths('faster_whisper')[1]
|
||||
datas = [(PACKAGE_DIRECTORY, 'faster_whisper')]
|
||||
|
||||
a = Analysis(
|
||||
['Lai.py'],
|
||||
pathex=[],
|
||||
binaries=[],
|
||||
datas=datas,
|
||||
hiddenimports=[],
|
||||
hookspath=[],
|
||||
hooksconfig={},
|
||||
runtime_hooks=[],
|
||||
excludes=[],
|
||||
noarchive=False,
|
||||
)
|
||||
pyz = PYZ(a.pure)
|
||||
|
||||
exe = EXE(
|
||||
pyz,
|
||||
a.scripts,
|
||||
a.binaries,
|
||||
a.datas,
|
||||
[],
|
||||
name='Lai',
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
strip=False,
|
||||
upx=True,
|
||||
upx_exclude=[],
|
||||
runtime_tmpdir=None,
|
||||
console=True,
|
||||
disable_windowed_traceback=False,
|
||||
argv_emulation=False,
|
||||
target_arch=None,
|
||||
codesign_identity=None,
|
||||
entitlements_file=None,
|
||||
)
|
||||
@@ -245,10 +245,8 @@ class Clip:
|
||||
command.append("-c:v")
|
||||
command.append("h264_cuvid") # 使用 NVIDIA CUVID 解码器进行解码
|
||||
elif self.gpu_type == "AMD":
|
||||
command.append("-hwaccel")
|
||||
command.append("vaapi")
|
||||
command.append("-c:v")
|
||||
command.append("h264_vaapi")
|
||||
command.append("h264")
|
||||
command.append("-i")
|
||||
command.append(random_path)
|
||||
command.append("-ss")
|
||||
@@ -266,7 +264,7 @@ class Clip:
|
||||
if self.gpu_type == "NVIDIA":
|
||||
command.append("h264_nvenc")
|
||||
elif self.gpu_type == "AMD":
|
||||
command.append("h264_vaapi")
|
||||
command.append("h264_amf")
|
||||
else:
|
||||
command.append("libx264")
|
||||
command.append("-preset")
|
||||
@@ -485,7 +483,7 @@ class Clip:
|
||||
if self.gpu_type == "NVIDIA":
|
||||
command.append("h264_nvenc")
|
||||
elif self.gpu_type == "AMD":
|
||||
command.append("h264_vaapi")
|
||||
command.append("h264_amf")
|
||||
else:
|
||||
command.append("libx264")
|
||||
|
||||
|
||||
@@ -473,7 +473,7 @@ class ImageToVideo:
|
||||
if self.gpu_type == "NVIDIA":
|
||||
cmd.append("h264_nvenc")
|
||||
elif self.gpu_type == "AMD":
|
||||
cmd.append("h264_vaapi")
|
||||
cmd.append("h264_amf")
|
||||
else:
|
||||
cmd.append("libx264")
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ def ClipVideo(video_path, out_folder, image_out_folder, sensitivity, gpu_type):
|
||||
if gpu_type == "NVIDIA":
|
||||
command.append("h264_nvenc")
|
||||
elif gpu_type == "AMD":
|
||||
command.append("h264_vaapi")
|
||||
command.append("h264_amf")
|
||||
else:
|
||||
command.append("libx264")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user