running:
bash create-vod-hls.sh beach.mkv
will produce:
beach/
|- playlist.m3u8
|- 360p.m3u8
package main | |
import ( | |
"bytes" | |
"encoding/base64" | |
"fmt" | |
"io/ioutil" | |
"mime/multipart" | |
"net/smtp" | |
"os" |
/* | |
* | |
* Golang badger db using GOB to serialize object data into badger fields | |
* | |
* Golang has its very own serializer / deserializer - Go Object (gob) so why not use it where data passed is entirely within a Go | |
* application ? | |
* | |
* JSON or some other text based solution could be used but gob might be faster. | |
* | |
* A gob encoder accepts the type bytes.Buffer to encode data to, so to write this to Badger, which accepts the type byte |
running:
bash create-vod-hls.sh beach.mkv
will produce:
beach/
|- playlist.m3u8
|- 360p.m3u8
#!/bin/sh | |
unbind_vtconsoles() | |
{ | |
for ((i = 0; i < 16; i++)) | |
do | |
if [ -d "/sys/class/vtconsole/vtcon$i" ]; then | |
if [ `cat /sys/class/vtconsole/vtcon$i/name | grep -c "frame buffer"` -eq 1 ]; then | |
while [ `cat /sys/class/vtconsole/vtcon$i/bind` -ne 0 ]; do |
#!/bin/bash | |
# Based on work by Klaus M Pfeiffer at http://blog.kmp.or.at/2012/05/build-your-own-raspberry-pi-image/ | |
# you need to do: "sudo apt-get install binfmt-support qemu qemu-user-static debootstrap kpartx lvm2 dosfstools" | |
# run with "sudo bootstrap.sh /dev/sd[x]" | |
echo "Use like: sudo bootstrap.sh /dev/sd[x]" | |
#deb_mirror="http://ftp.debian.org/debian" | |
#deb_local_mirror="http://ftp.debian.org/debian" |