Removing old code, updating readme

This commit is contained in:
Dan 2026-01-16 10:19:57 +00:00
parent 6f332d46aa
commit e4aff104b2
2 changed files with 28 additions and 29 deletions

View file

@ -17,6 +17,17 @@ A Python tool that searches video subtitles for text matches and generates GIF c
- FFmpeg 7.0+ (with subtitle support)
- `pipx` for installation (recommended)
### Python Dependencies
**Required:**
- `srt` - For SRT subtitle parsing
- `webvtt-py` - For WebVTT subtitle parsing
**Optional:**
- `colorama` - For colored terminal output (enhances readability and looks pretty)
## Installation
### Using pipx (Recommended)
@ -30,7 +41,13 @@ This creates an isolated environment and installs the `video-subtitle-gif` comma
### Manual Installation
```bash
# Install required dependencies
pip install srt webvtt-py
# Install optional dependencies for better experience
pip install colorama
# Run the script
python video_subtitle_gif.py [options]
```
@ -63,10 +80,11 @@ video-subtitle-gif video.mp4 "search text" \
- `video_path`: Path to the video file (required)
- `search_text`: Text to search for in subtitles (required)
- `--output-prefix PREFIX`: Prefix for output files (default: `output`)
- `--fps FPS`: GIF framerate in frames per second (default: `10`)
- `--fps FPS`: GIF framerate in frames per second (default: `10`, range: 1-60)
- `--width WIDTH`: GIF width in pixels, height auto-calculated (default: `480`)
- `--context-before SECONDS`: Tweak the start time of the output GIF (default: `0`)
- `--context-after SECONDS`: Tweak the end time of the output GIF (default: `0`)
- `--context-before SECONDS`: Extra seconds before subtitle start (default: `0`, can be negative to trim)
- `--context-after SECONDS`: Extra seconds after subtitle end (default: `0`, can be negative to trim)
- `--include-surrounding-subtitles`: Include subtitles from surrounding lines in the output (optional flag)
## Examples
@ -155,6 +173,7 @@ Any format supported by FFmpeg (MP4, MKV, AVI, WebM, etc.)
### "Library not installed" errors
- Install missing dependencies: `pip install srt webvtt-py`
- For colored output: `pip install colorama`
- Or reinstall with pipx: `pipx reinstall video-subtitle-gif`
### Poor GIF quality