GithubHelp home page GithubHelp logo

maysrp / yunbt Goto Github PK

View Code? Open in Web Editor NEW
318.0 11.0 115.0 23.88 MB

Aria2 FFmpeg 的多用户下载视频转码

License: Other

PHP 47.90% HTML 14.74% JavaScript 31.39% CSS 4.01% Smarty 0.72% Vue 0.01% Roff 0.01% Python 0.22% PLpgSQL 1.01%
offline ffmpeg

yunbt's Introduction

YunBT


基于ThinkCMS的YunBT的多用户下载程序,支持Magnet和HTTP下载。每个单独用户支持10个任务,默认下载文件最大为10GB,可以在后台修改。下载完成后用户可以直接查看下载的文件,系统将使用ffmpeg将视频转码为720P的mp4格式的视频,用户可以分享下载完的任务。管理员可以添加用户的下载量及查看管理下载任务。

测试站点:www.yunbt.net
测试站点默认下载限制单个下载小于1GB

截图

分享密码
分享密码 分享
分享 视频文件
视频文件 下载列表
下载列表
后台转码页面
后台转码
�水印及切片设置
水印设置
Dplayer播放器
Dplayer播放器

安装

服务器环境

Linux Nginx Mysql Php Python

LNMP安装

lnmp 一键安装环境 wget http://soft.vpser.net/lnmp/lnmp1.5.tar.gz -cO lnmp1.5.tar.gz && tar zxf lnmp1.5.tar.gz && cd lnmp1.5 && ./install.sh lnmp
详尽步骤

Redis

lnmp安装redis
./addons.sh install redis 详尽步骤

Aria2

安装Aria2
apt-get update && apt-get install -y aria2

cd /root

mkdir .aria2 && cd .aria2

wget http://webdir.cc/aria2.conf

wget http://webdir.cc/dht.dat

echo '' > /root/aria2.session

screen -dmS aria2 aria2c --enable-rpc --rpc-listen-all=true --rpc-allow-origin-all -c

ffmpeg

apt-get install ffmpeg

PHP

php>7
lnmp下php安装fileinfo插件
lnmp1.4 安装php fileinfo扩展 方法

  • 第一步:在lnmp1.4找到php安装的版本
    使用命令 tar -jxvf php-7.1.7.tar.bz2 解压

  • 第二步: 在解压的php-7.1.7文件夹里找到fileinfo文件夹,然后使用命令 cd /home/xxx/lnmp1.4/src/php-7.1.7/ext/fileinfo进入到fileinfo文件夹

  • 第三步:输入/usr/local/php/bin/phpize 得到数据

  • 第四步: 使用如下命令编译安装
    ./configure -with-php-config=/usr/local/php/bin/php-config
    make && make install

  • 第五步:再修改/usr/local/php/etc/php.ini 查找:extension = 再最后一个extension= 后面添加上extension = "fileinfo.so" 保存,执行/etc/init.d/php-fpm restart 重启。

Nginx

nginx修改fastcgi.conf配置

lnmp下该文件在 /usr/local/nginx/conf/fastcgi.conf

把其中的

#fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/";
fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/../:/tmp/:/proc/";

Nginx 配置

下文件为lnmp下的配置

server
    {
        listen 80;
        #listen [::]:80;
        server_name www.yunbt.net yunbt.net;
        index index.html index.htm index.php default.html default.htm default.php;
        root  /home/wwwroot/www.yunbt.net/public;

	location / {
        rewrite ^/file/(.*) /file.php?file=$1 last;
   	if (!-e $request_filename) {
        	rewrite ^(.*)$ /index.php?s=/$1 last;
    	}
	}
	location /afile{
                internal;
                alias /home/wwwroot/www.yunbt.net/public/file;
        }
        #error_page   404   /404.html;

        # Deny access to PHP files in specific directory
        #location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }
	location ~* ^/(file|upload)/.*\.(php|php5)$ {  
		deny all; 
	}  
        include enable-php.conf;

        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
        {
            expires      30d;
        }

        location ~ .*\.(js|css)?$
        {
            expires      12h;
        }

        location ~ /.well-known {
            allow all;
        }

        location ~ /\.
        {
            deny all;
        }

        access_log  /home/wwwlogs/www.yunbt.net.log;
    }

Mysql

创建数据库名yunbt
用户名yunbt
密码a123456
数据库导入yunbt.sql

数据库配置 data/conf/database.php

python

python3
pymysql
pip3 install pymysql
cron_ffmpeg.py

  • 44行:数据库配置
  • 50行:设置你的web路径

cron_move.py

  • 14行:设置你的web路径
  • 15行:视频文件[无须修改]
  • 74行:数据库配置

cron_download.py

  • 3行:限制下载最大值[单位GB]默认10GB

cron_m3u8.py

  • 10行:数据库配置
  • 17行:设置你的web路径[/public]

权限修改

修改data文件夹下的权限

chmod -R 777 data/
chmod -R 777 public/

cron

添加定时任务
crontab -e

*/1 * * * * curl http://www.yunbt.net/portal/cron/download
*/3 * * * * python3 /home/wwwroot/www.yunbt.net/python/cron_move.py
*/1 * * * * python3 /home/wwwroot/www.yunbt.net/python/cron_ffmpeg.py
*/1 * * * * python3 /home/wwwroot/www.yunbt.net/python/cron_m3u8.py
*/30 * * * * python3 /home/wwwroot/www.yunbt.net/python/cron_download.py

请替换其中www.yunbt.net 为你自己的域名

管理

管理后台 your_domain.com/admin
用户名 admin
密码 a123456

未来计划

目前功能:

  • 添加用户下载量
  • 下载管理
  • 修改当前最大下载文件量[默认10GB]
  • 分享功能
  • 视频转码
  • 工具下载
  • 后台转码控制
  • Dplayer播放器
  • 水印添加
  • 视频切片

未来计划:

  1. 分享功能
  2. 用户转码功能
  3. 积分功能
  4. 邀请功能
  5. 工具下载
  6. 水印添加
  7. M3U8添加
  8. 自动播放转码

yunbt's People

Contributors

maysrp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

yunbt's Issues

PHP7是彻底不支持吗?

测试编译了php7的mysql模块,使用前端NGINX or APACHE ,前台页面几乎全是空白,pathinfo正常。URL MODE 1,2都无法,php.ini打开所有错误信息,还是空白,几乎找不到错误啊。。。

我是那个一键脚本的萌新作者(╯-_-)╯╧╧

首先再次感谢大佬开源,我只是把安装步骤整合起来了而已,由于对NGINX PHP的配置不太熟,可能显得比较傻,大佬们可以根据自己的需要优(改)化(对),也希望大佬能够继续更新完善。小弟也可以多学(抄)习(袭)一点知识。。。再次感谢大佬开源QAQ

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.