Direct copy of pre-encoded file:
$ ffmpeg -i filename.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls filename.m3u8
Direct copy of pre-encoded file:
$ ffmpeg -i filename.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls filename.m3u8
| /** | |
| * This parses multipart/form-data when passed into a Lambda function through | |
| * API Gateway using the following Integration Request Mapping Template: | |
| #set($allParams = $input.params()) | |
| { | |
| "body" : $input.json('$'), | |
| "params" : { | |
| #foreach($type in $allParams.keySet()) | |
| #set($params = $allParams.get($type)) |
curl -XDELETE localhost:9200/*| var sendString = (function(rfb, force, sendDelay) { | |
| sendDelay = sendDelay || 25; | |
| var _q = []; | |
| var _qStart = function() { | |
| var chr = _q.shift(); | |
| if (chr) { | |
| rfb.sendKey(chr); | |
| setTimeout(_qStart, sendDelay); | |
| } | |
| }; |
| /** | |
| * Fetches how many bytes have been downloaded so far and updates ProgressBar | |
| */ | |
| class DownloadProgressCounter extends Thread { | |
| private final long downloadId; | |
| private final DownloadManager.Query query; | |
| private Cursor cursor; | |
| private int lastBytesDownloadedSoFar; | |
| private int totalBytes; |
| VCR.configure do |c| | |
| c.cassette_library_dir = 'spec/fixtures/vcr_cassettes' | |
| c.hook_into :webmock | |
| c.ignore_localhost = true | |
| c.default_cassette_options = { record: :new_episodes } | |
| c.allow_http_connections_when_no_cassette = false | |
| c.configure_rspec_metadata! | |
| c.ignore_hosts 'codeclimate.com' |
| class API::V1::BaseController < ApplicationController | |
| skip_before_filter :verify_authenticity_token | |
| before_filter :cors_preflight_check | |
| after_filter :cors_set_access_control_headers | |
| def cors_set_access_control_headers | |
| headers['Access-Control-Allow-Origin'] = '*' | |
| headers['Access-Control-Allow-Methods'] = 'POST, GET, PUT, DELETE, OPTIONS' |
| # Install Git needed for Git based gems | |
| packages: | |
| yum: | |
| git: [] | |
| git branch -m old_branch new_branch # Rename branch locally | |
| git push origin :old_branch # Delete the old branch | |
| git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
| # Thanks to http://makandracards.com/makandra/1431-resque-+-god-+-capistrano for an idea and v2 version. | |
| namespace :god do | |
| def god_is_running | |
| capture(:bundle, "exec god status > /dev/null 2>&1 || echo 'god not running'") != 'god not running' | |
| end | |
| # Must be executed within SSHKit context | |
| def config_file | |
| "#{release_path}/config/god.rb" |