This file contains hidden or 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
#!/bin/sh | |
# encode_bitrate_overlay.sh | |
# | |
# | |
# Created by Andrew Sinclair on 11/07/2014. | |
# | |
#!/bin/bash | |
VIDSOURCE=$1 | |
OUTNAME=$2 |
This file contains hidden or 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/python | |
''' | |
Script to monitor live streams and send an Amazon SNS if the stream is down (and possibly take restorative action) | |
Future: | |
Black detect: ffmpeg -i out.mp4 -vf blackdetect -f null - | |
Note the following doesn't seem to fully work without looking at the debug logs | |
On live ffmpeg -y -i rtmp://cp30129.live.edgefcs.net/live/videoops-videoops@50541 -vf blackdetect -t 10 -loglevel debug -f null - | |
''' |
This file contains hidden or 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/python | |
# Script to encode HLS and DASH from a multi TS mezzanine file | |
# Places encoded files in a folder of the same name as the source input | |
# Steps | |
# 1. Check file with mediainfo (optional) | |
# 2. Encode to resolutions as mp4 | |
# 3. Split into TS segments and create playlists | |
# 4. Create variant playlist | |
import subprocess |
This file contains hidden or 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
from tornado.wsgi import WSGIContainer | |
from tornado.httpserver import HTTPServer | |
from tornado.ioloop import IOLoop | |
import tornado.netutil | |
import requests | |
import os | |
import netifaces | |
from worker import app | |
from worker import register |
This file contains hidden or 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
# First part is a unit test script effectively, this code would go in the Flask app | |
from celery import Celery | |
# There needs to be a seperate tasks module, see below | |
import tasks | |
# Celery uses redis to commuicate between tasks | |
celery = Celery("app", broker='redis://localhost:6379',backend='redis://localhost:6379') | |
# This submits the task to run via Celery |
This file contains hidden or 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
# tasks.py | |
from celery import task, Celery, subtask, group | |
import time | |
REDIS_SERVER = 'redis://localhost:6379' | |
celery = Celery("app", broker=REDIS_SERVER, backend=REDIS_SERVER) | |
@task() | |
def task1(input): |
This file contains hidden or 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
import re | |
import subprocess | |
import logging | |
import math | |
import json | |
import pygal | |
import sys | |
logger = logging.getLogger(__name__) | |
''' |
This file contains hidden or 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
mp4info --verbose init.mp4 | |
File: | |
major brand: isom | |
minor version: 200 | |
compatible brand: isom | |
compatible brand: iso2 | |
compatible brand: avc1 | |
compatible brand: mp41 | |
compatible brand: iso6 |
This file contains hidden or 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
http://playready.directtaps.net/pr/svc/rightsmanager.asmx?PlayEnablers=786627D8-C2A6-44BE-8F88-08AE255B01A7 | |
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> | |
<soap:Body> | |
<AcquireLicense xmlns="http://schemas.microsoft.com/DRM/2007/03/protocols"> | |
<challenge> | |
<Challenge xmlns="http://schemas.microsoft.com/DRM/2007/03/protocols/messages"> | |
<LA xmlns="http://schemas.microsoft.com/DRM/2007/03/protocols" Id="SignedData" xml:space="preserve"> | |
<Version>1</Version> | |
<ContentHeader> |
This file contains hidden or 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
http://playready.directtaps.net/pr/svc/rightsmanager.asmx?PlayEnablers=786627D8-C2A6-44BE-8F88-08AE255B01A7 | |
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> | |
<soap:Body> | |
<AcquireLicense xmlns="http://schemas.microsoft.com/DRM/2007/03/protocols"> | |
<challenge> | |
<Challenge xmlns="http://schemas.microsoft.com/DRM/2007/03/protocols/messages"> | |
<LA xmlns="http://schemas.microsoft.com/DRM/2007/03/protocols" Id="SignedData" xml:space="preserve"> | |
<Version>1</Version> | |
<ContentHeader> |