resources :versions, only: [] do resource :restore end
version = Version.includes(:item).find(params[:id]) itemable = version.item itemable.content = version.content itemable.save
- I'm wondering whether you could provide a few more resources about what you researched in order to figure out how to work with FFMPEG and HLS. For example, how often and where might you look to keep tabs on new developments/make updates so that you keep up with high quality video serving?
- What are the tradeoffs that you've found to using mp4 over webm ? Since we have already broken out ffmpeg, should we add a step to transcode to webm instead of mp4?
- I'm curious why did you choose to go with a bash script over writing an FFMPEG wrapper in ruby (or using an existing gem, like streamio-ffmpeg)?
- When you deploy this to production -- how do you monitor resource usage/failures?
- How might you write tests for an the `ConvertHls` class?
- How might you debug the bash script if you deploy to prod?
apt-get update && apt-get install -y coturn && apt-get clean
# vi /etc/environment TURN_PORT=3478 TURN_PORT_START=10000 TURN_PORT_END=20000 TURN_SECRET=yoursecretkey TURN_SERVER_NAME=turn TURN_REALM=YOURDOMAINNAME
source /etc/environment
sudo vi /etc/default/coturn
TURNSERVER_ENABLED=1
turnadmin -k -u USERNAME -r YOURDOMAINNAME -p PASSWORD
sudo vi /etc/turnserver.conf
user=USERNAME:PASSWORD
sudo service coturn restart