You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(subtitle): implement faster-whisper integration for improved subtitles
- Add faster-whisper>=1.0.0 dependency to pyproject.toml and requirements.txt
- Replace FFmpeg whisper filter with faster-whisper library for better performance and reliability
- Implement comprehensive subtitle generation with support for multiple formats (SRT, VTT, TXT, LRC)
- Add helper functions for audio extraction, timestamp formatting, and segment conversion
- Implement file validation checks including audio stream detection, disk space verification, and output file conflict resolution
- Add progress tracking and user-friendly error handling with detailed console feedback
- Support multiple whisper model sizes from tiny to large-v3 for flexible quality/speed tradeoffs
- Improve robustness with temporary file handling and graceful error recovery
<palign="center"><b>Your Editor within CLI</b></p>
19
19
20
20
A powerful and user-friendly Python CLI tool for converting, manipulating, and inspecting media files using the power of FFmpeg. This tool provides a simple command-line menu to perform common audio and video tasks without needing to memorize complex FFmpeg commands.
21
21
22
-
23
22
<palign="center">
24
23
<img src="/assets/peg.gif" width="720">
25
24
</p>
26
25
26
+
## Features at a Glance
27
+
28
+
| Category | Feature | Description |
29
+
|----------|---------|-------------|
30
+
|**Inspect**| Media Properties | View detailed codec, resolution, frame rate, bitrate, and stream information |
31
+
|**Convert**| Video Formats | Convert to MP4, MKV, MOV, AVI, WebM with quality presets (CRF 18/23/28) |
-**Inspect Media Properties**: View detailed information about video and audio streams, including codecs, resolution, frame rate, bitrates, and more.
31
-
-**Convert & Transcode**: Convert videos and audio to a wide range of popular formats (MP4, MKV, WebM, MP3, FLAC, WAV, GIF) with simple quality presets.
32
-
-**Join Videos (Concatenate)**: Combine two or more videos into a single file. The tool automatically handles differences in resolution and audio sample rates for a seamless join.
33
-
-**Trim (Cut) Videos**: Easily cut a video to a specific start and end time without re-encoding for fast, lossless clips.
34
-
-**Visually Crop Videos**: An interactive tool that shows you a frame of the video, allowing you to click and drag to select the exact area you want to crop.
35
-
-**Extract Audio**: Rip the audio track from any video file into MP3, FLAC, or WAV.
36
-
-**Remove Audio**: Create a silent version of your video by stripping out all audio streams.
37
-
-**Image Manipulation**: Perform basic operations on images such as format conversion, resizing, rotating, and flipping.
38
-
-**Batch Conversion**: Convert all media files in the current directory to a specified format in one go.
39
-
-**CLI Interface**: A user-friendly command-line interface that makes it easy to perform common tasks and navigate the tool's features.
40
-
41
-
42
-
## 🚀 Usage
43
117
### Prerequisite: Install FFmpeg
44
118
45
-
> [NOTE]
119
+
> [!NOTE]
46
120
> `peg_this` uses a library called `ffmpeg-python` which acts as a controller for the main FFmpeg program. It does not include FFmpeg itself. Therefore, you must have FFmpeg installed on your system and available in your terminal's PATH.
47
121
48
122
For **macOS** users, the easiest way to install it is with [Homebrew](https://brew.sh/):
@@ -100,15 +174,34 @@ If you want to run the tool directly from the source code:
100
174
python -m src.peg_this.peg_this
101
175
```
102
176
103
-
## 📈 Star History
177
+
## Subtitle Generation
178
+
179
+
The subtitle feature uses [faster-whisper](https://github.com/SYSTRAN/faster-whisper), a fast and accurate speech-to-text engine powered by OpenAI's Whisper model.
180
+
181
+
### How it works
182
+
183
+
1. Select a video file
184
+
2. Choose "Generate Subtitles (Whisper)"
185
+
3. Pick a model size (tiny to large-v3)
186
+
4. Select processing mode (Fast or Accurate)
187
+
5. Choose output type:
188
+
- **Sidecar file**: Export as `.srt`, `.vtt`, `.txt`, or `.lrc`
189
+
- **Soft subtitles**: Embed into video (can be toggled on/off in players)
190
+
- **Hard subtitles**: Burn into video (permanent, always visible)
191
+
192
+
### Supported Languages
193
+
194
+
Using multilingual models (`small`, `medium`, `large-v3`), you can transcribe audio in 99+ languages including English, Spanish, French, German, Chinese, Japanese, Korean, Hindi, Arabic, and many more.
0 commit comments