Skip to content

Instantly share code, notes, and snippets.

@Moonbase59
Moonbase59 / spec
Last active December 5, 2024 03:12
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"
@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 / sse_cf_demo.html
Last active February 18, 2025 17:07
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; }

As of the latest Rolling Release version, AzuraCast now emits a now-playing event on the public player page that you can listen to in order to update the HTML of the player page to reflect changes in the current playing song.

Among other things, you can use this to:

  • Update the background image to reflect the album art (as in the example below),
  • Show more details about the currently playing track,
  • Add supplemental information for live Streamers/DJs,
  • ...and more!

Technical Details

@BusterNeece
BusterNeece / video_stream.liq
Last active March 22, 2025 03:49
Liquidsoap 2.1 Video Stream with HLS
# What is This Script?
# This script allows you to broadcast your AzuraCast radio signal to a remote video stream, using a
# static video file that loops in the background and dynamically writing the currently playing track
# on top of that video file.
#
# This script replaces the previous "radio-video-stream" project, allowing you to manage files directly from
# within AzuraCast and not requiring any changes to your Docker configuration at all.
#
# To use this script, you must be running at least AzuraCast 0.19.0 or a later Rolling Release version.
#
@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
@BusterNeece
BusterNeece / mkpascal_with_azuracast.liq
Last active February 26, 2025 16:38
Integrating the mkpascal audio processing script with AzuraCast.
# Custom Configuration (Specified in Station Profile)
# This script is customized from the original, which can be found here:
# https://github.com/mkpascal/mk_liquidsoap_processing/blob/master/process.liq
#
# It can be added to your station via `Utilities` > `Edit Liquidsoap Configuration`
# where it can then be pasted into the bottom-most open text area, before the broadcasts
# are sent out to the various sources.
# Audio Input --------------------->
@BusterNeece
BusterNeece / 00-setup.md
Last active December 5, 2024 18:55
My WSL2 Ubuntu 20.04 Environment

My local Ubuntu 20.04 WSL2 setup.

Enable and Install WSL2

From Windows, as admin:

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
@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}
@rxaviers
rxaviers / gist:7360908
Last active April 17, 2025 22:26
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue: