Coding With Aikar – Live Streams!

Hello,

Lately I have been live streaming while working on various Empire Minecraft or Website related tasks! I like the idea of Live Coding as it invites others to learn from you, and on the flip side, allows others to offer constructive criticism to you to improve your code.

I’ve done some work to be able to split stream to 4 (or more if needed) services at the same time, so you can subscribe and watch on any of the following services:

NOTICE: Due to Mixer being a much superior platform, I’ve decided to end streaming to other platforms so that I can use FTL
Please subscribe and view my streams on Mixer only.
The method I used to stream to multiple before is still below.

 

Please subscribe to get alerts on when I go live!

discord-logo

https://aikardiscord.emc.gs

If you are interested in Live Streaming to multiple services at once, follow this guide:

http://linustechtips.com/main/topic/174603-how-to-live-stream-to-multiple-services-with-a-rtmp-server/

And here is my example config file:

worker_processes 4;
rtmp {
access_log logs/stream.log;
server {
listen 1935;
chunk_size 4096;
application programming {
live on;
meta on;
push $hitbox;
push $twitch;
push rtmp://localhost:1935/livecoding_downscale/livecoding;
push $beam;
push_reconnect 1s;
on_publish "http://aikar.co/stream.php?live=1";
on_publish_done "http://aikar.co/stream.php?live=0";
}
application gaming {
live on;
meta on;
push $hitbox;
push $twitch;
push $beam;
push_reconnect 1s;
}
application livecoding_downscale {
live on;
meta on;
allow play 10.0.0.0/24;
allow play 127.0.0.1;
exec ffmpeg -i "rtmp://127.0.0.1/livecoding_downscale/livecoding"
-c:a copy
-c:v libx264
-preset fast
-framerate 30
-threads 4
-pix_fmt yuv420p
-s "1600x900"
-bufsize 1500k -b:v 1500k
-maxrate 1500k -minrate 1500k
-f flv "$livecoding";
}
}
}

I’m also using this fancy Bash Script using xdotool to automate switching scenes with OBS, install xdotool, assign 2 scenes a hotkey for control + alt + [ and control + alt + ]

#!/bin/bash
function xdt {
xdotool "$@"
}
export xdt
function getobs {
xdt search --onlyvisible --class obs | head -n 1
}
function getcurrentx {
xdt getmouselocation | awk '{print $1}' | cut -c3-
}
function dokey {
wid=$(xdt getactivewindow)
obs=$(getobs)
if [ -z "$obs" ]; then
return 1
fi
xdt windowfocus $obs
xdt key "$@"
xdt windowfocus $wid
}
current=""
while : ; do
if [[ "$(getcurrentx)" -gt 3840 ]]; then
if [ "$current" != "2" ]; then
dokey "ctrl+alt+bracketright" && current="2"
fi
else
if [ "$current" != "1" ]; then
dokey "ctrl+alt+bracketleft" && current="1"
fi
fi
sleep .2
done

I am very passionate about development, and communities. I am now living my dream of running my own gaming company, as I have now founded Starlis LLC and operate the Empire Minecraft service, the place where I met my lovely wife Mia!

Leave a Reply





I am Senior Software Engineer and Entrepeneur. I am an enthusiast and love creating things. I operate my own side company in my free time called Starlis LLC, working in Minecraft.

I enjoy doing things right and learning modern technologies.