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 subprocess | |
import shlex | |
import json | |
# function to retrieve the timestamps of the input video file | |
def findVideoMetadata(pathToInputVideo): | |
cmd = "ffprobe -v quiet -print_format json -show_entries packet=pts_time" | |
args = shlex.split(cmd) | |
args.append(pathToInputVideo) | |
# run the ffprobe process, decode stdout into utf-8 & convert to JSON |
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 scipy import misc | |
import json | |
import cv2 | |
import time | |
import datetime as dt | |
import base64 | |
import io | |
from urllib.request import urlopen |