Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions .github/skills/experimental/video-to-gif/examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Video-to-GIF Examples
description: Usage examples and test data generation for video-to-gif skill
author: Microsoft
ms.date: 2026-05-01
ms.date: 2026-08-20
ms.topic: reference
keywords:
- video
Expand All @@ -17,39 +17,39 @@ estimated_reading_time: 3
### Basic Conversion

```bash
# Convert with defaults (10 FPS, 480px, sierra2_4a dithering)
../convert.sh video.mp4
# Convert with defaults (10 FPS, 1280px, sierra2_4a dithering)
../scripts/convert.sh video.mp4

# Specify output filename
../convert.sh --input video.mp4 --output demo.gif
../scripts/convert.sh --input video.mp4 --output demo.gif
```

```powershell
# Convert with defaults
../convert.ps1 -InputPath video.mp4
../scripts/convert.ps1 -InputPath video.mp4

# Specify output filename
../convert.ps1 -InputPath video.mp4 -OutputPath demo.gif
../scripts/convert.ps1 -InputPath video.mp4 -OutputPath demo.gif
```

### High Quality Demo

```bash
../convert.sh --input presentation.mp4 --fps 15 --width 800 --dither floyd_steinberg
../scripts/convert.sh --input presentation.mp4 --fps 15 --width 800 --dither floyd_steinberg
```

```powershell
../convert.ps1 -InputPath presentation.mp4 -Fps 15 -Width 800 -Dither floyd_steinberg
../scripts/convert.ps1 -InputPath presentation.mp4 -Fps 15 -Width 800 -Dither floyd_steinberg
```

### Small File Size

```bash
../convert.sh --input video.mp4 --fps 5 --width 320 --dither bayer
../scripts/convert.sh --input video.mp4 --fps 5 --width 320 --dither bayer
```

```powershell
../convert.ps1 -InputPath video.mp4 -Fps 5 -Width 320 -Dither bayer
../scripts/convert.ps1 -InputPath video.mp4 -Fps 5 -Width 320 -Dither bayer
```

## Test Video Generation
Expand Down Expand Up @@ -85,14 +85,14 @@ Compare dithering algorithms by converting the same source with different settin
```bash
# Generate all variants
for dither in sierra2_4a floyd_steinberg bayer none; do
../convert.sh --input test-video.mp4 --output "test-${dither}.gif" --dither "${dither}"
../scripts/convert.sh --input test-video.mp4 --output "test-${dither}.gif" --dither "${dither}"
done
```

```powershell
# Generate all variants
@('sierra2_4a', 'floyd_steinberg', 'bayer', 'none') | ForEach-Object {
../convert.ps1 -InputPath test-video.mp4 -OutputPath "test-$_.gif" -Dither $_
../scripts/convert.ps1 -InputPath test-video.mp4 -OutputPath "test-$_.gif" -Dither $_
}
```

Expand All @@ -114,15 +114,15 @@ Strategies for reducing GIF file size:
Lower frame rates significantly reduce file size. For simple animations, 5-8 FPS is often sufficient.

```bash
../convert.sh --input video.mp4 --fps 5
../scripts/convert.sh --input video.mp4 --fps 5
```

### Reduce Dimensions

Smaller dimensions dramatically reduce file size. 320px width works well for thumbnails.

```bash
../convert.sh --input video.mp4 --width 320
../scripts/convert.sh --input video.mp4 --width 320
```

### Trim Source Duration
Expand All @@ -132,15 +132,15 @@ Shorter videos produce smaller GIFs. Trim before conversion:
```bash
# Extract 3 seconds starting at 00:05
ffmpeg -i video.mp4 -ss 00:00:05 -t 3 -c copy trimmed.mp4
../convert.sh trimmed.mp4
../scripts/convert.sh trimmed.mp4
```

### Combine Optimizations

Stack multiple optimizations for maximum compression:

```bash
../convert.sh --input video.mp4 --fps 8 --width 320 --dither bayer
../scripts/convert.sh --input video.mp4 --fps 8 --width 320 --dither bayer
```

## Batch Conversion
Expand All @@ -149,27 +149,27 @@ Convert multiple videos in a directory:

```bash
for video in *.mp4; do
../convert.sh --input "${video}"
../scripts/convert.sh --input "${video}"
done
```

```powershell
Get-ChildItem -Filter "*.mp4" | ForEach-Object {
../convert.ps1 -InputPath $_.FullName
../scripts/convert.ps1 -InputPath $_.FullName
}
```

Convert with consistent settings:

```bash
for video in *.mp4; do
../convert.sh --input "${video}" --fps 12 --width 640 --dither sierra2_4a
../scripts/convert.sh --input "${video}" --fps 12 --width 640 --dither sierra2_4a
done
```

```powershell
Get-ChildItem -Filter "*.mp4" | ForEach-Object {
../convert.ps1 -InputPath $_.FullName -Fps 12 -Width 640 -Dither sierra2_4a
../scripts/convert.ps1 -InputPath $_.FullName -Fps 12 -Width 640 -Dither sierra2_4a
}
```

Expand Down