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
| #!/bin/bash | |
| TIMECUT_ARGUMENTS="--viewport=1920,1080 --fps=60 --pipe-mode" | |
| LAUNCH_ARGUMENTS="--no-sandbox --disable-setuid-sandbox --allow-file-access-from-files" | |
| WORKERS=3 | |
| START_TIME=0 | |
| FILE_TYPE=mp4 | |
| set -e |
| #!/usr/bin/env python3 | |
| import click | |
| import ffmpeg | |
| from matplotlib import pyplot as plt | |
| import matplotlib | |
| import face_recognition | |
| from PIL import Image | |
| import numpy as np | |
| def face_location(filename): |
| import speech from '@google-cloud/speech'; | |
| import fs from 'fs'; | |
| import dotenv from 'dotenv'; | |
| dotenv.config(); | |
| async function main() { | |
| const client = new speech.SpeechClient(); | |
| const config = { |
| #!/usr/bin/env bash | |
| START_TIME=$SECONDS | |
| set -e | |
| echo "-----START GENERATING HLS STREAM-----" | |
| # Usage create-vod-hls.sh SOURCE_FILE [OUTPUT_NAME] | |
| [[ ! "${1}" ]] && echo "Usage: create-vod-hls.sh SOURCE_FILE [OUTPUT_NAME]" && exit 1 | |
| # comment/add lines here to control which renditions would be created | |
| renditions=( |
| // rename gist |
| #!/usr/bin/env bash | |
| # We assume ffmpeg installed (recommened v 4+) | |
| # Acts as RMTP server for application named live (expects stream) | |
| # transcodes the media data into h264-aac, craetes HLS 4s chunks, | |
| # and sends the data to ~/origin | |
| # Create 1 rendition1 | |
| # 854x480@30fps 1000Kbps (+ Overlay) |
| FROM node:8.7.0-slim | |
| RUN apt-get update && \ | |
| apt-get install -yq gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \ | |
| libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 \ | |
| libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 \ | |
| libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 \ | |
| ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget | |
| RUN npm i puppeteer micro qs |
| import re | |
| import email.charset | |
| from pathlib import Path | |
| from glob import glob | |
| from email import message_from_binary_file, policy | |
| RE_QUOPRI_BS = re.compile(r'\b=20=\n') | |
| RE_QUOPRI_LE = re.compile(r'\b=\n') | |
| RE_LONG_WORDS = re.compile(r'\b[\w\/\+\=\n]{72,}\b') |
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
| #from https://www.linux.com/learn/how-use-docker-machine-create-swarm-cluster | |
| #export digital ocean token | |
| export DO_TOKEN="abcdefghijklmnopqrstuvwxyz" | |
| #make keystore | |
| docker-machine create -d digitalocean \ | |
| -digitalocean-access-token ${DO_TOKEN} \ | |
| --digitalocean-region "nyc1" \ | |
| --digitalocean-image="ubuntu-14-04-x64" \ | |
| --digitalocean-size "512mb" \ |