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/env bash | |
# Assume nodeJS and npm is installed | |
# Assume npm http-server is installed in global mode (-g) | |
echo "Starting local webserver on 8080" | |
http-server ~/origin -p 8080 --cors -c -1 |
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/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) |
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/env node | |
const fs = require('fs'); | |
const execSync = require('child_process').execSync; | |
// Local dir ts files | |
const ts_files = fs.readdirSync('.').filter(fn => fn.endsWith('.ts')); | |
let n = 0; | |
const res_total = {video:{ duration_s: 0.0, frames: 0, fr: 0}, audio: { duration_s: 0.0, frames: 0, sr: 0}}; | |
console.log(`Num, Filename, video dur {s}, video frames, audio dur {s}, audio frames, diff (v-a), video frame rate, audio sample rate`) |
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/env bash | |
# Assumimng input .ts with 2 tracks: | |
# Video: h264 | |
# Audio: AAC | |
# Check ffmpeg and BENTO mp4extract are installed and in the PATH | |
if ! [ -x "$(command -v ffmpeg)" ]; then | |
echo 'Error: ffmpeg is not installed.' >&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/env node | |
const AWS = require('aws-sdk'); | |
AWS.config.update({region: 'us-west-2'}); | |
const dynamodb = new AWS.DynamoDB({ apiVersion: '2012-08-10' }); | |
let dbparams_q1 = { | |
"TableName": "alive-qa-brain-ddb-tbllivejobs", | |
"IndexName": "account_id-job_created_at-index", |
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/env node | |
const https = require('https'); | |
if (process.argv.length !== 6) { | |
console.error("Use: ./jaws-ingest.js hls_asset_url client_id client_secret VC_account_id"); | |
return 1; | |
} | |
function httpReq (method, host, path, headers, body, callback) { | |
let answer_raw = []; |
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/env node | |
const AWS = require('aws-sdk'); | |
const http = require('http'); | |
//Data from TOKIO region | |
//Upload data | |
const upload_tokio = { | |
bucketName: 'XX', |
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 | |
#Prerequirsites | |
sudo yum update | |
sudo yum install autoconf automake bzip2 cmake freetype-devel gcc gcc-c++ git libtool make mercurial pkgconfig zlib-devel tcl openssl-devel | |
#prepare/cleanup environment | |
cd ~ | |
rm -rf ~/ffmpeg_build ~/ffmpeg_sources ~/bin/{ffmpeg,ffprobe,ffserver,lame,vsyasm,x264,yasm,ytasm} | |
mkdir ~/ffmpeg_sources |
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/env node | |
const AWS = require('aws-sdk'); | |
const crypto = require('crypto'); | |
const http = require('http'); | |
const stream = require('stream'); | |
const Readable = stream.Readable; | |
//Stream reader | |
class streamFromData extends Readable { |
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
#Generate fairplay file with random generated Key, IV. | |
#And generate also a trobleshooting chunklist bypassing fairplay server and providing the plain key for testing | |
#Source data | |
SOURCE="/Users/jcenzano/Movies/test10m_baseline_30_320x240_a25fpsB.mp4" | |
#Dest data | |
DEST="/Users/jcenzano/Movies/hls-encrypted/result-fairplay" | |
KEYS_DIR="keys" | |
KEY_IV_FILENAME="key-iv.bin" |
NewerOlder