Update USAGE.md with executable instructions; Add PyInstaller spec file; Update .gitignore

This commit is contained in:
Ramforth
2025-11-01 12:16:10 +01:00
parent a73569a5e8
commit 049b016e72
3 changed files with 52 additions and 15 deletions

1
.gitignore vendored
View File

@@ -5,5 +5,4 @@ __pycache__/
*.log *.log
build/ build/
dist/ dist/
*.spec
Return haunted farmhouse Part 1.mp4 Return haunted farmhouse Part 1.mp4

View File

@@ -33,11 +33,9 @@ Before running the script, ensure you have the following installed on your **Arc
## 3. Running the Converter ## 3. Running the Converter
Once the setup is complete, you can run the converter script. Once the setup is complete, you can run the converter script or the packaged executable.
### Basic Usage ### Running the Python Script
The script takes an input video file and an optional output directory. If the input file is not provided via the command line, the script will prompt you to enter it.
```bash ```bash
python -m src.main [path_to_your_input_video_file] [-o <path_to_output_directory>] python -m src.main [path_to_your_input_video_file] [-o <path_to_output_directory>]
@@ -53,20 +51,25 @@ python -m src.main
# Script will then prompt: Please enter the path to the input video file: # Script will then prompt: Please enter the path to the input video file:
``` ```
**Example:** ### Running the Packaged Executable
```bash After building the executable (see `DEVELOPMENT_PLAN.md` for details on packaging), you can find it in the `dist/` directory.
# Convert a video and save it in the same directory
python -m src.main /home/user/Videos/my_original_video.mp4
# Convert a video and save it to a specific output directory 1. **Navigate to the `dist` directory:**
python -m src.main /home/user/Videos/my_original_video.mp4 -o /home/user/ConvertedVideos ```bash
``` cd /path/to/your/project/video-converter/dist
```
2. **Run the executable:**
```bash
./video-converter [path_to_your_input_video_file] [-o <path_to_output_directory>]
```
### Output File Naming The usage is identical to the Python script, but you execute the binary directly.
* If an output directory is specified, the converted file will be named `my_original_video_DR_compatible.mov`. **Example:**
* If no output directory is specified (i.e., the output is in the same directory as the input), the converted file will be named `recoded_my_original_video_DR_compatible.mov`. ```bash
./video-converter /home/user/Videos/my_original_video.mp4 -o /home/user/ConvertedVideos
```
## 4. What it Does ## 4. What it Does

35
video-converter.spec Normal file
View File

@@ -0,0 +1,35 @@
# -*- mode: python ; coding: utf-8 -*-
block_cipher = None
a = Analysis(['src/main.py'],
pathex=['/home/joe/Cloud9/Documents/Obisdian/projects/Video Converter'],
binaries=[('/usr/bin/ffmpeg', '.'), ('/usr/bin/ffprobe', '.')],
datas=[],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='video-converter',
debug=False,
strip=False,
upx=True,
console=True,
disable_windowed_traceback=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None )