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
# An Display aspect ratio (DAR) detector for MPEG 2 Transport Streams with MP2 Video | |
import array | |
import logging | |
import sys | |
class NullHandler(logging.Handler): | |
def emit(self, record): | |
pass | |
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/python | |
''' | |
SCTE-35 Decoder | |
The MIT License (MIT) | |
Copyright (c) 2014 Al McCormack |
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
from OpenSSL.crypto import * | |
import time | |
import datetime | |
from optparse import OptionParser | |
parser = OptionParser() | |
parser.add_option("-f", "--file", dest="filename", | |
help="PKCS12/pfx file", metavar="FILE") | |
parser.add_option("-p", "--password", |
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
// Used by https://github.com/use-sparingly/pywvpssh to automatically | |
// strip PSSH from MP4 files | |
package WidevineCDM; | |
message WvEmeRequest { | |
required int32 version = 1; // 1 | |
//start rlen end | |
message Level1 { //0x02 1467 0x5BD |
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
# HDS Load Testing Tool using Locust Load Testing Framework and HDS_Fragmenter library | |
# Simulates user access by fetching the bootstrap file to parse out fragment names. | |
# Bootstrap files are fetched 1/10 times. | |
# | |
# Usage: | |
# 1. Fetch dependencies given below | |
# 2. Edit "url_f4m_path" below to the stream-level manifest path/URI | |
# 3. Run: `locust -f hdslt.py -H http://my_origin_server` | |
# pip install locustio |
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
from OpenSSL.crypto import load_certificate, FILETYPE_PEM | |
cert_file_string = open("esx.crt", "rb").read() | |
cert = load_certificate(FILETYPE_PEM, cert_file_string) | |
sha1_fingerprint = cert.digest("sha1") | |
print sha1_fingerprint |
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
import boto.route53 | |
import boto.regioninfo | |
import requests | |
import logging | |
DOMAIN = "" | |
USERNAME_123REG = "" | |
PASSWORD_123REG = "" | |
AWS_ACCESS = "" |
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 python | |
# | |
# Shows GOP structure of video file. Useful for checking suitability for HLS and DASH packaging. | |
# Example: | |
# | |
# $ iframe-probe.py myvideo.mp4 | |
# GOP: IPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 60 CLOSED | |
# GOP: IPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 60 CLOSED | |
# GOP: IPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 60 CLOSED | |
# GOP: IPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 60 CLOSED |
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
from chardet.universaldetector import UniversalDetector # pip install chardet | |
import io | |
import os.path | |
def open(file, mode='r', buffering=-1, encoding=None, errors=None, | |
newline=None, closefd=True): | |
""" A wrapper for io.open(), which tries to detect the encoding of a file | |
using chardet before reading or writing | |
Supports all arguments of io.open(). "encoding" is only used if file does |
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
{ | |
"Audio": {"AudioPackingMode": null, | |
"BitRate": "96", | |
"Channels": "2", | |
"Codec": "AAC", | |
"CodecOptions": {"BitDepth": null, | |
"BitOrder": null, | |
"Profile": "AAC-LC", | |
"Signed": null}, | |
"SampleRate": "48000"}, |
OlderNewer