running:
bash create-vod-hls.sh beach.mkv
will produce:
beach/
|- playlist.m3u8
|- 360p.m3u8
running:
bash create-vod-hls.sh beach.mkv
will produce:
beach/
|- playlist.m3u8
|- 360p.m3u8
mkdir dash && \ | |
ffmpeg -hide_banner -i original.mkv -c:v libvpx-vp9 -row-mt 1 -keyint_min 150 -g 150 -tile-columns 4 -frame-parallel 1 \ | |
-movflags faststart -f webm -dash 1 -speed 3 -threads 4 -an -vf scale=426:240 -b:v 400k -r 30 -dash 1 dash/426x240-30-400k.webm && \ | |
ffmpeg -hide_banner -i original.mkv -c:v libvpx-vp9 -row-mt 1 -keyint_min 150 -g 150 -tile-columns 4 -frame-parallel 1 \ | |
-movflags faststart -f webm -dash 1 -speed 3 -threads 4 -an -vf scale=426:240 -b:v 600k -r 30 -dash 1 dash/426x240-30-600k.webm && \ | |
ffmpeg -hide_banner -i original.mkv -c:v libvpx-vp9 -row-mt 1 -keyint_min 150 -g 150 -tile-columns 4 -frame-parallel 1 \ | |
-movflags faststart -f webm -dash 1 -speed 3 -threads 4 -an -vf scale=640:360 -b:v 700k -r 30 -dash 1 dash/640x360-30-700k.webm && \ | |
ffmpeg -hide_banner -i original.mkv -c:v libvpx-vp9 -row-mt 1 -keyint_min 150 -g 150 -tile-columns 4 -frame-parallel 1 \ | |
-movflags faststart -f webm -dash 1 -speed 3 -threads 4 -an -vf scale=640:360 -b:v 900k -r 30 -dash 1 dash/640x360-30-900k.we |
/* | |
No jQuery necessary. | |
Thanks to Dan's StackOverflow answer for this: | |
http://stackoverflow.com/questions/123999/how-to-tell-if-a-dom-element-is-visible-in-the-current-viewport | |
*/ | |
function isElementInViewport(el) { | |
var rect = el.getBoundingClientRect(); | |
return ( | |
rect.top >= 0 && |
from textblob.classifiers import NaiveBayesClassifier | |
from textblob import TextBlob | |
train = [ | |
('Take me off', 'stop'), | |
('Stop texting','stop'), | |
('stop messaging','stop'), | |
('Don\'t talk', 'stop'), | |
('Stop messaging','stop'), | |
('dont want to talk anymore','stop'), |
<html> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> | |
<script> | |
function submitToAPI() { | |
var URL = ‘/contact’; | |
var data = { | |
name: $(‘#name-input’).val(), | |
email: $(‘#email-input’).val(), | |
description: $(‘#description-input’).val() |
function hasClass(elem, className) { | |
return new RegExp(' ' + className + ' ').test(' ' + elem.className + ' '); | |
} | |
function addClass(elem, className) { | |
if (!hasClass(elem, className)) { | |
elem.className += ' ' + className; | |
} | |
} |
docker-machine create --driver virtualbox default
(this is the default with Docker toolkit).The git.io URL (http://git.io/vsk46) is a shortened form of the raw url of the plist.
from celery.app.control import Control | |
import datetime | |
import psutil | |
import socket | |
def main(): | |
control = Control() | |
inspect = control.inspect() | |
hostname = socket.gethostname() |
# -*- coding: utf-8 -*- | |
from django.contrib.auth.decorators import login_required | |
from django.utils.cache import patch_response_headers | |
from django.utils.decorators import method_decorator | |
from django.views.decorators.cache import cache_page, never_cache | |
from django.views.decorators.csrf import csrf_exempt | |
class NeverCacheMixin(object): | |
@method_decorator(never_cache) |
// XPath CheatSheet | |
// To test XPath in your Chrome Debugger: $x('/html/body') | |
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/ | |
// 0. XPath Examples. | |
// More: http://xpath.alephzarro.com/content/cheatsheet.html | |
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class |