Spaces:
Sleeping
Sleeping
Remove demo directory for HF Space compatibility
Browse files- demo/README.md +0 -62
- demo/download-samples.sh +0 -87
demo/README.md
DELETED
|
@@ -1,62 +0,0 @@
|
|
| 1 |
-
# Demo Videos
|
| 2 |
-
|
| 3 |
-
This directory contains sample videos for testing the video processing tool.
|
| 4 |
-
|
| 5 |
-
## Available Videos
|
| 6 |
-
|
| 7 |
-
### sample-10s.mp4
|
| 8 |
-
- **Duration**: 10 seconds
|
| 9 |
-
- **Resolution**: 1920x1080
|
| 10 |
-
- **Video**: Colorful test pattern with moving elements
|
| 11 |
-
- **Audio**: 440Hz sine wave tone (perfect for testing audio extraction)
|
| 12 |
-
- **Source**: Generated using ffmpeg
|
| 13 |
-
- **License**: Public Domain (generated content)
|
| 14 |
-
- **Download**: Run `./download-samples.sh` to create this file
|
| 15 |
-
|
| 16 |
-
### sample-30s.mp4
|
| 17 |
-
- **Duration**: 30 seconds
|
| 18 |
-
- **Resolution**: 1280x720
|
| 19 |
-
- **Video**: Colorful test pattern with moving elements
|
| 20 |
-
- **Audio**: 1000Hz sine wave tone (different frequency for variety)
|
| 21 |
-
- **Source**: Generated using ffmpeg
|
| 22 |
-
- **License**: Public Domain (generated content)
|
| 23 |
-
- **Download**: Run `./download-samples.sh` to create this file
|
| 24 |
-
|
| 25 |
-
## Usage
|
| 26 |
-
|
| 27 |
-
**Step 1:** Create the sample videos
|
| 28 |
-
```bash
|
| 29 |
-
./download-samples.sh
|
| 30 |
-
```
|
| 31 |
-
|
| 32 |
-
**Step 2:** Test the video processing tool with these samples
|
| 33 |
-
|
| 34 |
-
Trim the 10-second video to first 5 seconds:
|
| 35 |
-
```bash
|
| 36 |
-
../trim-convert.sh -e 00:00:05 sample-10s.mp4
|
| 37 |
-
```
|
| 38 |
-
|
| 39 |
-
Extract middle portion of the 30-second video:
|
| 40 |
-
```bash
|
| 41 |
-
../trim-convert.sh -s 00:00:10 -e 00:00:20 sample-30s.mp4
|
| 42 |
-
```
|
| 43 |
-
|
| 44 |
-
Extract audio from the entire video:
|
| 45 |
-
```bash
|
| 46 |
-
../trim-convert.sh sample-10s.mp4
|
| 47 |
-
```
|
| 48 |
-
|
| 49 |
-
**Step 3:** Check the output files
|
| 50 |
-
```bash
|
| 51 |
-
ls -la trimmed.*
|
| 52 |
-
```
|
| 53 |
-
|
| 54 |
-
## License Information
|
| 55 |
-
|
| 56 |
-
All videos in this directory are generated content and are free to use, modify, and distribute:
|
| 57 |
-
|
| 58 |
-
- **Public Domain**: Generated test patterns have no copyright restrictions
|
| 59 |
-
- **Safe to use**: Perfect for testing and development without any legal concerns
|
| 60 |
-
- **No attribution required**: Use freely in your projects
|
| 61 |
-
|
| 62 |
-
These videos are created using ffmpeg's built-in test pattern generators, making them completely safe for any use case.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
demo/download-samples.sh
DELETED
|
@@ -1,87 +0,0 @@
|
|
| 1 |
-
#!/bin/bash
|
| 2 |
-
|
| 3 |
-
# Download script for sample videos
|
| 4 |
-
# All videos are verified to be copyright-free and safe to use
|
| 5 |
-
|
| 6 |
-
echo "Creating sample videos for testing..."
|
| 7 |
-
echo "All videos will be copyright-free and safe to use for testing."
|
| 8 |
-
echo
|
| 9 |
-
|
| 10 |
-
# Check if curl is available
|
| 11 |
-
if ! command -v curl &> /dev/null; then
|
| 12 |
-
echo "Error: curl is required but not installed."
|
| 13 |
-
exit 1
|
| 14 |
-
fi
|
| 15 |
-
|
| 16 |
-
# Create a temporary directory for downloads
|
| 17 |
-
TEMP_DIR=$(mktemp -d)
|
| 18 |
-
|
| 19 |
-
# Function to download and verify a video
|
| 20 |
-
download_video() {
|
| 21 |
-
local url="$1"
|
| 22 |
-
local filename="$2"
|
| 23 |
-
local description="$3"
|
| 24 |
-
|
| 25 |
-
echo "Downloading $filename - $description"
|
| 26 |
-
|
| 27 |
-
if curl -L -o "$TEMP_DIR/$filename" "$url"; then
|
| 28 |
-
# Basic verification that we got a video file
|
| 29 |
-
if file "$TEMP_DIR/$filename" | grep -q "video\|MP4\|media"; then
|
| 30 |
-
mv "$TEMP_DIR/$filename" "$filename"
|
| 31 |
-
echo "SUCCESS: Downloaded $filename"
|
| 32 |
-
else
|
| 33 |
-
echo "ERROR: Downloaded file is not a valid video"
|
| 34 |
-
rm -f "$TEMP_DIR/$filename"
|
| 35 |
-
return 1
|
| 36 |
-
fi
|
| 37 |
-
else
|
| 38 |
-
echo "ERROR: Failed to download $filename"
|
| 39 |
-
return 1
|
| 40 |
-
fi
|
| 41 |
-
}
|
| 42 |
-
|
| 43 |
-
# Create sample videos using ffmpeg (ensures they're always available)
|
| 44 |
-
echo "Creating sample videos using ffmpeg..."
|
| 45 |
-
|
| 46 |
-
# Check if ffmpeg is available
|
| 47 |
-
if ! command -v ffmpeg &> /dev/null; then
|
| 48 |
-
echo "Error: ffmpeg is required to create sample videos."
|
| 49 |
-
echo "Please install ffmpeg first, then run this script."
|
| 50 |
-
exit 1
|
| 51 |
-
fi
|
| 52 |
-
|
| 53 |
-
# Create 10-second sample video
|
| 54 |
-
echo "Creating sample-10s.mp4 (10-second test pattern)..."
|
| 55 |
-
ffmpeg -f lavfi -i testsrc2=duration=10:size=1920x1080:rate=30 -f lavfi -i sine=frequency=440:duration=10 -c:v libx264 -preset ultrafast -crf 23 -c:a aac -b:a 128k sample-10s.mp4 -y 2>/dev/null
|
| 56 |
-
|
| 57 |
-
if [ $? -eq 0 ]; then
|
| 58 |
-
echo "SUCCESS: Created sample-10s.mp4 (10-second test pattern)"
|
| 59 |
-
else
|
| 60 |
-
echo "ERROR: Failed to create sample-10s.mp4"
|
| 61 |
-
fi
|
| 62 |
-
|
| 63 |
-
# Create 30-second sample video
|
| 64 |
-
echo "Creating sample-30s.mp4 (30-second test pattern)..."
|
| 65 |
-
ffmpeg -f lavfi -i testsrc2=duration=30:size=1280x720:rate=30 -f lavfi -i sine=frequency=1000:duration=30 -c:v libx264 -preset ultrafast -crf 23 -c:a aac -b:a 128k sample-30s.mp4 -y 2>/dev/null
|
| 66 |
-
|
| 67 |
-
if [ $? -eq 0 ]; then
|
| 68 |
-
echo "SUCCESS: Created sample-30s.mp4 (30-second test pattern)"
|
| 69 |
-
else
|
| 70 |
-
echo "ERROR: Failed to create sample-30s.mp4"
|
| 71 |
-
fi
|
| 72 |
-
|
| 73 |
-
# Clean up
|
| 74 |
-
rm -rf "$TEMP_DIR"
|
| 75 |
-
|
| 76 |
-
echo
|
| 77 |
-
echo "Sample video creation complete!"
|
| 78 |
-
echo "You can now test the video processing tool with these samples:"
|
| 79 |
-
echo
|
| 80 |
-
echo "Step 1: Trim the 10-second video to first 5 seconds"
|
| 81 |
-
echo " ../trim-convert.sh -e 00:00:05 sample-10s.mp4"
|
| 82 |
-
echo
|
| 83 |
-
echo "Step 2: Extract middle portion of the 30-second video"
|
| 84 |
-
echo " ../trim-convert.sh -s 00:00:10 -e 00:00:20 sample-30s.mp4"
|
| 85 |
-
echo
|
| 86 |
-
echo "Step 3: Extract audio from entire video"
|
| 87 |
-
echo " ../trim-convert.sh sample-10s.mp4"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|