EXE
This commit is contained in:
parent
324fa7440a
commit
6b9042bee1
2
.idea/AnimeVideoEditot.iml
generated
2
.idea/AnimeVideoEditot.iml
generated
@ -4,7 +4,7 @@
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/.venv" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="Python 3.13 virtualenv at C:\Users\stirelshka8\PycharmProjects\AnimeVideoEditot\.venv" jdkType="Python SDK" />
|
||||
<orderEntry type="jdk" jdkName="Python 3.14 (AnimeVideoEditot)" jdkType="Python SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
<component name="PyDocumentationSettings">
|
||||
|
||||
9
.idea/material_theme_project_new.xml
generated
9
.idea/material_theme_project_new.xml
generated
@ -3,8 +3,15 @@
|
||||
<component name="MaterialThemeProjectNewConfig">
|
||||
<option name="metadata">
|
||||
<MTProjectMetadataState>
|
||||
<option name="userId" value="620f319a:19ced018d5b:-7fda" />
|
||||
<option name="migrated" value="true" />
|
||||
<option name="pristineConfig" value="false" />
|
||||
<option name="userId" value="-464427b1:19cbcef62ca:-7ffe" />
|
||||
</MTProjectMetadataState>
|
||||
</option>
|
||||
<option name="titleBarState">
|
||||
<MTProjectTitleBarConfigState>
|
||||
<option name="overrideColor" value="false" />
|
||||
</MTProjectTitleBarConfigState>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@ -3,5 +3,5 @@
|
||||
<component name="Black">
|
||||
<option name="sdkName" value="Python 3.13 virtualenv at C:\Users\stirelshka8\PycharmProjects\AnimeVideoEditot\.venv" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.13 virtualenv at C:\Users\stirelshka8\PycharmProjects\AnimeVideoEditot\.venv" project-jdk-type="Python SDK" />
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.14 (AnimeVideoEditot)" project-jdk-type="Python SDK" />
|
||||
</project>
|
||||
21
README.md
21
README.md
@ -1,3 +1,22 @@
|
||||
# Anime Video Editor
|
||||
|
||||
Приложение для объединения нескольких видео в один файл. Поддерживает выбор временных диапазонов для каждого ролика, настройку формата (MP4, AVI, MOV, MKV) и качества экспорта.
|
||||
Приложение для объединения нескольких видео в один файл. Поддерживает выбор временных диапазонов для каждого ролика, настройку формата (MP4, AVI, MOV, MKV) и качества экспорта.
|
||||
|
||||
## Сборка в exe (Windows)
|
||||
|
||||
1. Установите зависимости проекта и сборки (обязательно в том же окружении, где будете запускать PyInstaller):
|
||||
```bash
|
||||
pip install -r requirements.txt
|
||||
pip install -r requirements-build.txt
|
||||
```
|
||||
2. Соберите exe:
|
||||
```bash
|
||||
pyinstaller --noconfirm AnimeVideoEditor.spec
|
||||
```
|
||||
или запустите скрипт:
|
||||
```powershell
|
||||
.\build_exe.ps1
|
||||
```
|
||||
3. Готовый файл: `dist\AnimeVideoEditor.exe` (один файл, консоль не показывается).
|
||||
|
||||
FFmpeg включается в сборку автоматически (через imageio_ffmpeg).
|
||||
BIN
asets/icon.png
Normal file
BIN
asets/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 36 KiB |
27
build_exe.ps1
Normal file
27
build_exe.ps1
Normal file
@ -0,0 +1,27 @@
|
||||
# Build Anime Video Editor to exe (Windows)
|
||||
# Run: .\build_exe.ps1
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
Set-Location $PSScriptRoot
|
||||
|
||||
Write-Host "Checking project dependencies..." -ForegroundColor Cyan
|
||||
pip install -r requirements.txt -q
|
||||
if (-not $?) { exit 1 }
|
||||
Write-Host "Checking PyInstaller..." -ForegroundColor Cyan
|
||||
pip show pyinstaller 2>$null | Out-Null
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Installing PyInstaller..." -ForegroundColor Yellow
|
||||
pip install pyinstaller
|
||||
}
|
||||
|
||||
Write-Host "Building exe..." -ForegroundColor Cyan
|
||||
pyinstaller --noconfirm AnimeVideoEditor.spec
|
||||
|
||||
if (Test-Path "dist\AnimeVideoEditor.exe") {
|
||||
Write-Host ""
|
||||
Write-Host "Done: dist\AnimeVideoEditor.exe" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host ""
|
||||
Write-Host "Build failed. Check output above." -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
@ -1,7 +1,9 @@
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
import warnings
|
||||
import glob
|
||||
from moviepy import VideoFileClip, concatenate_videoclips
|
||||
from moviepy.video.fx import Resize
|
||||
from datetime import datetime
|
||||
@ -53,7 +55,14 @@ warnings.filterwarnings(
|
||||
|
||||
|
||||
def _get_ffmpeg_exe():
|
||||
"""Путь к FFmpeg (тот же, что использует MoviePy/imageio)."""
|
||||
"""Путь к FFmpeg (тот же, что использует MoviePy/imageio). В exe (PyInstaller) — из папки сборки."""
|
||||
if getattr(sys, "frozen", False) and getattr(sys, "_MEIPASS", None):
|
||||
base = sys._MEIPASS
|
||||
for folder in ("imageio_ffmpeg", "."):
|
||||
search = os.path.join(base, folder, "*.exe")
|
||||
for path in glob.glob(search):
|
||||
if "ffmpeg" in os.path.basename(path).lower():
|
||||
return path
|
||||
try:
|
||||
import imageio_ffmpeg
|
||||
return imageio_ffmpeg.get_ffmpeg_exe()
|
||||
|
||||
@ -12,6 +12,12 @@ import sys
|
||||
import subprocess
|
||||
|
||||
|
||||
def _icon_path():
|
||||
if getattr(sys, "frozen", False) and getattr(sys, "_MEIPASS", None):
|
||||
return os.path.join(sys._MEIPASS, "asets", "icon.png")
|
||||
return os.path.join(os.path.dirname(os.path.dirname(__file__)), "asets", "icon.png")
|
||||
|
||||
|
||||
class MainWindow:
|
||||
def __init__(self, root):
|
||||
self.root = root
|
||||
@ -19,6 +25,12 @@ class MainWindow:
|
||||
self.root.geometry("1000x780")
|
||||
self.root.minsize(800, 600)
|
||||
self.root.configure(bg=COLORS["bg"])
|
||||
try:
|
||||
_path = _icon_path()
|
||||
if os.path.isfile(_path):
|
||||
self.root.iconphoto(True, tk.PhotoImage(file=_path))
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
setup_theme(root)
|
||||
self.video_items = []
|
||||
|
||||
5
pyi_hooks/hook-moviepy.py
Normal file
5
pyi_hooks/hook-moviepy.py
Normal file
@ -0,0 +1,5 @@
|
||||
# PyInstaller hook: force moviepy into the bundle
|
||||
from PyInstaller.utils.hooks import collect_all, collect_submodules
|
||||
|
||||
datas, binaries, hiddenimports = collect_all("moviepy")
|
||||
hiddenimports += list(collect_submodules("moviepy"))
|
||||
2
requirements-build.txt
Normal file
2
requirements-build.txt
Normal file
@ -0,0 +1,2 @@
|
||||
# Для сборки exe (установить: pip install -r requirements-build.txt)
|
||||
pyinstaller>=6.0.0
|
||||
@ -1,4 +1,3 @@
|
||||
# Видеоредактор — зависимости (Windows и Linux)
|
||||
# Используются версии с готовыми wheel-пакетами для обеих платформ.
|
||||
# Anime Video Editor - dependencies (Windows and Linux)
|
||||
moviepy>=1.0.3
|
||||
Pillow>=10.1.0
|
||||
|
||||
Loading…
Reference in New Issue
Block a user