Incomplete; requires further work on packet handling bindings.
git clone https://gist.github.com/j0sh/ffe816e4bca5dd8be92803c597efd8bd
cd ffe816e4bca5dd8be92803c597efd8bd
go get -u gopkg.in/targodan/ffgopeg.v1
pushd $GOPATH/src/gopkg.in/targodan/ffgopeg.v1/
git remote add j0sh https://github.com/j0sh/ffgopeg
git checkout -b livepeer j0sh/livepeer
popd
make
./transmux rtmp://server/app/stream out.m3u8
Using RTMP as an input is actually untested but should work. Famous last words.