centric/centric-livestreaming
Composer 安装命令:
composer require centric/centric-livestreaming
包简介
Bundle for live-streaming to various online networks
README 文档
README
Table of contents
- About
- Prerequisites
- Basic installation
- Enabling Facebook Live
- Enabling YouTube Live
- Add new output platforms
- Using an admin GUI
About
The Live Broadcast Bundle will make it possible to plan live video streams to various websites/apps like Twitch, YouTube Live, Facebook Live.
You are able to stream from various inputs. This package supports files, URLs or existing RTMP streams.
For more info you can view the latest recorded presentation below, check the demo project at https://github.com/Martin1982/live-broadcast-demo or read on;
Prerequisites
To test these prerequisites the Symfony command livebroadcaster:test:shell can be used after the installation described below.
If you like to check this manually the Broadcaster needs a few commands on an operating system;
All OS's:
ffmpeg 3.x or higher
On Linux:
pskill
On Mac:
psgrepkill
On Windows:
tasklisttaskkill
Basic installation
This bundle is available on Packagist. You can then install it using Composer:
$ composer require martin1982/live-broadcast-bundle
Use Doctrine to update your database schema with the broadcasting entities, when upgrading it is recommended to use migrations.
To start the broadcast scheduler you can run the following command:
$ php bin/console livebroadcaster:broadcast
To run the scheduler as a long-running process it's recommended to use the messenger middleware to keep the database connection alive as described at https://symfony.com/doc/current/messenger.html
FFMpeg log directory
To view the output of FFMpeg you need to configure a log directory in your config/packages/live_broadcast.yaml.
live_broadcast:
ffmpeg:
log_directory: '%kernel.logs_dir%'
Event loop
You can use this configuration to set the event loop timer:
live_broadcast:
eventloop:
timer: 5
Thumbnailer setup
Set up the following config for thumbnails:
live_broadcast:
thumbnail:
upload_directory: '%kernel.project_dir%/public/uploads/thumbnails'
web_path: '/uploads/thumbnails'
Enabling Facebook Live
Create a Facebook app on https://developers.facebook.com with the following permissions:
- user_videos
- user_events
- user_managed_groups
- manage_pages
- publish_actions
- Live-Video API
Edit your config/packages/live_broadcast.yaml with the following configuration:
live_broadcast:
facebook:
application_id: YourFacebookAppId
application_secret: YourFacebookAppSecret
Enabling YouTube Live
Login to https://console.developers.google.com/ and enable the 'YouTube Data API v3'.
Add the YouTube API info to your config.yml:
live_broadcast:
youtube:
client_id: YourGoogleOauthClientId
client_secret: YourGoogleOauthClientSecret
Add these lines to your parameters.yml (used for generating a thumbnail URL)
parameters:
router.request_context.host: broadcast.com
router.request_context.scheme: https
Add new output platforms
Create a new Channel Entity in Entity/Channel that extends the AbstractChannel (e.g. ChannelNew)
Create a new StreamOutput service in Service/StreamOutput that implements the OutputInterface (e.g. OutputNew)
Configure the service with the output tag in config/services.yml
live.broadcast.output.new:
class: Martin1982\LiveBroadcastBundle\Service\StreamOutput\OutputNew
tags:
- { name: live.broadcast.output, platform: 'New' }
Using an admin GUI
This bundle comes without a web frontend interface, to make use of an admin package you can pick the one to your liking;
- Sonata Admin: https://github.com/Martin1982/live-broadcast-sonata-admin-bundle
- Easyadmin: https://github.com/Martin1982/live-broadcast-easyadmin-bundle
Sponsors
centric/centric-livestreaming 适用场景与选型建议
centric/centric-livestreaming 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 03 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 centric/centric-livestreaming 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 centric/centric-livestreaming 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 10
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-03-21