Automatically create and tweet a video with the latest goal at the world cup.
Notice: It is your responsiblity to make sure that you stay within the limits of "Fair Use". Laws might be different in your country. The author and contributors of this project decline all responsibility. For reference: Copyright Disclaimer Under Section 107 of the Copyright Act 1976, allowance is made for "fair use" for purposes such as criticism, comment, news reporting, teaching, scholarship, and research. Fair use is a use permitted by copyright statute that might otherwise be infringing. Non-profit, educational or personal use tips the balance in favor of fair use.
Just follow @ReplayLastGoal on Twitter.
You can add webhooks to automatically receive a notification when a goal is scored along with the animated gif and a link to the video replay. We support classic webhooks, Hipchat and Slack. Go to http://ReplayLastGoal.com/hooks/add to configure them.
It connects to a video live stream (that you need to provide) and keeps a buffer of about one minute worth of video. When a given twitter account tweets (by default @GoalFlash), it uses the buffer to generate a video of the goal and then tweets it. Videos are saved in the videos/
directory.
There are a few public television channels in Europe who are live streaming the world cup. The only caveat is that your server needs to be in that country (but it's not too complicated to work around it using the cloud.)
Live streaming works either with Flash which is hard to reverse engineer or with HTML5 for mobile devices. So open the web page with the live stream with Safari and change your user agent to the iPad and you will be able to get the HTML5 version of the live stream. Then you can inspect network traffic to identify the URL of the live stream. It should end with the extension .m3u8
. Use that URL in settings.json
.
You need to have ffmpeg 2.2x installed on your machine. On a Mac, it's a piece of cake. Install brew and then do brew install ffmpeg
and you are done.
On Ubuntu, it's a pain. This bash script should help you.
git clone https://github.com/xdamman/ReplayLastGoal.git
npm install
Edit settings.json
and save it as settings.development.json
(or settings.production.json
for production environment as set by the NODE_ENV
variable.)
You are now ready to start the application:
npm start
Share the love by tweeting or favoriting this repo! Oh, and pull requests are more than welcome! :-)
Special thanks to Benjamin Goering (@bengo) for his help.
(Pull requests welcome)