Skip to content

Commit 793f8f5

Browse files
committed
🎨 更新MediaCodec使用文档
1 parent f91e157 commit 793f8f5

2 files changed

Lines changed: 16 additions & 14 deletions

File tree

README-CN.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,16 @@
3737
## 主要功能
3838
[![](https://jitpack.io/v/AnJoiner/FFmpegCommand.svg)](https://jitpack.io/#AnJoiner/FFmpegCommand)[![License](https://img.shields.io/badge/license-Apache%202-informational.svg)](https://www.apache.org/licenses/LICENSE-2.0)[ ![FFmpeg](https://img.shields.io/badge/FFmpeg-6.0-orange.svg)](https://ffmpeg.org/releases/ffmpeg-6.0.tar.xz)[ ![X264](https://img.shields.io/badge/X264-20191217.2245-yellow.svg)](http://download.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20191217-2245-stable.tar.bz2)[ ![mp3lame](https://img.shields.io/badge/mp3lame-3.100-critical.svg)](https://sourceforge.net/projects/lame/files/latest/download)[ ![fdk-aac](https://img.shields.io/badge/fdkaac-2.0.1-ff69b4.svg)](https://downloads.sourceforge.net/opencore-amr/fdk-aac-2.0.1.tar.gz)[ ![fdk-aac](https://img.shields.io/badge/opencoreamr-1.1.5-critical.svg)](https://sourceforge.net/projects/opencore-amr/files/opencore-amr/opencore-amr-0.1.5.tar.gz)
3939

40-
| 特色功能 | 支持 | 描述 |
41-
|---------------|--------------------|-------------------------|
42-
| ffmpeg命令 | :white_check_mark: | 支持所有的ffmpeg命令 |
43-
| 进度回调 | :white_check_mark: | 支持所有命令的回调 |
44-
| 命令取消 | :white_check_mark: | 支持在命令执行过程中取消命令执行 |
45-
| debug模式 | :white_check_mark: | 支持开启/关闭调试模式 |
46-
| 获取媒体信息 | :white_check_mark: | 获取媒体信息(宽、高...) |
47-
| MediaCodec编解码 | :white_check_mark: | 支持MediaCodec(从 v1.3.0) |
48-
| 平台架构 |:white_check_mark:| 支持 armeabi-v7a, arm64-v8a |
49-
| 独立so |:white_check_mark:| 将多个so合并成一个 `ffmpeg-or.so` |
40+
| 特色功能 | 支持 | 描述 |
41+
|---------------|--------------------|----------------------------|
42+
| ffmpeg命令 | :white_check_mark: | 支持所有的ffmpeg命令 |
43+
| 进度回调 | :white_check_mark: | 支持所有命令的回调 |
44+
| 命令取消 | :white_check_mark: | 支持在命令执行过程中取消命令执行 |
45+
| debug模式 | :white_check_mark: | 支持开启/关闭调试模式 |
46+
| 获取媒体信息 | :white_check_mark: | 获取媒体信息(宽、高...) |
47+
| MediaCodec编解码 | :white_check_mark: | 支持MediaCodec(从 v1.3.0) |
48+
| 平台架构 |:white_check_mark:| 支持 armeabi-v7a, arm64-v8a |
49+
| 独立so |:white_check_mark:| 将多个so合并成一个 `ffmpeg-org.so` |
5050

5151
大致的功能如下:
5252
* 支持视频格式转换 mp4->flv
@@ -167,13 +167,13 @@ var progress = pts/duration!!
167167
```kotlin
168168
// shell 命令: ffmpeg -y -c:v h264_mediacodec -i inputPath -c:v h264_mediacodec outputPath
169169
val command = CommandParams()
170-
.append("-c:v")
170+
.append("-c:v") // 设置解码器
171171
.append("h264_mediacodec")
172172
.append("-i")
173173
.append(inputPath)
174174
.append("-b") // 硬编码一般需要设置视频的比特率(bitrate)
175175
.append("1500k")
176-
.append("-c:v")
176+
.append("-c:v") // 设置编码器
177177
.append("h264_mediacodec")
178178
.append(outputPath)
179179
.get()

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,13 @@ If the requirements are not met, you can add your own FFmpeg command, The follow
164164
```kotlin
165165
// shell command: ffmpeg -y -c:v h264_mediacodec -i inputPath -c:v h264_mediacodec outputPath
166166
val command = CommandParams()
167-
.append("-c:v")
167+
.append("-c:v") // decode
168168
.append("h264_mediacodec")
169169
.append("-i")
170170
.append(inputPath)
171-
.append("-c:v")
171+
.append("-b") // bitrate
172+
.append("1500k")
173+
.append("-c:v") // encode
172174
.append("h264_mediacodec")
173175
.append(outputPath)
174176
.get()

0 commit comments

Comments
 (0)