Skip to content

Instantly share code, notes, and snippets.

View marshallmassengill's full-sized avatar

Marshall marshallmassengill

View GitHub Profile
@marshallmassengill
marshallmassengill / multicast_mediamtx.txt
Created November 6, 2023 16:00
Setup for MPEG-TS multicast/UDP streaming Test
Install gstreamer + plugins on one system:
gst-launch-1.0 -v mpegtsmux name=mux alignment=1 ! udpsink host=238.0.0.1 port=1234 videotestsrc ! video/x-raw,width=1280,height=720,format=I420 ! x264enc speed-preset=ultrafast bitrate=3000 key-int-max=60 ! video/x-h264,profile=high ! mux.
Download and install mediamtx to "receive" the stream sent from gstreamer.
https://github.com/bluenviron/mediamtx
mediamtx will be used to re-broadcast the stream over webrtc. This can be done on as many systems as seems reasonable for demonstrating multicast.
mediamtx.yml config file (note, this file needs to be edited to have the right IPs):
--------------------------------------------------
@marshallmassengill
marshallmassengill / foobar
Created April 12, 2022 20:32
gst-launch for FRC 2022
On the server side (read: Robot):
gst-launch-1.0 --no-fault v4l2src device=/dev/video0 ! "image/jpeg,width=480,height=240,framerate=30/1" ! jpegparse ! jpegdec ! videoscale ! video/x-raw,width=160,height=120 ! jpegenc ! rtpjpegpay mtu=512 ! udpsink host=127.0.0.1 port=5804
On the receiver side (read: Driver Station):
gst-launch-1.0 -e -v udpsrc port=5804 ! application/x-rtp, encoding-name=JPEG, payload=26 ! rtpjpegdepay ! jpegdec ! autovideosink
@marshallmassengill
marshallmassengill / codenameGenerator.js
Last active August 6, 2020 18:43
Generate a project codename as a vRO (vRealize Orchestrator) action
//Generate a project codename as a vRO (vRealize Orchestrator) action
//return type is string
//no inputs
//Shamelessly borrowed from https://github.com/zachwlewis/projectcodename
//GPL 2.0 licensed
var attributes = [
// Environ
"desert", "tundra", "mountain", "space", "field", "urban",
// Stealth and cunning
@marshallmassengill
marshallmassengill / rules.d
Created April 30, 2020 01:23
sparkMax gs_usb udev rules
#put the following line into /etc/udev/rules.d
ACTION=="add", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="a30e", RUN+="/sbin/modprobe gs_usb" RUN+="/bin/sh -c 'echo 0483 a30e ff > /sys/bus/usb/drivers/gs_usb/new_id'"
Plug your USB device into the RoboRIO's USB Port like so:
http://i.imgur.com/LKv2js1l.jpg
Run the command "dmesg" and find out where the device is assigned (Example: /dev/sda).
You may need to setup a swap filesystem on the device. If you do then use fdisk (Example: "fdisk /dev/sda") to clear the existing partition table on the device and assign a clean partition of type Linux Swap (82) to the device's new partitions. In our case, after deleting the existing partition table and then creating a new partition (/dev/sda1).
You can then use mkswap on the device: "mkswap /dev/sda1". This sets up a swap area on the device.
You can then use swapon to enable the OS that the swap space is available to use (Example: "swapon /dev/sda1").
@marshallmassengill
marshallmassengill / goHidYourself.go
Last active June 19, 2017 13:25
HTTP Server for HID RFID Reader to vRealize Operations
package main
import (
"fmt"
"log"
"net/http"
"bytes"
"io/ioutil"
"crypto/tls"
)
/*
Basic FizzBuzz written in Go. Just felt like writing it.
*/
package main
import "fmt"
func main() {
for i := 1; i <= 100; i++ {
@marshallmassengill
marshallmassengill / install.sh
Created July 7, 2016 15:04 — forked from vjm/install.sh
Raspberry Pi ELK Stack
sudo apt-get install -y supervisor
sudo mkdir /usr/share/elasticsearch
cd /usr/share/elasticsearch
sudo wget https://download.elasticsearch.org/kibana/kibana/kibana-4.0.1-linux-x64.tar.gz
sudo wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.4.4.tar.gz
sudo wget https://download.elasticsearch.org/logstash/logstash/logstash-1.4.2.tar.gz
sudo tar -zxvf elasticsearch-0.90.0.tar.gz