Skip to content

Instantly share code, notes, and snippets.

void ffmpeg_av_log_callback(void* ptr, int level, const char* fmt, va_list vl_arg) {
if (level > av_log_get_level())
return;
static char const* tag = "AMP_FFMPEG_CALLBACK";
static std::mutex log_mutex;
static int print_prefix = 1;
static int LINE_SZ = 1024;
char line[LINE_SZ];
va_list vl;
std::lock_guard<std::mutex> guard(log_mutex);
@pellucide
pellucide / setupwg.sh
Last active November 3, 2023 16:57
Setup wireguard peers(one or multiple)
#!/bin/bash
INTERFACE="wg999"
BASEIP="192.168.88"
MANAGERIP=${BASEIP}.1
EDGEIP=${BASEIP}.2
MASK="32"
LISTENPORT=33321
EXTRA_ALLOWED_IP="0.0.0.0/0"
INSTALL_SCRIPT_COUNT=1
KEEPALIVE_TIMEOUT=20
/*
Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.
An input string is valid if:
Open brackets must be closed by the same type of brackets.
Open brackets must be closed in the correct order.
Every close bracket has a corresponding open bracket of the same type.
to check if the server works - https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice
stun:
stun.l.google.com:19302,
stun1.l.google.com:19302,
stun2.l.google.com:19302,
stun3.l.google.com:19302,
stun4.l.google.com:19302,
stun.ekiga.net,
stun.ideasip.com,