Turned the base case single RTMP source gstreamer script into a C program. Script is here, https://gist.github.com/batasrki/a782ff785d83be257817