Skip to content

Instantly share code, notes, and snippets.

function string_ends(text, ends)
return ends == "" or string.sub(text, -string.len(ends)) == ends
end
function vlc_format(filename)
-- https://wiki.videolan.org/VLC_Features_Formats#Format.2FContainer.2FMuxers
local formats = {
"3gp", "asf", "wmv", "au", "avi", "mka", "mkv", "flv", "mov", "mp4",
"ogg", "ogm", "ts", "mpg", "mp3", "mp2", "msc", "msv", "nut", "ra",
package main
import (
"encoding/binary"
"flag"
"fmt"
"log"
"net"
"sync"
"time"