Skip to content

Instantly share code, notes, and snippets.

View cameronelliott's full-sized avatar

Cameron Elliott cameronelliott

View GitHub Profile
#include <srtp2/auth.h>
#include <srtp2/cipher.h>
#include <srtp2/crypto_types.h>
#include <srtp2/srtp.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
char SKEL_RTP_PACKET[17] = {0x80, 0x60, 0x69, 0x8f, 0xd9, 0xc2, 0x93, 0xda, 0x1c, 0x64, 0x27, 0x82, 0x98, 0x36, 0xbe, 0x88, 0x9e};
@cameronelliott
cameronelliott / README.md
Created October 23, 2022 20:26 — forked from mrbar42/README.md
bash scripts to create VOD HLS stream with ffmpeg almighty (tested on Linux and OS X)

running:

bash create-vod-hls.sh beach.mkv

will produce:

    beach/
      |- playlist.m3u8
 |- 360p.m3u8
@cameronelliott
cameronelliott / twoip.sh
Last active October 19, 2022 02:36 — forked from sparkcodeuk/floating-ip-gateway.sh
Digital Ocean show how to use two IP addresses
#!/bin/bash
NET_INT="eth0"
CURL_TIMEOUT=3
echo -n "Setting floating IP as the default gateway: "
# Check there's a floating IP attached to this droplet
if [ "$(curl -s --connect-timeout $CURL_TIMEOUT http://169.254.169.254/metadata/v1/floating_ip/ipv4/active)" != "true" ]; then
echo "Error: this droplet doesn't have a floating IP assigned to it."
#include <mach/port.h> /* mach_port_t */
#include <mach/mach.h> /* mach_port_allocate(), mach_task_self(), mach_port_insert_member(), MACH_PORT_RIGHT_PORT_SET */
#include <sys/event.h> /* kqueue(), kevent64(), struct kevent64_s, EVFILT_MACHPORT, EV_SET64, EV_ADD */
#include <sys/time.h> /* struct timespec */
//#include <dispatch/private.h>
extern mach_port_t _dispatch_get_main_queue_port_4CF(void);
extern void _dispatch_main_queue_callback_4CF(void);
#include <stdio.h>
@cameronelliott
cameronelliott / doc-ops-consulting-agreement.adoc
Created February 17, 2022 07:26 — forked from briandominick/doc-ops-consulting-agreement.adoc
Sample DocOps Consulting Agreement (Prime Source)

Documentation Engineering Consulting Agreement

@cameronelliott
cameronelliott / README.md
Created December 13, 2021 22:04 — forked from tmiller/README.md
A very simple example of using a map of channels for pub/sub in go.
@cameronelliott
cameronelliott / gstreamer.cli
Created January 13, 2021 21:22 — forked from vr000m/gstreamer.cli
gstreamer cli
YUV -> MP4
gst-launch filesrc location=<YUV file name> ! videoparse height=144 width=176 framerate=15 ! x264enc name=encoder byte-stream=true bitrate=64 ! mp4mux ! filesink location=<mp4 file name>
gst-launch filesrc location=foreman15_600.yuv ! videoparse height=144 width=176 framerate=15 ! x264enc name=encoder byte-stream=true bitrate=64 ! rtph264pay name=packetiser ! fakesink
MP4 -> YUV
gst-launch filesrc location=<MP4 file name> ! qtdemux ! ffdec_h264 ! videoparse height=144 width=176 framerate=15 ! filesink locatiion=<YUV file name>
----
Stream MP4 file
gst-launch filesrc location=IM2-YT-2_128k_20.mp4 ! qtdemux ! rtph264pay seqnum-offset=0 timestamp-offset=0 ssrc=0xaaaabbbb mtu=1450 perfect-rtptime=true ! udpsink clients=172.16.183.134:4400
@cameronelliott
cameronelliott / Dockerfile
Created December 9, 2020 13:03 — forked from manifest/Dockerfile
Setting up development environment for MQTT transport of Janus Gateway
FROM ubuntu:16.04
## -----------------------------------------------------------------------------
## Installing dependencies
## -----------------------------------------------------------------------------
RUN set -xe \
&& apt-get update \
&& apt-get -y --no-install-recommends install \
software-properties-common \
apt-transport-https \
@cameronelliott
cameronelliott / wsstomp.go
Created November 6, 2020 09:37 — forked from SoMuchForSubtlety/wsstomp.go
go-stomp websocket ReadWriteCloser
package wsstomp
import (
"io"
"github.com/gorilla/websocket"
)
type WebsocketSTOMP struct {
connection *websocket.Conn
@cameronelliott
cameronelliott / redis.service
Last active February 5, 2020 06:23 — forked from sshymko/redis.service
Redis service for systemd on Linux
# Redis for Coturn systemd file
#
# Credit to the giants before me.
#
# apparently comments are allowed on recent versions of systemd, ala ubuntu 18.04+
#
# the timeout and tcp-keepalive flags are per coturn recommendations,
# but really would seem to be most helpful in WAN/Internet scenarios
# see: https://github.com/coturn/coturn/blob/master/turndb/schema.stats.redis
#