Skip to content

Commit

Permalink
ffmpeg dipper app init
Browse files Browse the repository at this point in the history
  • Loading branch information
rsonghuster committed Aug 22, 2024
1 parent 1def30d commit c4f5ae0
Show file tree
Hide file tree
Showing 12 changed files with 85 additions and 123 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/registry-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: auto try publish all
on:
push:
branches:
- V3
- dipper
env:
REGISTRY_TOKEN: ${{secrets.ALIBABA_REGISTRY_V3_PUBLISH_TOKEN}}

Expand Down
6 changes: 3 additions & 3 deletions ffmpeg-app/publish.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
27 changes: 4 additions & 23 deletions ffmpeg-app/src/readme.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@

> 注:当前项目为 Serverless Devs 应用,由于应用中会存在需要初始化才可运行的变量(例如应用部署地区、函数名等等),所以**不推荐**直接 Clone 本仓库到本地进行部署或直接复制 s.yaml 使用,**强烈推荐**通过 `s init ${模版名称}` 的方法或应用中心进行初始化,详情可参考[部署 & 体验](#部署--体验)
# ffmpeg-app-v3 帮助文档
<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=ffmpeg-app-v3&type=packageType">
</a>
<a href="http://www.devsapp.cn/details.html?name=ffmpeg-app-v3" class="ml-1">
<img src="http://editor.devsapp.cn/icon?package=ffmpeg-app-v3&type=packageVersion">
</a>
<a href="http://www.devsapp.cn/details.html?name=ffmpeg-app-v3" class="ml-1">
<img src="http://editor.devsapp.cn/icon?package=ffmpeg-app-v3&type=packageDownload">
</a>
</p>
# ffmpeg-app-dipper 帮助文档

<description>

Expand All @@ -22,8 +11,6 @@

<codeUrl>

- [:smiley_cat: 代码](https://github.com/devsapp/start-ffmpeg/tree/V3/ffmpeg-app/src)

</codeUrl>
<preview>

Expand Down Expand Up @@ -62,17 +49,11 @@

<appcenter>

- :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) 该应用。

</appcenter>
<deploy>

- 通过 [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`


</deploy>

## 案例介绍
Expand Down Expand Up @@ -314,7 +295,7 @@ video 转为 gif

<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" > |
| <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://images.devsapp.cn/fc-faq/33947367.png" width="130px" > |
| --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| <center>微信公众号:`serverless`</center> | <center>微信小助手:`xiaojiangwh`</center> | <center>钉钉交流群:`33947367`</center> |
</p>
Expand Down
71 changes: 43 additions & 28 deletions ffmpeg-app/src/s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
6 changes: 3 additions & 3 deletions transcode/publish.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
27 changes: 4 additions & 23 deletions transcode/src/readme.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@

> 注:当前项目为 Serverless Devs 应用,由于应用中会存在需要初始化才可运行的变量(例如应用部署地区、函数名等等),所以**不推荐**直接 Clone 本仓库到本地进行部署或直接复制 s.yaml 使用,**强烈推荐**通过 `s init ${模版名称}` 的方法或应用中心进行初始化,详情可参考[部署 & 体验](#部署--体验)
# video-transcode-v3 帮助文档
<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-v3&type=packageType">
</a>
<a href="http://www.devsapp.cn/details.html?name=video-transcode-v3" class="ml-1">
<img src="http://editor.devsapp.cn/icon?package=video-transcode-v3&type=packageVersion">
</a>
<a href="http://www.devsapp.cn/details.html?name=video-transcode-v3" class="ml-1">
<img src="http://editor.devsapp.cn/icon?package=video-transcode-v3&type=packageDownload">
</a>
</p>
# video-transcode-dipper 帮助文档

<description>

Expand All @@ -22,8 +11,6 @@

<codeUrl>

- [:smiley_cat: 代码](https://github.com/devsapp/start-ffmpeg/tree/V3/transcode/src)

</codeUrl>
<preview>

Expand Down Expand Up @@ -62,17 +49,11 @@

<appcenter>

- :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) 该应用。

</appcenter>
<deploy>

- 通过 [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`


</deploy>

## 案例介绍
Expand Down Expand Up @@ -177,7 +158,7 @@ FFmpeg 是音视频处理领域的一款强大工具,它可以被用于格式

<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" > |
| <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://images.devsapp.cn/fc-faq/33947367.png" width="130px" > |
| --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| <center>微信公众号:`serverless`</center> | <center>微信小助手:`xiaojiangwh`</center> | <center>钉钉交流群:`33947367`</center> |
</p>
Expand Down
19 changes: 3 additions & 16 deletions transcode/src/s.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
7 changes: 3 additions & 4 deletions video-flow/publish.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -75,7 +75,6 @@ Parameters:
service: FNF
authorities:
- AliyunFCInvocationAccess
- AliyunFnFFullAccess

functionRoleArn:
title: 函数角色
Expand Down
14 changes: 4 additions & 10 deletions video-flow/readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

> 注:当前项目为 Serverless Devs 应用,由于应用中会存在需要初始化才可运行的变量(例如应用部署地区、函数名等等),所以**不推荐**直接 Clone 本仓库到本地进行部署或直接复制 s.yaml 使用,**强烈推荐**通过 `s init ${模版名称}` 的方法或应用中心进行初始化,详情可参考[部署 & 体验](#部署--体验)
# multimedia-process-flow-v3 帮助文档
# multimedia-process-flow-dipper 帮助文档

<description>

Expand Down Expand Up @@ -55,17 +55,11 @@

<appcenter>

- :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) 该应用。

</appcenter>
<deploy>

- 通过 [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`


</deploy>

## 案例介绍
Expand Down Expand Up @@ -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)

</usedetail>

Expand Down
12 changes: 3 additions & 9 deletions video-flow/src/readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

> 注:当前项目为 Serverless Devs 应用,由于应用中会存在需要初始化才可运行的变量(例如应用部署地区、函数名等等),所以**不推荐**直接 Clone 本仓库到本地进行部署或直接复制 s.yaml 使用,**强烈推荐**通过 `s init ${模版名称}` 的方法或应用中心进行初始化,详情可参考[部署 & 体验](#部署--体验)
# multimedia-process-flow-v3 帮助文档
# multimedia-process-flow-dipper 帮助文档

<description>

Expand Down Expand Up @@ -55,17 +55,11 @@

<appcenter>

- :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) 该应用。

</appcenter>
<deploy>

- 通过 [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`


</deploy>

## 案例介绍
Expand Down
Loading

0 comments on commit c4f5ae0

Please sign in to comment.