martin1982 / live-broadcast-bundle Goto Github PK
View Code? Open in Web Editor NEWLive broadcasting planner and scheduler
License: MIT License
Live broadcasting planner and scheduler
License: MIT License
facebook/graph-sdk is the new package
To stream from software like Open Broadcast Software we need an Input for RTMP. "Why?" you may ask; because 1 Input can stream through multiple outputs from a server with high bandwidth, while still only 1 OBS stream needs to be sent from the live filming location.
YouTube thumbnails can't be included in the LiveBroadcast Resource onInsert and onUpdate since the property won't be updated:
https://developers.google.com/youtube/v3/live/docs/liveBroadcasts/insert
To fix this the YouTube Data API should be used together with the videoId: https://developers.google.com/youtube/v3/code_samples/php#upload_a_custom_video_thumbnail_image
YouTube live stream doesn't transition to complete after the video has ended. This should be done to prevent a running stream after the video is finished.
While testing on Windows 10 the README didn't suffice on using the Symfony commands. These need to be prepended with php
.
Use sonata_type_datetime_picker in the Sonata admin class to make it easier to select a start and end datetime
The output of ffmpeg could be logged / stored
Tags make it easier to add new input and output services
An end signal is now being sent when the stream hasn't started yet.
See youtube for reference
PHP 5.5 is EOL and should therefor be removed from builds.
Can be done when #62 is fixed, add a thumbnail to the Google_Service_YouTube_LiveBroadcastSnippet object when a custom image is given.
When a YouTube broadcast is updated, the thumbnail is not taken into account. Since the thumbnail property of the live broadcast is a string (not a File) the new thumbnail is ignored.
Proposal to:
Access token for Facebook pages expire after 2 hours. To prevent this the user access token should be a long lived access token, with that token a never expiring page access token can be obtained
MediaFile and MediaURL have fields which are too short to hold common data. Adjust these with more sensible values or even no values at all and use the defaults.
Might need refactoring in Martin1982\LiveBroadcastBundle\Broadcaster\Scheduler
to make it easier to test and maintain.
On one of the setups we've noticed MySQL Server has gone away errors when the connection is opened for a long time.
Add support for Live.ly:
https://musically.zendesk.com/hc/en-us/articles/115002778767-Broadcast-from-PC
Introduced in v0.6; the scheduler blocks after starting a broadcast. For e.g. this command is executed:
(ffmpeg -stream_loop -1 -re -i '<URL>' -c:v libx264 -crf 30 -preset ultrafast -c:a copy -f flv "rtmp://live-api.facebook.com:80/rtmp/<KEY>" -metadata broadcast_id=22 -metadata channel_id=1 -metadata env=dev >/var/logs/livebroadcaster-ffmpeg-2018-02-19_113150.log 2>&1/app/../bin/console livebroadcaster:broadcast:end 22 1) &
The command is not started in the background since the end command is added, this affects the behaviour of the scheduler. Broadcasts are not stopped anymore and new broadcasts can not be started.
Facebook API v2.5 is used in live-broadcast-bundle/Resources/views/Block/facebook_auth.html.twig
This version of the Facebook API is deprecated and should be upgraded to v3.0, changes:
Fix log-in button which results in an error at the moment.
The function getRunningBroadcasts doesn't use the environment metadata as provided in the processString. When running multiple encironments on the same system this can lead to problems
When trying to re-use an input object when planning a video an error is returned;
[2018-05-07 10:11:41] app.ERROR: Failed to create object: Martin1982\LiveBroadcastBundle\Entity\LiveBroadcast {"exception":"[object] (Sonata\\AdminBundle\\Exception\\ModelManagerException(code: 0): Failed to create object: Martin1982\\LiveBroadcastBundle\\Entity\\LiveBroadcast at vendor/sonata-project/doctrine-orm-admin-bundle/src/Model/ModelManager.php:174, Doctrine\\DBAL\\Exception\\UniqueConstraintViolationException(code: 0): An exception occurred while executing 'INSERT INTO live_broadcast (name, description, thumbnail, broadcast_start, broadcast_end, stop_on_end_timestamp, input_id) VALUES (?, ?, ?, ?, ?, ?, ?)' with params [\"Title\", \"Description\", null, \"2018-05-07 16:00:00\", \"2018-05-07 16:15:00\", 0, 446]:\n\nSQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '446' for key 'UNIQ_21E61C8536421AD6' at vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:70, Doctrine\\DBAL\\Driver\\PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '446' for key 'UNIQ_21E61C8536421AD6' at vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:107, PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '446' for key 'UNIQ_21E61C8536421AD6' at vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:105)","previous_exception_message":"An exception occurred while executing 'INSERT INTO live_broadcast (name, description, thumbnail, broadcast_start, broadcast_end, stop_on_end_timestamp, input_id) VALUES (?, ?, ?, ?, ?, ?, ?)' with params [\"Title\", \"Description\", null, \"2018-05-07 16:00:00\", \"2018-05-07 16:15:00\", 0, 446]:\n\nSQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '446' for key 'UNIQ_21E61C8536421AD6'"} []
When trying to delete an event which has already broadcasted on Facebook;
Uncaught PHP Exception Martin1982\LiveBroadcastBundle\Exception\LiveBroadcastOutputException: "Facebook SDK exception: Unsupported post request. Object with ID '1093071190834067' does not exist, cannot be loaded due to missing permissions, or does not support this operation.
The stream state is not switched even though the real stream is already running
Check what's possible to target (based on geo location) Facebook live videos as these guys did:
https://isl.co/2016/07/the-only-way-to-geo-target-facebook-live-video-streams-for-mr-robot-or-other-tv-programs/
https://levee.isl.co/#!/how-it-works
https://github.com/istrategylabs/levee
Edit: seems that Facebook supports targeting from now on: https://developers.facebook.com/docs/videos/live-video/production-broadcasts#geotarget
The only way to know what to config now is by following the README.md, sensible defaults need to be created
Add option to run video until end and ignore end timestamp in scheduler.
Default behavior should be the same as now. (stop on end timestamp)
Reproduce:
rtmp://
Expected result:
Stream command output starts with rtmp://yourstreamurlhere
Actual result:
Stream command output starts with rtmp://rtmp://
Just for the challenge of it!
Database changes are occuring, therefor a suggestion to doctrine migrations will point users in the right direction when updating
Create an output which streams to YouTube Live
For now only Twitch is an Output channel, when new Channels are created these need to be assigned in the Scheduler through a Factory pattern
When planning a broadcast tokens can be invalid (i.e. when the user is no longer an admin for a facebook entity), we need to warn the user that the channel needs to be updated before saving.
Add an option to crosspost Facebook live video's. (https://developers.facebook.com/docs/graph-api/video-uploads#crosspostedvideos).
This is based on the video id and can only be executed when crossposting is enabled for video's, which can be enabled after creating a live video.
Fix deprecations:
User Deprecated: The "live.broadcast.facebookapi.service" service is private, getting it from the container is deprecated since Symfony 3.2 and will fail in 4.0. You should either make the service public, or stop using the container directly and use dependency injection instead.
At the moment File will handle both filepaths and URL's these need to be separated. Next to that the Sonata Admin part will need a selector and validator for these input values
getProcessId() returns null when processString starts with a space, this should be trimmed to get a valid integer value
Add a possibility to configure a custom YouTube monitor stream image
The bundle can stream to Twitch and UStream without configuration. The bundle should work without any configuration.
Add support for ustream.tv
In the listeners the YouTube client is initialized for every broadcast which results in an error when using zero-config
Make the encoder by default ffmpeg but also support others like core-avc
Create an Output which will stream to the Facebook Live API
Due to a unique key constraint it's not possible to add multiple broadcasts for the same channel. The ManyToMany relation for broadcasts_channels is not correct.
At the moment only the File Input is available, when multiple Inputs have been created these need to be selected through a Factory in the Scheduler
Make the bundle compatible with Symfony Flex to make it easier to install the bundle in Symfony 4 environments.
http://symfony.com/doc/current/setup/flex.html#upgrading-existing-applications-to-flex
See which possibilities we have to test this bundle for Instagram live (not an official API)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.