Change -Suffix parameter in Create-Clip.ps1 from optional empty string to required non-empty string with default value "-Clip", removing the hardcoded "-Clip" prefix from target name derivation so suffix is inserted directly before extension (e.g. default behavior unchanged: P01.mp4 -> P01-Clip.mp4, but custom -Suffix "-Shot-1" now makes P01.mp4 -> P01-Shot-1.mp4 instead of P01-Clip-Shot-1.mp4), add ValidateNotNullOrEmpty attribute, update documentation to reflect new default and behavior, and add installation
This commit is contained in:
1 parent
61894433d9
commit
4cc09d6369
4 files changed
+323
-13
No files matched your search
@@ -7,7 +7,8 @@ A collection of PowerShell scripts for video processing tasks using ffmpeg and f
|
||||
- **PowerShell 7+** (pwsh.exe)
|
||||
- **ffmpeg** - Must be in system PATH
|
||||
- **ffprobe** - Must be in system PATH
|
||||
- **rife-ncnn-vulkan** - Must be in system PATH
|
||||
- **rife-ncnn-vulkan** - Must be in system PATH and also defined the environment variable **RIFE_HOME** to the same directory
|
||||
- **upscayl-bin** - Must be in system PATH and also defined the environment variable **UPSCAYL_HOME** to the same directory
|
||||
|
||||
## ffmpeg
|
||||
|
||||
@@ -15,7 +16,31 @@ To install ffmpeg on Windows, download it from [ffmpeg.org](https://ffmpeg.org/d
|
||||
|
||||
## rife-ncnn-vulkan
|
||||
|
||||
To install rife-ncnn-vulkan on Windows, download it from [rife-ncnn-vulkan](https://github.com/nihui/rife-ncnn-vulkan) and add it to your system PATH.
|
||||
To install rife-ncnn-vulkan on Windows, see the [RIFE 4.26 installation guide](RIFE.md). Add it to your system PATH.
|
||||
|
||||
## upscayl-bin
|
||||
|
||||
To install upscayl-bin on Windows, see the [Upscalers installation guide](Upscalers.md). Add it to your system PATH.
|
||||
|
||||
## NCNN_GPU_ID
|
||||
|
||||
The environment variable **NCNN_GPU_ID** is used to specify the GPU device ID for ncnn-based applications.
|
||||
|
||||
This environment variable must be set for both `rife-ncnn-vulkan` and `upscayl-bin`.
|
||||
|
||||
The value stored in **NCNN_GPU_ID** will be either:
|
||||
|
||||
- **`0`** — use the first Vulkan-capable GPU (device index 0). If you have multiple GPUs, they'd be `0`, `1`, `2`, etc.
|
||||
- **`-1`** — use CPU only (no Vulkan GPU is available).
|
||||
|
||||
These map directly to the `-g` flag values accepted by both `rife-ncnn-vulkan` and `upscayl-bin`:
|
||||
|
||||
| `-g` value | Meaning |
|
||||
| --- | --- |
|
||||
| `0` | First GPU |
|
||||
| `1` | Second GPU |
|
||||
| `2` | Third GPU |
|
||||
| `-1` | CPU |
|
||||
|
||||
---
|
||||
|
||||
@@ -23,15 +48,20 @@ To install rife-ncnn-vulkan on Windows, download it from [rife-ncnn-vulkan](http
|
||||
|
||||
| Script | Purpose |
|
||||
| :--- | :--- |
|
||||
| Clone-Image.ps1 | Clone/copy image files with optional resizing (cover-scale then crop), format conversion, and quality/compression settings |
|
||||
| Clone-Video.ps1 | Clone/copy video files with optional frame range and sequence extraction |
|
||||
| Compare-Videos.ps1 | Combine 2 to 4 video files into a single 1920x1080 side-by-side or grid comparison video |
|
||||
| Create-Clip.ps1 | Create a clip of a frame range from a video, named from the source with a suffix (default `-Clip`) |
|
||||
| Create-FullSubtitle.ps1 | Creates a full subtitle file from a video file and two SRT subtitle files by combining them with adjusted timing and sequential numbering |
|
||||
| Create-PillarBox.ps1 | Wrap a video in a 16:9 frame with selectable side-bar effects (black, white, blurred-background variants) |
|
||||
| Create-Scenes.ps1 | Detect scene changes with ffmpeg and extract each scene as a separate clip using Create-Clip.ps1 |
|
||||
| Create-ShortClip.ps1 | Create short clips from videos with cropping and overlay options |
|
||||
| Create-Turnaround.ps1 | Combine a sequence of images into a single turnaround (character reference sheet) image, in a row or a grid |
|
||||
| Crop-Clips.ps1 | Batch crop videos generated by LTX-2, Kling and Wan from their non-standard resolutions to standard ones (also scales any square video to 1080x1080) |
|
||||
| Get-Frames.ps1 | Extract a range of frames to PNG images |
|
||||
| Get-Frame.ps1 | Extract a specific frame of a video to PNG, with the image name derived from the video and frame index |
|
||||
| Get-FramesCount.ps1 | Get total frame count of a video |
|
||||
| Get-LastFrame.ps1 | Extract a specific frame or last frame to PNG |
|
||||
| Get-FramesRange.ps1 | Extract a range of frames to PNG images |
|
||||
| Get-LastFrame.ps1 | Extract a specific frame or last frame to PNG, with an optional filename pattern |
|
||||
| Get-VideoAudio.ps1 | Extracts audio in either WAV or MP3 format from a video file |
|
||||
| Get-VideoInfo.ps1 | Extract and display video metadata from comment tags |
|
||||
| Stich-InBetween.ps1 | Generate interpolated in-between frames between two images using RIFE and encode to video |
|
||||
@@ -43,7 +73,16 @@ To install rife-ncnn-vulkan on Windows, download it from [rife-ncnn-vulkan](http
|
||||
|
||||
## Scripts Installation
|
||||
|
||||
The scripts are available from **git.gurusushi.dyndns.org**, repository: **guru/Video-Processing-Scripts**.
|
||||
The scripts are available from two locations:
|
||||
|
||||
- SVN: **public-svn**, project: **Video Processing Scripts**.
|
||||
- Git: **git.gurusushi.dyndns.org**, repository: **guru/Video-Processing-Scripts**.
|
||||
|
||||
```bash title="Clone the repository from Git"
|
||||
git clone https://git.gurusushi.dyndns.org/guru/Video-Processing-Scripts.git
|
||||
```
|
||||
|
||||
**Note**: there is a `Update-Video-Processing-Scripts.cmd` script that can be used to update the directory from Git to get the latest version.
|
||||
|
||||
Add the project folder to your PATH environment variable to access the scripts from any location.
|
||||
|
||||
|
||||
Reference in new issue
Block a user