This is an simple install script to deploy ffmpeg and a script generated by ffbuilder onto a linux machine.
The script is available as an Ansible playbook and straightforward bash script
An Akamai Compute (Linode) StackScript to automagically deploy and config a VM can be found here: https://cloud.linode.com/stackscripts/1108162
The script performs the following functions:
- Add repos for ffmpeg, graphics and multimedia
- Install ffmpeg, npm and fonts-freefont-ttf
- Install PM2 (from npm)
- Download test file to be used by the script (specified as a parameter)
- Download a script generated by ffmpeg, examples in templates folder
- (Optionally) modify the script with user supplied environment variables (like stream id, event name, entrypoint, etc)
- Run the script within pm2, making it start on boot, restart failure
- Set a cron task to restart the encoder every night at 1am