Skip to content

Commit 63faa8e

Browse files
committed
release: project version to v1.5.2
update readme about the new features Signed-off-by: Jack Lau <[email protected]>
1 parent 2c8828c commit 63faa8e

File tree

4 files changed

+137
-28
lines changed

4 files changed

+137
-28
lines changed

.augment-guidelines

Lines changed: 68 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ OpenConverter is a multimedia conversion application built on **FFmpeg**, **Qt**
1818
4. Image compression with format/quality control
1919
5. Audio extraction from video files
2020
6. Video cutting with precise time selection
21-
7. Runtime switching of transcoding cores (FFmpeg API, FFTool, BMF)
22-
8. Smooth progress tracking with accurate time estimation
23-
9. Both GUI and CLI interfaces
21+
7. **Batch processing** with queue management for multiple files
22+
8. Runtime switching of transcoding cores (FFmpeg API, FFTool, BMF)
23+
9. Smooth progress tracking with accurate time estimation
24+
10. Both GUI and CLI interfaces
2425

2526
## Project Structure
2627

@@ -93,6 +94,17 @@ OpenConverter/
9394
- RemuxPage: Change container format without re-encoding
9495
- TranscodePage: Full transcoding with codec/quality control
9596

97+
7. **Batch Processing System** (`src/builder/`)
98+
- BatchQueue: Manages queue of batch items for processing
99+
- BatchItem: Represents a single file in the batch queue
100+
- BatchQueueDialog: UI for monitoring batch processing progress
101+
- BatchFileDialog: Dialog for selecting multiple files with visual filter tags
102+
- BatchInputWidget: Widget for managing multiple input files
103+
- BatchOutputWidget: Widget for configuring batch output directory and suffix
104+
- BatchModeHelper: Coordinates between single file and batch modes
105+
- FileSelectorWidget: Unified widget supporting both single and batch file selection
106+
- FilterTagWidget: Visual tag-based widget for user-editable file filters
107+
96108
### Design Patterns
97109

98110
- **Observer Pattern**: ProcessParameter notifies observers (UI) of progress updates
@@ -259,6 +271,17 @@ make -j4
259271
5. Add to `Converter::set_transcoder()` switch statement
260272
6. Update CMakeLists.txt with conditional compilation flags
261273

274+
### Code Quality Tools
275+
276+
**Whitespace Cleanup:**
277+
```bash
278+
./tool/fix_whitespace.sh
279+
```
280+
- Removes trailing whitespace from all lines
281+
- Ensures exactly one newline at end of file
282+
- Processes all staged C++ files (.cpp, .h, .hpp, .cc, .cxx)
283+
- **Does NOT auto-stage** - you must manually review and add changes with `git add`
284+
262285
## Testing
263286

264287
- Unit tests in `src/tests/`
@@ -368,6 +391,48 @@ player->Play();
368391
player->Seek(5000); // Seek to 5 seconds
369392
```
370393

394+
#### FileSelectorWidget
395+
- **Purpose**: Unified file selection widget supporting both single and batch modes
396+
- **Key Features**:
397+
- Browse button for single file selection
398+
- Batch button for multiple file selection
399+
- Automatic mode switching
400+
- Drag-and-drop support
401+
- File filter management
402+
403+
**Usage Example**:
404+
```cpp
405+
FileSelectorWidget *selector = new FileSelectorWidget(
406+
tr("Input File"),
407+
FileSelectorWidget::InputFile,
408+
tr("Select a media file..."),
409+
tr("Media Files (*.mp4 *.avi);;All Files (*.*)"),
410+
tr("Select Media File"),
411+
parent
412+
);
413+
connect(selector, &FileSelectorWidget::FileSelected, this, &Page::OnFileSelected);
414+
connect(selector, &FileSelectorWidget::BatchFilesSelected, this, &Page::OnBatchFilesSelected);
415+
```
416+
417+
#### FilterTagWidget
418+
- **Purpose**: Visual tag-based widget for managing file filters
419+
- **Key Features**:
420+
- Visual tags for each file extension (e.g., `.mp4`, `.avi`)
421+
- Individual delete button (×) for each tag
422+
- Add button to add new extensions
423+
- Auto-normalization of extensions (e.g., `mp4` → `*.mp4`)
424+
- Duplicate prevention
425+
- Horizontal scrolling for many tags
426+
427+
**Usage Example**:
428+
```cpp
429+
FilterTagWidget *filterWidget = new FilterTagWidget(parent);
430+
filterWidget->SetFilter("*.mp4,*.avi,*.mkv");
431+
connect(filterWidget, &FilterTagWidget::FilterChanged, this, [](const QString &filter) {
432+
qDebug() << "New filter:" << filter;
433+
});
434+
```
435+
371436
## Implementation Best Practices
372437

373438
### 1. Non-Blocking UI Operations

README.md

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@ OpenConverter is software built on the [**FFmpeg**](https://ffmpeg.org/), [**Qt*
88

99
The converter includes the following main features:
1010

11-
1. Supports changing video codecs for encoding (e.g., libx264, libx265).
11+
1. Supports changing video/audio codecs for encoding (e.g., libx264, libx265, aac, ac3) with resolution scaling and pixel format conversion.
1212
2. Supports lossless multimedia conversion.
1313
3. Displays information about video and audio streams in multimedia files.
1414
4. Compresses images with format and quality control.
1515
5. Extracts audio from video files.
1616
6. Cuts video with built-in FFmpeg-based player and precise time selection.
17-
7. Shows smooth progress tracking and accurate remaining time while converting files.
18-
8. Allows runtime switching of transcoding cores (FFmpeg, FFTool, BMF).
19-
9. Provides both GUI and Command Line Interface (CLI) for flexible usage.
17+
7. **Batch processing with queue management for multiple files**.
18+
8. Shows smooth progress tracking and accurate remaining time while converting files.
19+
9. Allows runtime switching of transcoding cores (FFmpeg, FFTool, BMF).
20+
10. Provides both GUI and Command Line Interface (CLI) for flexible usage.
2021

2122
This project is developed using the [Qt framework](./doc/Qt.md), the FFmpeg library, and the [BMF framework](https://github.com/BabitMF/bmf).
2223

@@ -40,6 +41,12 @@ After running OpenConverter, you can see and use the following features:
4041

4142
This converter allows users to easily change audio and video codecs. For example, you can choose to use the libx264 or libx265 encoder for higher compression rates and better video quality.
4243

44+
Additionally supports:
45+
- **Resolution scaling** (e.g., 1920x1080 → 1280x720, 4K → 1080p)
46+
- **Pixel format conversion** (e.g., yuv420p, yuv444p, rgb24)
47+
- Bitrate control for both video and audio
48+
- Quality control with qscale parameter
49+
4350
### 2. Support for Lossless Multimedia Conversion
4451

4552
The converter also supports lossless multimedia conversion. This means you can directly convert files from one format to another without re-encoding the original video and audio streams. This is very useful for quick file conversions.
@@ -69,38 +76,53 @@ Cut video segments with precision:
6976
- Accurate start/end time selection
7077
- Supports all FFmpeg-compatible formats
7178

72-
### 7. Advanced Progress Tracking and Time Estimation
79+
### 7. Batch Processing
80+
81+
Process multiple files efficiently:
82+
- **Visual file filter management** with tag-based interface
83+
- Add files individually or scan entire directories
84+
- Queue management with progress monitoring
85+
- Configurable output directory and file suffix
86+
- Support for transcode, extract audio, compress picture, and create GIF operations
87+
- Real-time progress tracking for each file in the queue
88+
89+
### 8. Advanced Progress Tracking and Time Estimation
7390

7491
During file conversion, the player provides:
7592
- Smooth progress updates with UI-friendly refresh rates
7693
- Accurate remaining time estimation using duration smoothing
7794
- Real-time progress percentage and duration tracking
7895
- Detailed console output for monitoring conversion status
7996

80-
### 8. Runtime Switching of Transcoding Cores (FFmpeg, FFTool, BMF)
97+
### 9. Runtime Switching of Transcoding Cores (FFmpeg, FFTool, BMF)
8198

8299
The software offers three different transcoding cores to choose from:
83100
- FFmpeg API-based core for direct library integration
84101
- FFTool core for command-line tool integration
85102
- BMF framework-based core for advanced processing
86103
You can also selectively compile these cores based on your needs.
87104

88-
### 9. Command Line Interface (CLI) Support
105+
### 10. Command Line Interface (CLI) Support
89106

90107
Usage in non-GUI mode:
91108
```bash
92-
./OpenConverter [options] input_file output_file
93-
109+
> ./OpenConverter
110+
Usage: ./OpenConverter [options] input_file output_file
94111
Options:
95-
-t, --transcoder TYPE Set transcoder type (FFMPEG, BMF, FFTOOL)
96-
-v, --video-codec CODEC Set video codec
112+
--transcoder TYPE Set transcoder type (FFMPEG, BMF, FFTOOL)
113+
-v, --video-codec CODEC Set video codec (could set copy)
97114
-q, --qscale QSCALE Set qscale for video codec
98-
-a, --audio-codec CODEC Set audio codec
115+
-a, --audio-codec CODEC Set audio codec (could set copy)
99116
-b:v, --bitrate:video BITRATE Set bitrate for video codec
100117
-b:a, --bitrate:audio BITRATE Set bitrate for audio codec
101118
-pix_fmt PIX_FMT Set pixel format for video
102119
-scale SCALE(w)x(h) Set scale for video (width x height)
120+
-ss START_TIME Set start time for cutting (format: HH:MM:SS or seconds)
121+
-to END_TIME Set end time for cutting (format: HH:MM:SS or seconds)
122+
-t DURATION Set duration for cutting (format: HH:MM:SS or seconds)
103123
-h, --help Show this help message
124+
125+
Note: Use either -to or -t, not both. If both are specified, -to takes precedence.
104126
```
105127

106128
Example:

README_ZH.md

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@ OpenConverter 是一个基于 **FFmpeg**源代码、**Qt**开源框架、**BMF
88

99
这款转换器具有以下主要功能:
1010

11-
1. 支持更改视频编解码器以进行编码(例如libx264,libx265
11+
1. 支持更改音视频编解码器以进行编码(例如libx264,libx265,aac,ac3),支持分辨率缩放和像素格式转换
1212
2. 支持无编码转换多媒体。
1313
3. 支持显示多媒体文件中视频和音频流的信息。
1414
4. 支持图片压缩,可调整格式和质量。
1515
5. 支持从视频中提取音频。
1616
6. 支持视频剪切,内置FFmpeg播放器,精确时间选择。
17-
7. 支持平滑的进度跟踪和准确的剩余时间显示。
18-
8. 运行时切换转码内核(FFmpeg、FFTool、BMF)
19-
9. 提供图形界面和命令行界面(CLI)双重支持。
17+
7. **支持批量处理,队列管理多个文件。**
18+
8. 支持平滑的进度跟踪和准确的剩余时间显示。
19+
9. 运行时切换转码内核(FFmpeg、FFTool、BMF)
20+
10. 提供图形界面和命令行界面(CLI)双重支持。
2021

2122
本项目使用[Qt框架](./doc/Qt.md)、FFmpeg库、[BMF框架](https://github.com/BabitMF/bmf)完成开发。
2223

@@ -40,6 +41,12 @@ FFmpeg 开发教程可参考 [Learn FFmpeg the Hard Way](https://github.com/TSGU
4041

4142
这款转换器允许用户轻松地更改音视频编解码器。例如,您可以选择使用libx264或libx265编码器,以获得更高的压缩率和更好的视频质量。
4243

44+
此外还支持:
45+
- **分辨率缩放**(例如:1920x1080 → 1280x720,4K → 1080p)
46+
- **像素格式转换**(例如:yuv420p、yuv444p、rgb24)
47+
- 视频和音频的比特率控制
48+
- 使用qscale参数进行质量控制
49+
4350
### 2. 支持无编码转换多媒体。
4451

4552
该转换器还支持无需编码即可转换多媒体文件。这意味着您可以在不改变原始视频和音频流的情况下,直接将文件从一种格式转换为另一种格式。这对于快速转换文件非常有用。
@@ -69,38 +76,53 @@ FFmpeg 开发教程可参考 [Learn FFmpeg the Hard Way](https://github.com/TSGU
6976
- 精确的开始/结束时间选择
7077
- 支持所有FFmpeg兼容格式
7178

72-
### 7. 高级进度跟踪和时间估算
79+
### 7. 批量处理
80+
81+
高效处理多个文件:
82+
- **可视化文件过滤器管理**,基于标签的界面
83+
- 单独添加文件或扫描整个目录
84+
- 队列管理,进度监控
85+
- 可配置输出目录和文件后缀
86+
- 支持转码、提取音频、压缩图片和创建GIF操作
87+
- 队列中每个文件的实时进度跟踪
88+
89+
### 8. 高级进度跟踪和时间估算
7390

7491
在转换文件时,该播放器提供:
7592
- 平滑的进度更新,具有UI友好的刷新率
7693
- 使用持续时间平滑的准确剩余时间估算
7794
- 实时进度百分比和持续时间跟踪
7895
- 详细的控制台输出,用于监控转换状态
7996

80-
### 8. 运行时切换转码内核(FFmpeg、FFTool、BMF)
97+
### 9. 运行时切换转码内核(FFmpeg、FFTool、BMF)
8198

8299
该软件提供三种不同的转码内核供选择:
83100
- 基于FFmpeg API的内核,用于直接库集成
84101
- FFTool内核,用于命令行工具集成
85102
- 基于BMF框架的内核,用于高级处理
86103
您还可以根据需求选择性编译这些内核。
87104

88-
### 9. 命令行界面(CLI)支持
105+
### 10. 命令行界面(CLI)支持
89106

90107
非图形界面模式使用方法:
91108
```bash
92-
./OpenConverter [options] input_file output_file
93-
109+
> ./OpenConverter
110+
Usage: ./OpenConverter [options] input_file output_file
94111
Options:
95-
-t, --transcoder TYPE Set transcoder type (FFMPEG, BMF, FFTOOL)
96-
-v, --video-codec CODEC Set video codec
112+
--transcoder TYPE Set transcoder type (FFMPEG, BMF, FFTOOL)
113+
-v, --video-codec CODEC Set video codec (could set copy)
97114
-q, --qscale QSCALE Set qscale for video codec
98-
-a, --audio-codec CODEC Set audio codec
115+
-a, --audio-codec CODEC Set audio codec (could set copy)
99116
-b:v, --bitrate:video BITRATE Set bitrate for video codec
100117
-b:a, --bitrate:audio BITRATE Set bitrate for audio codec
101118
-pix_fmt PIX_FMT Set pixel format for video
102119
-scale SCALE(w)x(h) Set scale for video (width x height)
120+
-ss START_TIME Set start time for cutting (format: HH:MM:SS or seconds)
121+
-to END_TIME Set end time for cutting (format: HH:MM:SS or seconds)
122+
-t DURATION Set duration for cutting (format: HH:MM:SS or seconds)
103123
-h, --help Show this help message
124+
125+
Note: Use either -to or -t, not both. If both are specified, -to takes precedence.
104126
```
105127

106128
使用示例:

src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.10...3.24)
22

3-
project(OpenConverter VERSION 1.5.0 LANGUAGES CXX)
3+
project(OpenConverter VERSION 1.5.2 LANGUAGES CXX)
44

55
set(CMAKE_CXX_STANDARD 17)
66
set(CMAKE_CXX_STANDARD_REQUIRED ON)

0 commit comments

Comments
 (0)