This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Resources": { | |
"MediaLive": { | |
"Type": "AWS::MediaLive::Channel", | |
"Properties": { | |
"Name" : { | |
"Fn::Sub": "${AWS::StackName}-Channel" | |
}, | |
"ChannelClass": "SINGLE_PIPELINE", | |
"RoleArn": "arn:aws:iam::422423811642:role/Media_Live_Role", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Takes an ArrayBuffer; returns an array of these objects: | |
// { | |
// seconds: *number of seconds into the video of this image*, | |
// bytes: *the bytes of this image, as an ArrayBuffer* | |
// } | |
var parseBif = function(buffer) { | |
var data = new Uint8Array(buffer); | |
// Make sure this really is a BIF. | |
var magicNumber = [0x89, 0x42, 0x49, 0x46, 0x0d, 0x0a, 0x1a, 0x0a]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function streamium_add_watchlist_endpoint() { | |
add_rewrite_endpoint( 'watchlist', EP_ROOT | EP_PAGES ); | |
} | |
add_action( 'init', 'streamium_add_watchlist_endpoint' ); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
# Usage create-vod-hls.sh SOURCE_FILE [OUTPUT_NAME] | |
[[ ! "${1}" ]] && echo "Usage: create-vod-hls.sh SOURCE_FILE [OUTPUT_NAME]" && exit 1 | |
# ----CUSTOM---- | |
sourceResolution="$(ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of csv=s=x:p=0 ${1})" | |
# echo ${sourceResolution} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use ffprobe to get stream value | |
$(ffprobe -v error -select_streams v:0 -show_entries stream=r_frame_rate -of default=noprint_wrappers=1:nokey=1 becky.mp4) | |
Note: If the source video was in H.264 format you can also use the H.265 command to produce a final video in H.265/HEVC format. Since H.265 is 25–50% more efficient you should be able to reduce the Bitrate and still maintain the same video quality. | |
ffmpeg -hide_banner -re -i becky.mov -map 0:v:0 -map 0:a:0 -map 0:v:0 -map 0:a:0 -map 0:v:0 -map 0:a:0 -map 0:v:0 -map 0:a:0 \ | |
-c:v h264 -profile:v main -crf 20 -sc_threshold 0 -g 48 -keyint_min 48 -c:a aac -ar 48000 \ | |
-filter:v:0 scale=w=640:h=-2 -maxrate:v:0 856k -bufsize:v:0 1200k -b:a:0 96k \ | |
-filter:v:1 scale=w=842:h=-2 -maxrate:v:1 1498k -bufsize:v:1 2100k -b:a:1 128k \ | |
-filter:v:2 scale=w=1280:h=-2 -maxrate:v:2 2996k -bufsize:v:2 4200k -b:a:2 128k \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<option value="af">Afrikaans</option> | |
<option value="af-ZA">Afrikaans (South Africa)</option> | |
<option value="ar">Arabic</option> | |
<option value="ar-AE">Arabic (U.A.E.)</option> | |
<option value="ar-BH">Arabic (Bahrain)</option> | |
<option value="ar-DZ">Arabic (Algeria)</option> | |
<option value="ar-EG">Arabic (Egypt)</option> | |
<option value="ar-IQ">Arabic (Iraq)</option> | |
<option value="ar-JO">Arabic (Jordan)</option> | |
<option value="ar-KW">Arabic (Kuwait)</option> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git filter-branch --tree-filter 'rm -rf dist/*' HEAD | |
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Extract multiple screenshots/frames from a video URL | |
* Params | |
* - vidURL : video URL | |
* - frOffsets : array of timestamps | |
* - frameWidth : screenshot width (default: video width) | |
* Returns | |
* - frames: object with offset => {imgUrl, blob} | |
* | |
* An multiple-frame extension of http://cwestblog.com/2017/05/03/javascript-snippet-get-video-frame-as-an-image/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# remove specific file from git cache | |
git rm --cached filename | |
# remove all files from git cache | |
git rm -r --cached . | |
git add . | |
git commit -m ".gitignore is now working" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<link rel="stylesheet" type="text/css" href="https://kenwheeler.github.io/slick/slick/slick.css"/> | |
<link rel="stylesheet" type="text/css" href="https://kenwheeler.github.io/slick/slick/slick-theme.css"/> | |
<style id="jsbin-css"> | |
.movies { |