Wednesday, March 13, 2024

creating a live stream on youtube using the api and google apps script

There was a requirement for 
(a) streaming an http audio stream to youtube with ffmpeg
(b) automating the creation of the broadcast, making sure that each broadcast is less than 12 hours long so that youtube will archive the video

The method we followed is detailed in this github repo folder - 
(Work in progress as of now - the main concept works, but some refinements like setting the thumbnail, descriptive title, etc to be done.)

The first option was to implement using bash scripts using something like rwxrob/cmd-yt - but the Oauth using go did not work on the first try - go list -f '{{.Target}}' did not return anything. The steps I did are listed below.

apt install jq
tput # already installed
apt install pandoc
# install go with https://go.dev/doc/install
wget https://go.dev/dl/go1.22.1.linux-amd64.tar.gz
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.22.1.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
# and added that line to /etc/profile

For using the auth-go package, need to compile and install it.
cd ~/auth-go/auth-go-main
go build
but
go list -f '{{.Target}}'
did not return anything.

Then thought of trying google apps script instead.
just need to enable it.

No comments:

Post a Comment