当前仓库属于关闭状态,部分功能使用受限,详情请查阅 仓库状态说明
146 Star 1.4K Fork 1.7K

OpenHarmony/applications_app_samples
关闭

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
.gitee
code
AI/MindSporeLiteCDemoASR
ArkTS1.2
BasicFeature
DataMock
DocsSample
Ability/Performance/Startup
Account
ApplicationModels
ArkTS
ArkTSUtilsDocModule
ArkUISample
ArkWeb
BundleManagerDocsSample
ConnectivityKit
CoreFile
Drawing
EnterpriseAdminExtensionAbility/EnterpriseAdminExtensionA...
Form
International/Internationalization
Media
AVImageGenerator
AVMetadataExtractor
AVPlayer
AVRecorder/AVRecorderNDK
AVTranscoder
AVTranscoderArkTS
AppScope
entry
hvigor
screenshots
.gitignore
README.md
build-profile.json5
hvigorfile.ts
oh-package.json5
ohosTest.md
AVTranscoderNDK
AsyncTranscoder
Audio
Image
ScreenCapture/ScreenCaptureSample
SoundPool/SoundPoolArkTS
NetWork_Kit
Notification/Notification
PerformanceAnalysisKit
ResourceManagement/RawFile
Security
Sensor
UserAuthentication
bluetoothSample
graphic
LanguageBaseClassLibrary
Performance
Project
Solutions
SuperFeature
SystemFeature
UI
.gitattributes
.gitignore
CodeCommitChecklist.md
LICENSE
OAT.xml
README.md
README_zh.md
SampleReadTemplate.md
changelog.md
ohosTestTemplate.md
releasenote.md
克隆/下载
贡献代码
同步代码
Loading...
README

AVTranscoderArkTS

介绍

本示例为媒体->Media Kit(媒体服务)->使用AVTranscoder实现视频转码(ArkTS)的配套示例工程。

本示例以“开始转码-暂停转码-恢复转码-转码完成”的一次流程为示例,展示AVTranscoder视频转码相关功能。

效果预览

预览

使用说明

  1. 安装编译生成的hap包,并打开应用;
  2. 点击启动转码按钮,当进度条达到100%时完成转码,可从设置的沙箱路径导出生成的转码视频;

工程目录

AVTranscoderArkTS
entry/src/main/ets/
└── pages
│    └── Index.ets (转码界面)
│
└── transcoder
    └── AVTranscoderManager.ets (转码功能)

entry/src/main/resources/
├── base
│   ├── element
│   │   ├── color.json
│   │   ├── float.json
│   │   └── string.json
│   └── media
│
└── rawfile
    └── H264_AAC.mp4 (视频资源)
entry/src/ohosTest/ets/
└── test
    ├── Ability.test.ets (UI测试代码)
    └── List.test.ets (测试套件列表)

相关权限

不涉及

依赖

不涉及

约束和限制

  1. 本示例支持标准系统上运行,支持设备:RK3568;

  2. 本示例支持API20版本SDK,版本号:6.0.0.34;

  3. 本示例已支持使DevEco Studio 5.0.3 Release (构建版本:5.0.9.300,构建 2025年3月13日)编译运行

下载

如需单独下载本工程,执行如下命令:

git init
git config core.sparsecheckout true
echo code/DocsSample/Media/AVTranscoder/AVTranscoderArkTS/ > .git/info/sparse-checkout
git remote add origin https://gitee.com/openharmony/applications_app_samples.git
git pull origin master
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openharmony/applications_app_samples.git
git@gitee.com:openharmony/applications_app_samples.git
openharmony
applications_app_samples
applications_app_samples
master

搜索帮助