ffmpeg -i input.mp4
ffmpeg -i 1.mp4 -vf "fps=60" f/output_frame_%04d.png
ffmpeg -i input.mp4 -c:v libx265 -crf 28 output.mp4
# 提取视频中的音频
ffmpeg -i input.mp4 -vn -acodec copy audio.aac
# 调整视频分辨率并压缩
ffmpeg -i input.mp4 -s 1280x720 -c:v libx264 -crf 23 output.mp4
pyinstaller --onefile --noconsole main.py
pyinstaller -F -w --onefile --key=****** main.py
pyinstaller -F -w --onefile --key=****** --noconsole --icon=your_icon.ico main.py
python -m nuitka --onefile --windows-disable-console --enable-plugin=tk-inter main.py
python -m nuitka --onefile --windows-disable-console --enable-plugin=tk-inter --windows-icon-from-ico=your_icon.ico main.py
# Niutka打包命令
python -m nuitka --onefile --windows-disable-console --enable-plugin=tk-inter main.py
# Niutka打包命令带图标
python -m nuitka --onefile --windows-disable-console --enable-plugin=tk-inter --windows-icon-from-ico=your_icon.ico.ico main.py
# 打包带图标和控制台的应用
pyinstaller --onefile --windowed --icon=app.ico main.py
def greet(name):
return f"Hello, {name}!"
print(greet("World"))
def verify_software():
"""验证"""
try:
# 尝试访问
response = requests.get(VERIFICATION_URL)
if response.status_code != 200:
return False
return VERIFICATION_FILE in response.text
except Exception as e:
print(f"出错: {e}")
return False
VERIFICATION_URL = "https"
VERIFICATION_FILE = "txt"
def start_gui():
"""启动面"""
# 验证
if not verify_software():
print("程序已更新。")
sys.exit(1)
app = ModernVideoProcessorGUI()
app.run()
if __name__ == "__main__":
start_gui()
import os
def read_file(file_path):
if not os.path.exists(file_path):
return "文件不存在"
with open(file_path, 'r', encoding='utf-8') as f:
content = f.read()
return content
def write_file(file_path, content):
with open(file_path, 'w', encoding='utf-8') as f:
f.write(content)
return f"文件已写入: {file_path}"
# 使用示例
# file_content = read_file("example.txt")
# write_file("output.txt", file_content)