diff --git a/.github/workflows/registry-publish.yml b/.github/workflows/registry-publish.yml index 4edb567..3e2c80d 100644 --- a/.github/workflows/registry-publish.yml +++ b/.github/workflows/registry-publish.yml @@ -3,7 +3,7 @@ name: auto try publish all on: push: branches: - - V3 + - dipper env: REGISTRY_TOKEN: ${{secrets.ALIBABA_REGISTRY_V3_PUBLISH_TOKEN}} diff --git a/ffmpeg-app/publish.yaml b/ffmpeg-app/publish.yaml index 3831fb4..b5f75dc 100644 --- a/ffmpeg-app/publish.yaml +++ b/ffmpeg-app/publish.yaml @@ -1,11 +1,11 @@ Edition: 3.0.0 Type: Project -Name: ffmpeg-app-v3 -Version: 0.0.3 +Name: ffmpeg-app-dipper +Version: 0.0.1 Provider: - 阿里云 Description: 基于FFmpeg的音视频处理应用, 包括获取音视频元信息、获取音视频时长、音频转换、雪碧图生成、生成 GIF、打水印等多个模块。 -HomePage: https://github.com/devsapp/start-ffmpeg +HomePage: https://github.com/devsapp/start-ffmpeg/tree/dipper/ffmpeg-app Organization: 阿里云函数计算(FC) Effective: Public Tags: diff --git a/ffmpeg-app/src/readme.md b/ffmpeg-app/src/readme.md index 77c6e70..30c10d7 100644 --- a/ffmpeg-app/src/readme.md +++ b/ffmpeg-app/src/readme.md @@ -1,18 +1,7 @@ > 注:当前项目为 Serverless Devs 应用,由于应用中会存在需要初始化才可运行的变量(例如应用部署地区、函数名等等),所以**不推荐**直接 Clone 本仓库到本地进行部署或直接复制 s.yaml 使用,**强烈推荐**通过 `s init ${模版名称}` 的方法或应用中心进行初始化,详情可参考[部署 & 体验](#部署--体验) 。 -# ffmpeg-app-v3 帮助文档 -

- - - - - - - - - -

+# ffmpeg-app-dipper 帮助文档 @@ -22,8 +11,6 @@ -- [:smiley_cat: 代码](https://github.com/devsapp/start-ffmpeg/tree/V3/ffmpeg-app/src) - @@ -62,17 +49,11 @@ -- :fire: 通过 [Serverless 应用中心](https://fcnext.console.aliyun.com/applications/create?template=ffmpeg-app-v3) , - [![Deploy with Severless Devs](https://img.alicdn.com/imgextra/i1/O1CN01w5RFbX1v45s8TIXPz_!!6000000006118-55-tps-95-28.svg)](https://fcnext.console.aliyun.com/applications/create?template=ffmpeg-app-v3) 该应用。 +:fire: 通过 [Dipper 应用中心](https://devs.console.aliyun.com/applications/createtemplate=ffmpeg-app-dipper) ,[![Deploy with Severless Devs](https://img.alicdn.com/imgextra/i1/O1CN01w5RFbX1v45s8TIXPz_!!6000000006118-55-tps-95-28.svg)](https://devs.console.aliyun.com/applications/createtemplate=ffmpeg-app-dipper) 该应用。 - -- 通过 [Serverless Devs Cli](https://www.serverless-devs.com/serverless-devs/install) 进行部署: - - [安装 Serverless Devs Cli 开发者工具](https://www.serverless-devs.com/serverless-devs/install) ,并进行[授权信息配置](https://docs.serverless-devs.com/fc/config) ; - - 初始化项目:`s init ffmpeg-app-v3 -d ffmpeg-app-v3` - - 进入项目,并进行项目部署:`cd ffmpeg-app-v3 && s deploy -y` - + ## 案例介绍 @@ -314,7 +295,7 @@ video 转为 gif

-| | | | +| | | | | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | |

微信公众号:`serverless`
|
微信小助手:`xiaojiangwh`
|
钉钉交流群:`33947367`
|

diff --git a/ffmpeg-app/src/s.yaml b/ffmpeg-app/src/s.yaml index 3c4a420..ad51fb6 100644 --- a/ffmpeg-app/src/s.yaml +++ b/ffmpeg-app/src/s.yaml @@ -3,68 +3,83 @@ name: ffmpeg-app access: '{{ access }}' vars: region: '{{ region }}' - -template: - template_function_config: - region: ${vars.region} - runtime: python3.9 - handler: index.handler - memorySize: 1024 - timeout: 900 - internetAccess: true - role: '{{ roleArn }}' + role: '{{ roleArn }}' resources: AudioConvert: component: fc3 props: - description: 音频格式转换器 + region: ${vars.region} functionName: '{{ AudioConvert }}' + description: 音频格式转换器 code: ./functions/audio_convert - extend: - name: template_function_config + runtime: python3.9 + handler: index.handler + memorySize: 1024 + timeout: 900 + role: ${vars.role} GetMediaMeta: component: fc3 props: - description: 获取音视频 meta + region: ${vars.region} functionName: '{{ GetMediaMeta }}' + description: 获取音视频 meta code: ./functions/get_multimedia_meta - extend: - name: template_function_config + runtime: python3.9 + handler: index.handler + memorySize: 1024 + timeout: 900 + role: ${vars.role} GetDuration: component: fc3 props: - description: 获取音视频时长 + region: ${vars.region} functionName: '{{ GetDuration }}' + description: 获取音视频时长 code: ./functions/get_duration - extend: - name: template_function_config + runtime: python3.9 + handler: index.handler + memorySize: 1024 + timeout: 900 + role: ${vars.role} VideoGif: component: fc3 props: - description: 功能强大的 video 提取为 gif 函数 + region: ${vars.region} functionName: '{{ VideoGif }}' + description: 功能强大的 video 提取为 gif 函数 code: ./functions/video_gif - extend: - name: template_function_config + runtime: python3.9 + handler: index.handler + memorySize: 1024 + timeout: 900 + role: ${vars.role} GetSprites: component: fc3 props: - description: 功能强大雪碧图制作函数 + region: ${vars.region} functionName: '{{ GetSprites }}' + description: 功能强大雪碧图制作函数 code: ./functions/get_sprites - extend: - name: template_function_config + runtime: python3.9 + handler: index.handler + memorySize: 1024 + timeout: 900 + role: ${vars.role} VideoWatermark: component: fc3 props: - description: 功能强大的视频添加水印功能 + region: ${vars.region} functionName: '{{ VideoWatermark }}' + description: 功能强大的视频添加水印功能 code: ./functions/video_watermark - extend: - name: template_function_config + runtime: python3.9 + handler: index.handler + memorySize: 1024 + timeout: 900 + role: ${vars.role} diff --git a/transcode/publish.yaml b/transcode/publish.yaml index f47d96d..0acda5c 100644 --- a/transcode/publish.yaml +++ b/transcode/publish.yaml @@ -1,11 +1,11 @@ Edition: 3.0.0 Type: Project -Name: video-transcode-v3 +Name: video-transcode-dipper Provider: - 阿里云 -Version: 0.0.8 +Version: 0.0.1 Description: 快速部署音视频转码的应用到阿里云函数计算 -HomePage: https://github.com/devsapp/start-ffmpeg +HomePage: https://github.com/devsapp/start-ffmpeg/tree/dipper/transcode Organization: 阿里云函数计算(FC) Effective: Public Tags: diff --git a/transcode/src/readme.md b/transcode/src/readme.md index c0e84ef..e467a0e 100644 --- a/transcode/src/readme.md +++ b/transcode/src/readme.md @@ -1,18 +1,7 @@ > 注:当前项目为 Serverless Devs 应用,由于应用中会存在需要初始化才可运行的变量(例如应用部署地区、函数名等等),所以**不推荐**直接 Clone 本仓库到本地进行部署或直接复制 s.yaml 使用,**强烈推荐**通过 `s init ${模版名称}` 的方法或应用中心进行初始化,详情可参考[部署 & 体验](#部署--体验) 。 -# video-transcode-v3 帮助文档 -

- - - - - - - - - -

+# video-transcode-dipper 帮助文档 @@ -22,8 +11,6 @@ -- [:smiley_cat: 代码](https://github.com/devsapp/start-ffmpeg/tree/V3/transcode/src) - @@ -62,17 +49,11 @@ -- :fire: 通过 [Serverless 应用中心](https://fcnext.console.aliyun.com/applications/create?template=video-transcode-v3) , - [![Deploy with Severless Devs](https://img.alicdn.com/imgextra/i1/O1CN01w5RFbX1v45s8TIXPz_!!6000000006118-55-tps-95-28.svg)](https://fcnext.console.aliyun.com/applications/create?template=video-transcode-v3) 该应用。 +:fire: 通过 [Dipper 应用中心](https://devs.console.aliyun.com/applications/createtemplate=video-transcode-dipper) ,[![Deploy with Severless Devs](https://img.alicdn.com/imgextra/i1/O1CN01w5RFbX1v45s8TIXPz_!!6000000006118-55-tps-95-28.svg)](https://devs.console.aliyun.com/applications/createtemplate=video-transcode-dipper) 该应用。 - -- 通过 [Serverless Devs Cli](https://www.serverless-devs.com/serverless-devs/install) 进行部署: - - [安装 Serverless Devs Cli 开发者工具](https://www.serverless-devs.com/serverless-devs/install) ,并进行[授权信息配置](https://docs.serverless-devs.com/fc/config) ; - - 初始化项目:`s init video-transcode-v3 -d video-transcode-v3` - - 进入项目,并进行项目部署:`cd video-transcode-v3 && s deploy -y` - + ## 案例介绍 @@ -177,7 +158,7 @@ FFmpeg 是音视频处理领域的一款强大工具,它可以被用于格式

-| | | | +| | | | | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | |

微信公众号:`serverless`
|
微信小助手:`xiaojiangwh`
|
钉钉交流群:`33947367`
|

diff --git a/transcode/src/s.yaml b/transcode/src/s.yaml index 7018b03..6340835 100644 --- a/transcode/src/s.yaml +++ b/transcode/src/s.yaml @@ -1,22 +1,9 @@ -# ------------------------------------ -# If you need English case, you can refer to [s_en.yaml] file -# ------------------------------------ -# 欢迎您使用阿里云函数计算 FC 组件进行项目开发 -# 组件仓库地址:https://github.com/devsapp/fc3 -# 组件帮助文档:https://github.com/devsapp/fc3/blob/master/docs/zh/readme.md -# Yaml参考文档:https://github.com/devsapp/fc3/blob/master/docs/zh/yaml/readme.md -# 关于Serverless Devs和FC组件的关系、如何声明/部署多个函数等问题,可以参考文档:https://github.com/devsapp/fc3/blob/master/docs/zh/tips.md -# 关于如何做CICD等问题,可以参考:https://www.serverless-devs.com/serverless-devs/cicd -# 关于如何进行环境划分等问题,可以参考:https://www.serverless-devs.com/serverless-devs/extend -# 更多函数计算案例,可参考:https://github.com/devsapp/awesome/ -# 有问题快来钉钉群问一下吧:33947367 -# ------------------------------------ - edition: 3.0.0 name: video-transcode access: '{{ access }}' vars: region: '{{ region }}' + resources: video_transcoder: component: fc3 @@ -44,7 +31,7 @@ resources: component: fc3 props: region: ${vars.region} - description: async task destination success function by serverless devs + description: async task destination success function by dipper runtime: python3 handler: index.handler memorySize: 512 @@ -56,7 +43,7 @@ resources: component: fc3 props: region: ${vars.region} - description: async task destination fail function by serverless devs + description: async task destination fail function by dipper runtime: python3 handler: index.handler memorySize: 512 diff --git a/video-flow/publish.yaml b/video-flow/publish.yaml index a7494f0..53a88bc 100644 --- a/video-flow/publish.yaml +++ b/video-flow/publish.yaml @@ -1,11 +1,11 @@ Edition: 3.0.0 Type: Project -Name: multimedia-process-flow-v3 -Version: 0.0.4 +Name: multimedia-process-flow-dipper +Version: 0.0.1 Provider: - 阿里云 Description: 基于 FC + Serverless Workflow + OSS + NAS + FFmpeg 实现的弹性高可用、并行处理的视频转码服务 -HomePage: https://github.com/devsapp/start-ffmpeg/tree/master/multimedia-process-flow +HomePage: https://github.com/devsapp/start-ffmpeg/tree/dipper/video-flow Effective: Public Tags: - flow @@ -75,7 +75,6 @@ Parameters: service: FNF authorities: - AliyunFCInvocationAccess - - AliyunFnFFullAccess functionRoleArn: title: 函数角色 diff --git a/video-flow/readme.md b/video-flow/readme.md index 825e53a..64d1dcb 100644 --- a/video-flow/readme.md +++ b/video-flow/readme.md @@ -1,7 +1,7 @@ > 注:当前项目为 Serverless Devs 应用,由于应用中会存在需要初始化才可运行的变量(例如应用部署地区、函数名等等),所以**不推荐**直接 Clone 本仓库到本地进行部署或直接复制 s.yaml 使用,**强烈推荐**通过 `s init ${模版名称}` 的方法或应用中心进行初始化,详情可参考[部署 & 体验](#部署--体验) 。 -# multimedia-process-flow-v3 帮助文档 +# multimedia-process-flow-dipper 帮助文档 @@ -55,17 +55,11 @@ -- :fire: 通过 [Serverless 应用中心](https://fcnext.console.aliyun.com/applications/create?template=multimedia-process-flow-v3) , - [![Deploy with Severless Devs](https://img.alicdn.com/imgextra/i1/O1CN01w5RFbX1v45s8TIXPz_!!6000000006118-55-tps-95-28.svg)](https://fcnext.console.aliyun.com/applications/create?template=multimedia-process-flow-v3) 该应用。 +:fire: 通过 [Dipper 应用中心](https://devs.console.aliyun.com/applications/createtemplate=multimedia-process-flow-dipper) ,[![Deploy with Severless Devs](https://img.alicdn.com/imgextra/i1/O1CN01w5RFbX1v45s8TIXPz_!!6000000006118-55-tps-95-28.svg)](https://devs.console.aliyun.com/applications/createtemplate=multimedia-process-flow-dipper) 该应用。 - -- 通过 [Serverless Devs Cli](https://docs.serverless-devs.com/user-guide/install) 进行部署: - - [安装 Serverless Devs Cli 开发者工具](https://docs.serverless-devs.com/user-guide/install) ,并进行[授权信息配置]( https://docs.serverless-devs.com/user-guide/config) ; - - 初始化项目:`s init multimedia-process-flow-v3 -d multimedia-process-flow-v3` - - 进入项目,并进行项目部署:`cd multimedia-process-flow-v3 && s deploy -y` - + ## 案例介绍 @@ -99,7 +93,7 @@ FFmpeg 是音视频处理领域的一款强大工具,它可以被用于格式 [![Watch the video](https://img.alicdn.com/imgextra/i2/O1CN01XvnqJu1XLS8SAU7LT_!!6000000002907-2-tps-250-155.png)](http://devsapp.functioncompute.com/video/multimedia-process-flow.mp4) -**P.S.** 当您想要仅在一个简单的函数中直接完成视频处理逻辑时,可以参考[音视频转码 Job](https://github.com/devsapp/start-ffmpeg/tree/V3/transcode/src) +**P.S.** 当您想要仅在一个简单的函数中直接完成视频处理逻辑时,可以参考[音视频转码 Job](https://github.com/devsapp/start-ffmpeg/tree/dipper/transcode/src) diff --git a/video-flow/src/readme.md b/video-flow/src/readme.md index 825e53a..4b21db4 100644 --- a/video-flow/src/readme.md +++ b/video-flow/src/readme.md @@ -1,7 +1,7 @@ > 注:当前项目为 Serverless Devs 应用,由于应用中会存在需要初始化才可运行的变量(例如应用部署地区、函数名等等),所以**不推荐**直接 Clone 本仓库到本地进行部署或直接复制 s.yaml 使用,**强烈推荐**通过 `s init ${模版名称}` 的方法或应用中心进行初始化,详情可参考[部署 & 体验](#部署--体验) 。 -# multimedia-process-flow-v3 帮助文档 +# multimedia-process-flow-dipper 帮助文档 @@ -55,17 +55,11 @@ -- :fire: 通过 [Serverless 应用中心](https://fcnext.console.aliyun.com/applications/create?template=multimedia-process-flow-v3) , - [![Deploy with Severless Devs](https://img.alicdn.com/imgextra/i1/O1CN01w5RFbX1v45s8TIXPz_!!6000000006118-55-tps-95-28.svg)](https://fcnext.console.aliyun.com/applications/create?template=multimedia-process-flow-v3) 该应用。 +:fire: 通过 [Dipper 应用中心](https://devs.console.aliyun.com/applications/createtemplate=multimedia-process-flow-dipper) ,[![Deploy with Severless Devs](https://img.alicdn.com/imgextra/i1/O1CN01w5RFbX1v45s8TIXPz_!!6000000006118-55-tps-95-28.svg)](https://devs.console.aliyun.com/applications/createtemplate=multimedia-process-flow-dipper) 该应用。 - -- 通过 [Serverless Devs Cli](https://docs.serverless-devs.com/user-guide/install) 进行部署: - - [安装 Serverless Devs Cli 开发者工具](https://docs.serverless-devs.com/user-guide/install) ,并进行[授权信息配置]( https://docs.serverless-devs.com/user-guide/config) ; - - 初始化项目:`s init multimedia-process-flow-v3 -d multimedia-process-flow-v3` - - 进入项目,并进行项目部署:`cd multimedia-process-flow-v3 && s deploy -y` - + ## 案例介绍 diff --git a/video-flow/src/s.yaml b/video-flow/src/s.yaml index 2548041..54308c8 100644 --- a/video-flow/src/s.yaml +++ b/video-flow/src/s.yaml @@ -1,5 +1,5 @@ edition: 3.0.0 -name: multimedia-process-flow-v3 +name: multimedia-process-flow access: '{{ access }}' vars: region: '{{ region }}' @@ -20,7 +20,6 @@ resources: code: code/split vpcConfig: auto nasConfig: auto - transcode: component: fc3 @@ -100,6 +99,6 @@ resources: props: name: ${vars.flowName} region: ${vars.region} - description: Serverless workflow video process + description: video process flow = split->transcode->merge->${resources.after-process.output.functionName} definition: ${yaml(file('code/workflows/multimedia-process-workflow.yml'))} roleArn: '{{ fnfRoleArn }}' diff --git a/video-flow/src/variable.yaml b/video-flow/src/variable.yaml new file mode 100644 index 0000000..389547e --- /dev/null +++ b/video-flow/src/variable.yaml @@ -0,0 +1,12 @@ +services: #服务变量 + oss-trigger-workflow: + segInterval: + title: 对视频进行分片处理的分片时间 + type: string + default: "30" + description: 对视频进行分片处理的分片时间,单位为秒 + dstFormats: + title: 转码后的视频格式 + type: string + default: mp4, flv, avi + description: 转码后的视频格式,如果有需要输出多种格式, 使用逗号分隔 \ No newline at end of file