- Create non-root user for SSH and running node (https://www.digitalocean.com/community/tutorials/how-to-add-and-delete-users-on-an-ubuntu-14-04-vps)
- Run node on port 3000 instead of 80
Change the
listen(80)
portion of the script.js file tolisten(3000)
. - Install nginx and use as proxy to port 3000
- Install "forever" node module.
- Create @restart cron job for forever
sudo apt-get update | |
sudo apt-get install git -y | |
cd ~ | |
wget https://nodejs.org/dist/v4.3.2/node-v4.3.2-linux-x64.tar.xz | |
mkdir node | |
tar xvf node-v4.3.2-linux-x64.tar.xz --strip-components=1 -C ./node | |
cd ~ | |
rm -rf node-v* | |
mkdir node/etc | |
echo 'prefix=/usr/local' > node/etc/npmrc |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title></title> | |
</head> | |
<body> | |
#regex pattern | |
/(frame)=\s*(\d+)|(fps)=\s*(\d+)|(fps)=\s*(\d+)|(time)\s*=(\d+:\d+:\d+\.\d+)|(size)=\s*(\d+)([a-z]+)|(bitrate)=\s*([\d\.]+)([a-z\/]+)|(speed)=\s*([\dx]+)/mgi | |
#javascript | |
var regexp = /(frame)=\s*(\d+)|(fps)=\s*(\d+)|(fps)=\s*(\d+)|(time)\s*=(\d+:\d+:\d+\.\d+)|(size)=\s*(\d+)([a-z]+)|(bitrate)=\s*([\d\.]+)([a-z\/]+)|(speed)=\s*([\dx]+)/mgi; |
Crazy regex for matching acceptable video inputs for AWS Elemental MediaConvert:
I got the error trying to convert a gif image.
BadRequestException: /inputs/0/fileInput: Should match the pattern:
/^(s3://)([^/]+/)+([^/\.]+|(([^/]*)\.([mM]2[vV]|[mM][pP][eE][gG]|[aA][vV][iI]|[mM][pP]4|[fF][lL][vV]|[mM][pP][tT]|[mM][pP][gG]|[mM]4[vV]|[tT][rR][pP]|[fF]4[vV]|[mM]2[tT][sS]|[tT][sS]|264|[hH]264|[mM][kK][vV]|[mM][oO][vV]|[mM][tT][sS]|[mM]2[tT]|[wW][mM][vV]|[aA][sS][fF]|[vV][oO][bB]|3[gG][pP]|3[gG][pP][pP]|[mM][xX][fF]|[dD][iI][vV][xX]|[xX][vV][iI][dD]|[rR][aA][wW]|[dD][vV]|[gG][xX][fF]|[mM]1[vV]|3[gG]2|[vV][mM][fF]|[mM]3[uU]8|[lL][cC][hH]|[gG][xX][fF]_[mM][pP][eE][gG]2|[mM][xX][fF]_[mM][pP][eE][gG]2|[mM][xX][fF][hH][dD]|[wW][aA][vV]|[yY]4[mM])))$/
- Turn on holding reset button with paperclip.
- Press
Ctl-D
at recovery screen. - Press reset button again with paperclip. (Should reboot)
- ... Wait for 2 beeps (It will take a min.) After beeps. Wait for developer mode to install. (~5-10 min)
http://www.itea.dk/index.php/2017/01/06/wipe-clear-reset-a-chromebit/
1080p Long Videos | |
x264 | |
Format: mkv | |
RF: 29 | |
Preset: slower | |
Tune: film | |
Profile: high | |
Level: 4.0 | |
Audio Codec: aac |
window._fs__hbo_timeout; | |
window._fs__hbo = function(){ | |
document.querySelector("#ifp").parentNode.setAttribute("style", "position:fixed;top:0px;left:0px;width:100vw;height:100vh;background-color:#000;z-index:2147483648;"); | |
document.querySelector("#ifp").parentNode.setAttribute("id", "flvideo"); | |
document.querySelector("#ifp").parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.style.top = "0px"; | |
document.querySelectorAll(".default").forEach(function(e){ | |
var style = window.getComputedStyle(e); | |
if(e.getAttribute("id") != "flvideo" && style.position == "fixed"){ e.style.opacity = 0; e.style.zIndex = 1; } | |
}); | |
} |
Basic ffmpeg scene detection:
ffmpeg -i input.flv -filter:v "select='gt(scene,0.4)',showinfo" -f null -
scene (video only) value between 0 and 1 to indicate a new scene; a low value reflects a low probability for the current frame to introduce a new scene, while a higher value means the current frame is more likely to be one (see the example below) https://ffmpeg.org/ffmpeg-filters.html#select_002c-aselect
Set the scene change detection threshold as a percentage of maximum change on the luma plane. Good values are in the [8.0, 14.0] range. Scene change detection is only relevant in case combmatch=sc. The range for scthresh is [0.0, 100.0].