[Server] GStreamer ---> HTML [Client]
- gstreamer-1.x
- Browser which supports video tag of HTML5
FILE SPACING: | |
# double space a file | |
sed G | |
# double space a file which already has blank lines in it. Output file | |
# should contain no more than one blank line between lines of text. | |
sed '/^$/d;G' |
import pymongo | |
# Connect | |
# Through a MongoDB URI. The database should contain permissions for the user, if provided | |
client = pymongo.MongoClient('mongodb://user:password@host/database') | |
# Create database | |
db = client["database"] | |
# Create collection | |
coll = db["collection"] |
#!python | |
def savitzky_golay(y, window_size, order, deriv=0, rate=1): | |
r"""Smooth (and optionally differentiate) data with a Savitzky-Golay filter. | |
The Savitzky-Golay filter removes high frequency noise from data. | |
It has the advantage of preserving the original shape and | |
features of the signal better than other types of filtering | |
approaches, such as moving averages techniques. | |
Parameters | |
---------- | |
y : array_like, shape (N,) |
FROM maxmcd/gstreamer:1.14-buster | |
WORKDIR /usr/src | |
RUN apt-get update && apt-get install -y python3-pip \ | |
pkg-config \ | |
libcairo2-dev \ | |
gcc \ | |
python3-dev \ | |
libgirepository1.0-dev \ |
#!/usr/bin/env bash | |
START_TIME=$SECONDS | |
set -e | |
echo "-----START GENERATING HLS STREAM-----" | |
# Usage create-vod-hls.sh SOURCE_FILE [OUTPUT_NAME] | |
[[ ! "${1}" ]] && echo "Usage: create-vod-hls.sh SOURCE_FILE [OUTPUT_NAME]" && exit 1 | |
# comment/add lines here to control which renditions would be created | |
renditions=( |
# calculate mean and std deviation | |
from pathlib import Path | |
import cv2 | |
imageFilesDir = Path(r'C:\your\dataset\dir\here\trainData') | |
files = list(imageFilesDir.rglob('*.png')) | |
# Since the std can't be calculated by simply finding it for each image and averaging like | |
# the mean can be, to get the std we first calculate the overall mean in a first run then |
These are all commands you need to install Docker Compose on a freshly installed NVIDIA Jetson.
# step 1, install Python PIP
$ sudo apt-get update -y
$ sudo apt-get install python3-pip
# step 2, install Docker Compose build dependencies for Ubuntu 18.04 on aarch64
$ sudo apt-get install -y libffi-dev libssl-dev python-openssl
import asyncio | |
import fractions | |
import logging | |
import threading | |
import time | |
from typing import Optional, Set, Tuple | |
import av | |
from av import AudioFrame, VideoFrame | |
from aiortc.mediastreams import AUDIO_PTIME, MediaStreamError, MediaStreamTrack |