1 Star 0 Fork 151

龚成波 / express-ffmpeg

forked from 屈阿零 / express-ffmpeg 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Apache-2.0

自带 CMS 系统的云转码系统,一体化自动发布云转码 cms 系统

社区

官方合作社区:合作社区 大量ffmpeg尖端技术分享,集群转码,多线程转码,使用窍门,有问题可以在社区提问,别在码云里边提问了。 承接cms开发,云转码定制,app开发对接,如果有需要可以发送需求到邮箱bted2k@gmail.com

公告申明

开源版为开发中产品,很多功能并不稳定,仅供测试学习,如果需要正式运营,建议使用超级纯净版theone ffmpeg视频转码切片系统,企业级框架egg.js编写完成: theone ffmpeg 或者 高级版,可对接高级版APP,多码率,高级试看,超级防盗链,高级CMS等功能:高级云转码更新

  • 对接源码的原生在线视频app,安卓版本:链接:https://pan.baidu.com/s/1XhTVdlrPPM4nTushlkXx2g 密码:3ob3 ,欢迎测试。
  • IOS本人无企业证书,无法构建绕过app store的ios应用程序,如果谁有企业证书可以联系我。

新官网上线:https://www.moemv.com

开发计划

我想象中的云转码应该是一个总控系统,后台可以无限的添加转码机器,最终将是一个无限扩容的云转码,一个真正的云转码,所以现在我正在做一个这么个东西,后台可以无限添加转码机器,并且一个总控控制所有机器,所有转码内容集成在总控中,配合总控的高级CMS,配合用户上传,甚至可以做出来真正的网盘系统。有兴趣可以联系我,给与意见或者预约。

高级云转码+CMS,用户组展示

  • 高级cms更新情况:高级云转码更新
  • 后台直接设置跑马灯显示广告,显示时长,每隔多少秒出现一次,完全不需要复杂的任何操作,后台直接操作,随时更改,并且可以根据多分辨率自动生成匹配的大小。
  • 配合高级CMS和高级用户组功能,可以设置用户组观看分辨率权限,并且前台可以设置用户推广链接,根据推广IP增加积分,进而升级用户组解锁高级分辨率。
  • 非常适合做社群分享,病毒式传播。
  • 新增超级截图功能,比原来截图功能快了100倍(毫无夸张),只需要1秒即可截图5张,高级功能。
  • 视频页全部数据redis缓存,数据存入内存,打开速度拔尖。
  • 标签化深度SEO,SEO效果优秀。
  • 新增截取视频片段生成gif动态图,后台配置截取开始和时长,尺寸,转码时自动合成gif动态图。 多码率版本 跑马灯展示 切换分辨率 权限提示 用户中心 用户组管理 添加用户组

实测多码率转码mp4大小对照

测试用视频4000mb,转码以后,240p为175mb,360p为220mb,480p为265mb,720p为450mb,1080p为820mb。仅供参考,跟视频相关性较大。

最新多端视频套件正式发布

套件图示:

视频多端套件

涉及源码:
演示链接:
说明
  • 云转码 express-ffmpeg 配合 高级版 CMS 可以做成非常高级的功能,比如这个正在运营的百萌电影预告片网,利用标签整合,可以把 SEO 效果做到最大化。
  • app 采用 react-native 编写,多端共用一套源码,构建出来的 APP 本身就是原生APP,并非H5app完全不是一个档次,稳定60 帧的完美原生 APP 体验。

2018 年 9 月 4 日大更新

这次完全更改了项目了定位,云转码不再是简单的云转码系统,而是 CMS 系统+云转码系统一体化,自带整个完备的并且对移动端友好的,而且非常利于 SEO 优化的自适应 CMS 系统,根据后台的分类系统和门户 CMS 管理系统,直接在首页达成完备的在线视频播放系统,适用于在线教育、企业内部培训视频、在线视频自媒体门户等多种运用方向。这次更新完善了视频的分类系统,完善了视频的搜索功能。CMS 现在集成有视频发布,文章发布和图集发布三个功能。

增加会员系统

增加会员系统,可以不开启 CMS,独立开启会员系统,双向验证,安全可靠,后台可以配合卡劵生成,前台用户使用卡劵进行升级。

真正意义上的权限系统

路由层面的权限系统,非网上的播放器假权限,根据权限不同,相同的 M3U8 播放文件返回不同的内容,比如普通会员只能播放 3 分钟,就只会返回 3 分钟的切片内容,升级之后才会返回完整的切片内容。

卡劵系统

后台设定卡劵生成,可以设置开通会员时间,用户前台使用即可升级到对应的会员,到期之后权限失效,需要重新开通,如果连续使用则是累加会员时间。

项目介绍

主要实现功能: 一、视频批量上传,视频分块上传。 二、视频批量转码并且切片,切片完成删除原视频文件。 三、视频批量添加水印。 四、一键获取分享链接,防盗链设置,只允许指定域名 ifream 调用,token 防盗链等。 五、自带完备的 CMS 系统。

本开源项目采用 nodejs、expressjs、mongodb 开发。 使用前请安装 ffmpeg。

软件架构

nodejs v8.7.0 版本 expressjs 4.16.0 版本 mongoDb ffmpeg 3.4.1 版本 Linux 系统上运行完美。

安装教程

自己编译
  1. 安装 ffmpeg Ubuntu16.04 安装方法:
sudo add-apt-repository ppa:djcj/hybrid
sudo apt-get update
sudo apt-get install ffmpeg

然后输入 ffmpeg 和 ffprobe 查看是否安装成功。

  1. 安装 nodejs、expessjs、mongodb、redis 环境。 详情见:express+nodejs+redis+mongodb+pm2+nginx 环境部署安装,生产环境及开发环境部署

  2. node ./bin/www 访问 localhost:3000/server 登陆账号密码在/config/auth.js 中设置

  3. ffmpeg 烧录字幕的时候会查找字体配置文件,/etc/fonts,如果里边没有 fonts.conf,请将本源码中 fonts.conf 上传到/etc/fonts,有些 linux 系统没有中文字体支持,请将 msyh.ttf 上传至/usr/share/fonts 里边。

利用 sh 文件安装
  • ./install.sh 使用前请给予权限。(已经弃用,请前往官网按步骤安装)

使用说明

  1. 创建/config 文件夹并在里边创建 auth.js 文件 代码如下:
module.exports = {
    user: "username",
    password: "password",
    db: "dbname",
    dbuser: "dbuser",
    dbpassword: "dbpassword",
    secret: "yoursecret",
    login: "/adminloginurl",
    loginmsg: "404 Not Found"
};

**注意:**很多用户安装出错就在这里,比很早的版本多了三个设置项,secret 是 session 需要的秘钥,login 是后台登陆地址,loginmsg 是后台未登录显示的内容,默认是 404。

  1. 登陆后台之后请立刻在设置中进行设置。
  2. 上传视频即可上传视频。
  3. 转码页面一键转码。
  4. 支持后台字幕上传,名称与视频名一致,则系统会自动烧录字幕。例如:aaa.mp4,则 srt 字幕名为 aaa.srt。
  5. 支持一键入库,利用 ftp 等工具将视频上传至 movies 文件夹,后台可以一键入库,进行转码切片操作。
  6. 秒切功能,开启之后,无需进行转码的视频会直接切片。(后台可设置)

版本

V5.2 版本
  • app 和 cms 已经上线,专用 app,跨平台构建,原生 APP 体验。
  • 更改分发配置为随机模式,随机添加前缀到 ts 文件。
  • 为队列转码添加一些参数,更加完善。
  • 修复一个读取元数据失败进程消失的 bug,以后出现元数据错误会直接跳过。
V5.1 版本
V5 版本
  • 增加后台登陆地址修改功能,增加后台访问提示信息功能。
  • 增加视频总量和未完成、完成的统计功能。
  • 增加大量 API,为 APP 做准备,APP 已经出了原型,最近会放出 demo 安装包。
  • APP 和新型超级 CMS 正在配套完善中。
  • express-ffmpeg 进化成为跨平台多端产品。
V4.3 版本
  • 增加批量切片头的功能,选择视频,设置时间轴,一键切片头,利用速度最快的参数,秒切片头。
  • 增加 m3u8 开放浏览功能,设置里边删除 key,则 m3u8 开放浏览,可以分享到任何播放器进行播放,如果设置了 key,则可以使用 m3u8api 调用,安全性更高。
  • 修复转码切片核心源码中的一个 bug,此 bug 会导致切片时候之后转码也会失败,推荐更新。
V4.2 版本
  • 更新了上传封面功能,可以独立为视频上传封面,没有上传封面就会使用截图做封面。
  • 增加了 M3U8 的 api 功能,直接填入需要输入 m3u8 的地方就可以直接调用 m3u8,此 api 仅支持 H5 播放器,ckplayer 等 flash 播放器不支持,并且需要 nginx 的正确配置。
  • 引入 redis 缓存机制,有些页面需要大量计算的地方,通过 redis 缓存速度大增,后期可以为分布式做准备。
  • CMS 首页更改为 2 列排序,手机上的效果更好。
  • 因为 bootcss 的 CDN 爆炸,已经把所有 cdn 上的 JS 和 css 全部更改为本地。
V4.1 版本
  • 优化分类引用防盗链控制的逻辑,增加单分类开放浏览的选项。
  • 优化后台视频管理数量选择,和一键批量修改。
  • 后台增加设置选项,设置引用盗链跳转链接。
  • 图集页展示更加完美。
V4 版本
  • 大更新,CMS 怎么能没有图集发布和文章发布,这次更新增加图集和文章发布的完整支持。
  • 图集发布,一键上传图片,一键完成封面截图,一键前端展示,点击翻页。
  • 文章发布,集成 editor.md,markdown 编辑器,极其完美的书写体验。
  • 增加分类编辑,编辑中可以针对分类添加防引用盗链,盗链功能颗粒化管理。
  • 电影管理页,增加一键修改所有电影分类的功能。
  • 增加播放器文字水印广告背景色和背景透明度设置。
  • 完全重写分享页面的代码,速度更快。
V3.2 版本
  • 增加播放器进度条预览效果,鼠标移动到进度条会显示对应时间轴的预览图。
  • 增加后台设置 TS 加密,设置加密之后,切片文件 TS 会全部加密。
  • Ts 加密高级特性,每一个视频都对应一个独立的 KEY 文件,安全性大涨。 输入图片说明 输入图片说明
V3.1 版本
  • 增加队列转码功能,先上传的先转码,循环处理,转码失败会自动跳过
  • 增加后台统计代码功能,可以添加第三方统计代码,分享链接和 CMS 单独设置
  • 修复会员开通卡劵之后,m3u8 浏览器缓存问题
V3 版本
  • 市面上唯一的路由层面的权限控制
  • 完备可扩展的会员系统
  • VIP 卡劵后台一键生成
  • 根据权限不同,相同 M3u8 文件动态生成不同的内容
V2.1 版本
  • 增加防盗链域名多域名支持
  • 针对手机 QQ 浏览器优化,支持显示播放器水印广告和文字链接广告
  • 增加图表统计页面,炫酷图表统计和表格统计。
  • 增加 P2P 功能,待测试效果。
V2 版本:
  • 大更新,增加门户 CMS 设置,内嵌 CMS 系统
  • 增加播放器配置
  • 播放器图片水印和文字广告
  • 播放页面完全自定义图片水印和文字广告
V1.5 版本:
  • 完全重构 ffmpeg 相关的所有代码。
  • 将转码和切片合并成一次操作,提升双倍效率,原来是转码成 mp4,然后再 mp4 切片。
  • 完全重写切片代码,秒切的速度提升超过 10 倍,1G 视频切片完成只需要半分钟。
V1.4 版本:
  • 增加了 1080P 的选项。
  • 增加切片 ts 域名分发,负载均衡的功能。
  • 开启域名分发,数台服务器同步切片内容,访问 m3u8 动态生成循环域名切片前缀。
v1.3 版本:
  • 更改播放器为 Dplayer 播放。
  • 增加 VTT 字幕支持,后台可以给视频分别上传 vtt 字幕,前台播放会自动加载,支持了字幕和视频分开。
  • 增加一个 webtorrent 功能(测试玩),地址:yourdomain/playmagnet。
v1.2 版本:
  • 增加批量烧录字幕功能,支持 srt 字幕,改成和视频名一样,系统在转码的时候会自动把字幕烧录进去。如果存在 srt 字幕文件,则对应电影无论是否设置秒切都会进行转码。
  • 增加批量入库功能,利用 ftp 或者其他工具将视频传至 movies 文件夹,在后台即可一键入库。
  • 增加秒切功能,后台设置开启,即视频如果小于设置的分辨率并且编码为 h264 则会跳过转码直接切片。
  • 增加自动生成截图功能,默认 4 张截图,路径 yourdomain/videos/:id/(1|2|3|4).jpg。
v1.1 版本:
  • 批量上传视频,大文件切片上传。
  • 批量转码并切片。
  • 设置防盗链和分辨率,添加水印,一气呵成。

截图

图集展示 文章列表 图集 视频 输入图片说明 输入图片说明 输入图片说明 输入图片说明 输入图片说明 输入图片说明 输入图片说明 输入图片说明 图表统计 输入图片说明 ts文件域名分发 上传截图 设置

Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: You must give any other recipients of the Work or Derivative Works a copy of this License; and You must cause any modified files to carry prominent notices stating that You changed the files; and You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2018 屈阿零 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

简介

云转码切片平台linux windows通用版本 nodejs开发 https://www.moejj.com https://www.moemv.com 展开 收起
JavaScript
Apache-2.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/xiaochou164/express-ffmpeg.git
git@gitee.com:xiaochou164/express-ffmpeg.git
xiaochou164
express-ffmpeg
express-ffmpeg
master

搜索帮助

14c37bed 8189591 565d56ea 8189591