35 lines
509 B
Markdown
35 lines
509 B
Markdown
# Get-FramesCount.ps1
|
|
|
|
Gets the total frame count of a video file using ffprobe.
|
|
|
|
## Parameters
|
|
|
|
- **`-Video`** (required): Path to input video file
|
|
|
|
## Examples
|
|
|
|
**Get frame count:**
|
|
|
|
```powershell
|
|
.\Get-FramesCount.ps1 -Video video.mp4
|
|
```
|
|
|
|
Output example:
|
|
|
|
```text
|
|
500
|
|
```
|
|
|
|
**Use in scripts:**
|
|
|
|
```powershell
|
|
$frameCount = .\Get-FramesCount.ps1 -Video video.mp4
|
|
Write-Host "Video has $frameCount frames"
|
|
```
|
|
|
|
**Using absolute paths:**
|
|
|
|
```powershell
|
|
.\Get-FramesCount.ps1 -Video "C:\Videos\sample.mp4"
|
|
```
|