GithubHelp home page GithubHelp logo

ludashi2020 / free-hls Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sxyazi/free-hls

0.0 0.0 1.0 325 KB

一个自由的 HLS 解决方案

Home Page: https://github.com/sxyazi/free-hls/wiki

License: MIT License

HTML 56.55% Python 37.55% Dockerfile 0.24% Shell 0.27% CSS 0.66% JavaScript 4.73%

free-hls's Introduction

Free-HLS

这是一个免费的 HLS 视频解决方案,即所谓的视频床。本项目提供一整套集成化解决方案,囊括了各环节所需的切片、转码、上传、即时分享等套件。让你可以以更方便、更低廉的方式分享你的视频到任意地方。

本项目仅供学习交流使用,在使用过程中对你或他人造成的任何损失我们概不负责。

客户端

客户端,即 up.py 入口,提供对上传视频资源的切片、转码、上传的支持。可以在你的任意机器上使用,只要你安装了必要的依赖项和作出了正确的配置。

1. 安装依赖

安装最新的 Python3,以及必要包:

apt install -y ffmpeg python3 python3-pip
pip3 install requests python-dotenv

2. 配置服务

正确施行 服务端 一节的全部内容,完成服务端的搭建。复制客户端配置文件 .env.example.env,修改其中的 APIURL 配置项为你的服务域名或 IP 地址。完成你所用图床的相关环境变量配置。

3. 开始使用

准备好目标视频文件,输入如下指令开始切片、上传:

python3 up.py test.mp4               #默认标题
python3 up.py test.mp4 测试哦         #自定义标题
python3 up.py test.mp4 test 5        #自定义分段大小

python3 ls.py    #列出已上传视频
python3 ls.py 3  #列出已上传视频(第3页,50每页)

服务端

服务端位于项目的 web 目录,负责向客户端提供视频发布所必要的 API 接口。以及最终目标视频的播放服务。

1. 安装依赖

安装最新的 Python3,以及必要包:

apt install -y python3 python3-pip
pip3 install Flask peewee gunicorn python-dotenv

2. 启动服务

cd web
gunicorn app:app -b 0.0.0.0:3395 --workers=5 --threads=2 -D

相似服务

free-hls's People

Contributors

sxyazi avatar masaiki avatar gizmo-ds avatar

Forkers

crazysheep118

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.