Software Development

The “Be First & Be Best” philosophy only works if your software is up to the task. We’ve been building proprietary solutions for video acquisition, editing, archiving, & social promotion for more than a decade, and the results speak for themselves. Our tools are revolutionary; by utilizing the raw broadcast stream whenever possible and editing without transcoding, we’re able to get video to social before anyone else—with intact closed captioning data, whenever available.

Our approach relies heavily on the premise of Free, Open-Source Software running on Linux and other Unix-like operating systems like MacOS. We’ve developed tools for clients in python, perl, and other programming languages while relying heavily on MacOS Finder/bash scripting integrations. Whatever your task, we can build a program to complete it. Among the FOSS tools we leverage:

Code snippet: NEWS GRABBER

NEWS GRABBER watches news and sports networks from around the world, monitoring the screen using OCR for the words “Breaking News,” then tweeting a screencap of the channel with text pulled from the closed captioning. Here’s the portion of the script that grabs CNN.

#start CNN

#tune DirecTV receiver to CNN
curl http://192.168.0.*:8080/tv/tune?major=202

#set timestamp
epochtime=$(date “+%Y.%m.%d-%H.%M.%S”)

#record analog video for pulling cc text
timeout 10 cat /dev/v4l/by-path/pci-0000:08:08.0-video-index0 > “$epochtime”_CNN.ts

#grab screencap
ffmpeg -y -f mpegts -i /dev/v4l/by-path/pci-0000:00:14.0-usb-0:9:1.0-video-index0 -vframes 1 -vf “pp=al, yadif=0:-1:0, scale=3200:1800, unsharp” -sws_flags lanczos -pix_fmt yuvj422p -q:v 1 “$epochtime”_CNN.jpg

#convert screencap to more easily OCR’d text
convert “$epochtime”_CNN.jpg -crop 3200×570+0+1230 -negate -colorspace Gray -threshold 60% “$epochtime”_CNN.tiff

#run OCR
tesseract “$epochtime”_CNN.tiff “$epochtime”_CNN

#search results for breaking news & extract CC text if found
if grep –quiet -i ‘breaking’ “$epochtime”_CNN.txt && grep –quiet -i ‘news’ “$epochtime”_CNN.txt; then
ccextractor “$epochtime”_CNN.ts -out=txt -sc -lf -o CNN-CC.txt

#trim CC text to a reasonable length
head -c 130 CNN-CC.txt > CC-130.txt

#run tweepy script to tweet screencap and text
python3 “$epochtime”_CNN.jpg “CNN: “


#clean up
rm “$epochtime”_CNN.ts
rm “$epochtime”_CNN.jpg
rm “$epochtime”_CNN.tiff
rm “$epochtime”_CNN.txt

sleep 15