Skip to content

Instantly share code, notes, and snippets.

@dstoc
dstoc / stream.sh
Created January 16, 2016 09:56
Streaming h264 rtsp to youtube
ffmpeg -i rtsp://${SOURCE} -vcodec copy -f flv\
-acodec libmp3lame -ar 44100 -threads 6 -qscale 3 -b:a 712000 -bufsize 512k\
rtmp://a.rtmp.youtube.com/live2/${KEY}
@marcolussetti
marcolussetti / cors-anywhere-setup.sh
Last active March 25, 2024 03:16
Setup your own cors-anywhere proxy (Ubuntu, using Let's Encrypt)
#!/bin/bash
# Use sudo plz
# CONFIGURATION, EDIT PLEASE
ALLOWED_DOMAINS=https://localhost:5000
CORS_DOMAIN=cors.example.com
# Install dependencies
apt install npm
@Moonbase59
Moonbase59 / sse_cf_demo.html
Last active July 13, 2024 19:36
AzuraCast HPNP (High-Performance Now Playing) example for station websites, using SSE (Server-Sent Events)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Server-sent events demo (Centrifugo)</title>
<!-- style the indicators: -isonline, -islive, isrequest, progress bar -->
<style>
.label { border-radius: 0.1rem; padding: .1rem .2rem; background: #f0f1f4; color: #5b657a; display: inline-block; }
.label.label-success { background: #32b643; color: #fff; }
@gAlleb
gAlleb / sse_cf_demo.js
Last active May 27, 2024 02:39 — forked from Moonbase59/sse_cf_demo.html
AzuraCast HPNP (High-Performance Now Playing) example for station websites, using SSE (Server-Sent Events)
// sse_hpnp.js
//
//
// 2023-12-01 Moonbase59
// 2023-12-02 Moonbase59 - retry forever on errors, workaround for Chrome bug
// - add player autostart
// - add album art alt text, link title
// 2023-12-04 Moonbase59 - add localStorage cache for better UX
// 2023-12-05 Moonbase59 - code cleanup, add translatable strings
// - use event listener instead of .onreadystatechange
@Moonbase59
Moonbase59 / spec
Last active May 28, 2024 23:46
spec - Quick-n-dirty spectrogram display for audio files
#!/bin/bash
# spec - Copyright (c) 2024 Matthias C. Hormann
# 2024-03-26
# Show spectrogram for an audio file, using ffmpeg's showspectrumpic
# Add this to the "Open with…" context menu of your file manager!
# define me
me=`basename "$0"`
version="0.2"