From 74a10312b471046050dd6c660862685c943a73fc Mon Sep 17 00:00:00 2001 From: anycodes <service@52exe.cn> Date: Sat, 30 Apr 2022 19:18:44 +0800 Subject: [PATCH] update --- transcode/publish.yaml | 2 +- transcode/readme.md | 97 +++++++++++++++++++++++++++-------------- transcode/src/readme.md | 97 +++++++++++++++++++++++++++-------------- transcode/src/s.yaml | 56 +++++++++++++++++++----- 4 files changed, 174 insertions(+), 78 deletions(-) diff --git a/transcode/publish.yaml b/transcode/publish.yaml index 9f65be3..ed05363 100644 --- a/transcode/publish.yaml +++ b/transcode/publish.yaml @@ -2,7 +2,7 @@ Type: Application Name: video-transcode Provider: - 阿里云 -Version: 0.0.9 +Version: 0.0.10 Description: 快速部署音视频转码的应用到阿里云函数计算 HomePage: https://github.com/devsapp/start-ffmpeg Tags: diff --git a/transcode/readme.md b/transcode/readme.md index 1d2f379..6d3f455 100644 --- a/transcode/readme.md +++ b/transcode/readme.md @@ -1,43 +1,61 @@ -# 阿里云 FFmpeg 视频转码案例 +# video-transcode 帮助文档 -> 快速部署和体验 Serverless 架构下的 FFmpeg 视频转码案例 +<p align="center" class="flex justify-center"> + <a href="https://www.serverless-devs.com" class="ml-1"> + <img src="http://editor.devsapp.cn/icon?package=video-transcode&type=packageType"> + </a> + <a href="http://www.devsapp.cn/details.html?name=video-transcode" class="ml-1"> + <img src="http://editor.devsapp.cn/icon?package=video-transcode&type=packageVersion"> + </a> + <a href="http://www.devsapp.cn/details.html?name=video-transcode" class="ml-1"> + <img src="http://editor.devsapp.cn/icon?package=video-transcode&type=packageDownload"> + </a> +</p> -- [阿里云 FFmpeg 视频转码案例](#阿里云-ffmpeg-视频转码案例) - - [体验前准备](#体验前准备) - - [代码](#代码) - - [快速部署和体验](#快速部署和体验) - - [在线快速体验](#在线快速体验) - - [在本地部署体验](#在本地部署体验) - - [调用函数](#调用函数) - - [应用详情](#应用详情) - - [拥有函数计算和Serverless工作流两个产品的优势](#拥有函数计算和serverless工作流两个产品的优势) - - [相较于通用的转码处理服务的优点](#相较于通用的转码处理服务的优点) - - [相比于其他自建服务的优点](#相比于其他自建服务的优点) +<description> -## 体验前准备 +> ***快速部署音视频转码的应用到阿里云函数计算*** -该应用案例,需要您开通[阿里云函数计算](https://fcnext.console.aliyun.com/) 产品;并建议您当前的账号有权限存在`FCDefaultRole`。 +</description> -## 代码 +<table> -- [:octocat: 源代码](https://github.com/devsapp/start-ffmpeg/tree/master/transcode/src) -## 快速部署和体验 -### 在线快速体验 -- 通过阿里云 **Serverless 应用中心**: 可以点击 [【🚀 部署】](https://fcnext.console.aliyun.com/applications/create?template=video-transcode) ,按照引导填入参数,快速进行部署和体验。 +</table> -### 在本地部署体验 +<codepre id="codepre"> -1. 下载安装 Serverless Devs:`npm install @serverless-devs/s` - > 详细文档可以参考 [Serverless Devs 安装文档](https://github.com/Serverless-Devs/Serverless-Devs/blob/master/docs/zh/install.md) -2. 配置密钥信息:`s config add` - > 详细文档可以参考 [阿里云密钥配置文档](https://github.com/devsapp/fc/blob/main/docs/zh/config.md) -3. 初始化项目:`s init video-transcode -d video-transcode` -4. 进入项目并部署:`cd video-transcode && s deploy` +# 代码 & 预览 + +- [😼 源代码](https://github.com/devsapp/start-ffmpeg/tree/master/transcode) + + + +</codepre> + +<deploy> + +## 部署 & 体验 + +<appcenter> + +- 🔥 通过 [Serverless 应用中心](https://fcnext.console.aliyun.com/applications/create?template=video-transcode) , +[](https://fcnext.console.aliyun.com/applications/create?template=video-transcode) 该应用。 + +</appcenter> + +- 通过 [Serverless Devs Cli](https://www.serverless-devs.com/serverless-devs/install) 进行部署: + - [安装 Serverless Devs Cli 开发者工具](https://www.serverless-devs.com/serverless-devs/install) ,并进行[授权信息配置](https://www.serverless-devs.com/fc/config) ; + - 初始化项目:\`s init video-transcode -d video-transcode\` + - 进入项目,并进行项目部署:\`cd video-transcode && s deploy -y\` + +</deploy> + +<appdetail id="flushContent"> + +# 应用详情 -### 调用函数 - 1. 发起 5 次异步任务函数调用 ```bash @@ -131,8 +149,21 @@ request id: d4b02745-420c-4c9e-bc05-75cbdd2d010f 通过 Serverless Devs 开发者工具,您只需要几步,就可以体验 Serverless 架构,带来的降本提效的技术红利。 ------ -> - Serverless Devs 项目:https://www.github.com/serverless-devs/serverless-devs -> - Serverless Devs 文档:https://www.github.com/serverless-devs/docs -> - Serverless Devs 钉钉交流群:33947367 \ No newline at end of file +</appdetail> + +<devgroup> + +## 开发者社区 + +您如果有关于错误的反馈或者未来的期待,您可以在 [Serverless Devs repo Issues](https://github.com/serverless-devs/serverless-devs/issues) 中进行反馈和交流。如果您想要加入我们的讨论组或者了解 FC 组件的最新动态,您可以通过以下渠道进行: + +<p align="center"> + +| <img src="https://serverless-article-picture.oss-cn-hangzhou.aliyuncs.com/1635407298906_20211028074819117230.png" width="130px" > | <img src="https://serverless-article-picture.oss-cn-hangzhou.aliyuncs.com/1635407044136_20211028074404326599.png" width="130px" > | <img src="https://serverless-article-picture.oss-cn-hangzhou.aliyuncs.com/1635407252200_20211028074732517533.png" width="130px" > | +|--- | --- | --- | +| <center>微信公众号:\`serverless\`</center> | <center>微信小助手:\`xiaojiangwh\`</center> | <center>钉钉交流群:\`33947367\`</center> | + +</p> + +</devgroup> \ No newline at end of file diff --git a/transcode/src/readme.md b/transcode/src/readme.md index 1d2f379..6d3f455 100644 --- a/transcode/src/readme.md +++ b/transcode/src/readme.md @@ -1,43 +1,61 @@ -# 阿里云 FFmpeg 视频转码案例 +# video-transcode 帮助文档 -> 快速部署和体验 Serverless 架构下的 FFmpeg 视频转码案例 +<p align="center" class="flex justify-center"> + <a href="https://www.serverless-devs.com" class="ml-1"> + <img src="http://editor.devsapp.cn/icon?package=video-transcode&type=packageType"> + </a> + <a href="http://www.devsapp.cn/details.html?name=video-transcode" class="ml-1"> + <img src="http://editor.devsapp.cn/icon?package=video-transcode&type=packageVersion"> + </a> + <a href="http://www.devsapp.cn/details.html?name=video-transcode" class="ml-1"> + <img src="http://editor.devsapp.cn/icon?package=video-transcode&type=packageDownload"> + </a> +</p> -- [阿里云 FFmpeg 视频转码案例](#阿里云-ffmpeg-视频转码案例) - - [体验前准备](#体验前准备) - - [代码](#代码) - - [快速部署和体验](#快速部署和体验) - - [在线快速体验](#在线快速体验) - - [在本地部署体验](#在本地部署体验) - - [调用函数](#调用函数) - - [应用详情](#应用详情) - - [拥有函数计算和Serverless工作流两个产品的优势](#拥有函数计算和serverless工作流两个产品的优势) - - [相较于通用的转码处理服务的优点](#相较于通用的转码处理服务的优点) - - [相比于其他自建服务的优点](#相比于其他自建服务的优点) +<description> -## 体验前准备 +> ***快速部署音视频转码的应用到阿里云函数计算*** -该应用案例,需要您开通[阿里云函数计算](https://fcnext.console.aliyun.com/) 产品;并建议您当前的账号有权限存在`FCDefaultRole`。 +</description> -## 代码 +<table> -- [:octocat: 源代码](https://github.com/devsapp/start-ffmpeg/tree/master/transcode/src) -## 快速部署和体验 -### 在线快速体验 -- 通过阿里云 **Serverless 应用中心**: 可以点击 [【🚀 部署】](https://fcnext.console.aliyun.com/applications/create?template=video-transcode) ,按照引导填入参数,快速进行部署和体验。 +</table> -### 在本地部署体验 +<codepre id="codepre"> -1. 下载安装 Serverless Devs:`npm install @serverless-devs/s` - > 详细文档可以参考 [Serverless Devs 安装文档](https://github.com/Serverless-Devs/Serverless-Devs/blob/master/docs/zh/install.md) -2. 配置密钥信息:`s config add` - > 详细文档可以参考 [阿里云密钥配置文档](https://github.com/devsapp/fc/blob/main/docs/zh/config.md) -3. 初始化项目:`s init video-transcode -d video-transcode` -4. 进入项目并部署:`cd video-transcode && s deploy` +# 代码 & 预览 + +- [😼 源代码](https://github.com/devsapp/start-ffmpeg/tree/master/transcode) + + + +</codepre> + +<deploy> + +## 部署 & 体验 + +<appcenter> + +- 🔥 通过 [Serverless 应用中心](https://fcnext.console.aliyun.com/applications/create?template=video-transcode) , +[](https://fcnext.console.aliyun.com/applications/create?template=video-transcode) 该应用。 + +</appcenter> + +- 通过 [Serverless Devs Cli](https://www.serverless-devs.com/serverless-devs/install) 进行部署: + - [安装 Serverless Devs Cli 开发者工具](https://www.serverless-devs.com/serverless-devs/install) ,并进行[授权信息配置](https://www.serverless-devs.com/fc/config) ; + - 初始化项目:\`s init video-transcode -d video-transcode\` + - 进入项目,并进行项目部署:\`cd video-transcode && s deploy -y\` + +</deploy> + +<appdetail id="flushContent"> + +# 应用详情 -### 调用函数 - 1. 发起 5 次异步任务函数调用 ```bash @@ -131,8 +149,21 @@ request id: d4b02745-420c-4c9e-bc05-75cbdd2d010f 通过 Serverless Devs 开发者工具,您只需要几步,就可以体验 Serverless 架构,带来的降本提效的技术红利。 ------ -> - Serverless Devs 项目:https://www.github.com/serverless-devs/serverless-devs -> - Serverless Devs 文档:https://www.github.com/serverless-devs/docs -> - Serverless Devs 钉钉交流群:33947367 \ No newline at end of file +</appdetail> + +<devgroup> + +## 开发者社区 + +您如果有关于错误的反馈或者未来的期待,您可以在 [Serverless Devs repo Issues](https://github.com/serverless-devs/serverless-devs/issues) 中进行反馈和交流。如果您想要加入我们的讨论组或者了解 FC 组件的最新动态,您可以通过以下渠道进行: + +<p align="center"> + +| <img src="https://serverless-article-picture.oss-cn-hangzhou.aliyuncs.com/1635407298906_20211028074819117230.png" width="130px" > | <img src="https://serverless-article-picture.oss-cn-hangzhou.aliyuncs.com/1635407044136_20211028074404326599.png" width="130px" > | <img src="https://serverless-article-picture.oss-cn-hangzhou.aliyuncs.com/1635407252200_20211028074732517533.png" width="130px" > | +|--- | --- | --- | +| <center>微信公众号:\`serverless\`</center> | <center>微信小助手:\`xiaojiangwh\`</center> | <center>钉钉交流群:\`33947367\`</center> | + +</p> + +</devgroup> \ No newline at end of file diff --git a/transcode/src/s.yaml b/transcode/src/s.yaml index 314fc93..d6c48d0 100644 --- a/transcode/src/s.yaml +++ b/transcode/src/s.yaml @@ -1,16 +1,23 @@ # ------------------------------------ # 欢迎您使用阿里云函数计算 FC 组件进行项目开发 -# 组件仓库地址/帮助文档:https://github.com/devsapp/fc -# Yaml参考文档:https://github.com/devsapp/fc/blob/jiangyu-docs/docs/zh/yaml.md -# 快速入门: -# 快速创建应用:https://github.com/devsapp/fc/blob/jiangyu-docs/docs/zh/quick_start_application.md -# 快速使用命令:https://github.com/devsapp/fc/blob/jiangyu-docs/docs/zh/quick_start_function.md +# 组件仓库地址:https://github.com/devsapp/fc +# 组件帮助文档:https://www.serverless-devs.com/fc/readme +# Yaml参考文档:https://www.serverless-devs.com/fc/yaml/readme +# 关于: +# - Serverless Devs和FC组件的关系、如何声明/部署多个函数、超过50M的代码包如何部署 +# - 关于.fcignore使用方法、工具中.s目录是做什么、函数进行build操作之后如何处理build的产物 +# 等问题,可以参考文档:https://www.serverless-devs.com/fc/tips +# 关于如何做CICD等问题,可以参考:https://www.serverless-devs.com/serverless-devs/cicd +# 关于如何进行环境划分等问题,可以参考:https://www.serverless-devs.com/serverless-devs/extend +# 更多函数计算案例,可参考:https://github.com/devsapp/awesome/ +# 有问题快来钉钉群问一下吧:33947367 # ------------------------------------ - - edition: 1.0.0 name: video-transcode -access: '{{ access }}' +# access 是当前应用所需要的密钥信息配置: +# 密钥配置可以参考:https://www.serverless-devs.com/serverless-devs/command/config +# 密钥使用顺序可以参考:https://www.serverless-devs.com/serverless-devs/tool#密钥使用顺序与规范 +access: "{{ access }}" vars: region: "{{ region }}" @@ -22,8 +29,20 @@ vars: # logConfig: auto services: - VideoTranscoder: - component: fc + VideoTranscoder: # 业务名称/模块名称 + # 如果只想针对 ai-project 下面的业务进行相关操作,可以在命令行中加上 ai-project,例如: + # 只对async-task进行构建:s ai-project build + # 如果不带有 ai-project ,而是直接执行 s build,工具则会对当前Yaml下,所有和 ai-project 平级的业务模块(如有其他平级的模块,例如下面注释的next-function),按照一定顺序进行 build 操作 + component: fc # 组件名称,Serverless Devs 工具本身类似于一种游戏机,不具备具体的业务能力,组件类似于游戏卡,用户通过向游戏机中插入不同的游戏卡实现不同的功能,即通过使用不同的组件实现不同的具体业务能力 +# actions: # 自定义执行逻辑,关于actions 的使用,可以参考:https://www.serverless-devs.com/serverless-devs/yaml#行为描述 +# pre-deploy: # 在deploy之前运行 +# - run: s version publish -a demo +# path: ./src +# - run: docker build xxx # 要执行的系统命令,类似于一种钩子的形式 +# path: ./src # 执行系统命令/钩子的路径 +# - plugin: myplugin # 与运行的插件 (可以通过s cli registry search --type Plugin 获取组件列表) +# args: # 插件的参数信息 +# testKey: testValue props: region: ${vars.region} service: ${vars.service} @@ -71,4 +90,19 @@ services: codeUri: ./code/fail handler: index.handler memorySize: 512 - timeout: 60 \ No newline at end of file + timeout: 60 + +# next-function: # 第二个函数的案例,仅供参考 +# # 如果在当前项目下执行 s deploy,会同时部署模块: +# # helloworld:服务hello-world-service,函数cpp-event-function +# # next-function:服务hello-world-service,函数next-function-example +# # 如果想单独部署当前服务与函数,可以执行 s + 模块名/业务名 + deploy,例如:s next-function deploy +# # 如果想单独部署当前函数,可以执行 s + 模块名/业务名 + deploy function,例如:s next-function deploy function +# # 更多命令可参考:https://www.serverless-devs.com/fc/readme#文档相关 +# component: fc +# props: +# region: ${vars.region} +# service: ${vars.service} # 应用整体的服务配置 +# function: # 定义一个新的函数 +# name: next-function-example +# description: 'hello world by serverless devs'