A recent reddit post on /r/golang titled Go2TV - cast videos to UPnP/DLNA MediaRenderers caught my interest. In this blog post I’ll try to get it working with my Samsung TV.
To begin, I followed the link which leads to the public github repo - Go2TV. The documentation looks good so I proceed to do the following.
First I check to see if their version of Golang matches my own. I run:
$ go versionI am using the older Go 1.15 version but this software requires Go 1.16, I swiftly upgrade my Go via this link.
If you have anything below 16.0 then you must download the latest version of Golang before proceeding.
Next I clone the project locally on my computer:
$ cd ~/go/src/github.com/
$ mkdir alexballas
$ cd alexballas
$ git clone https://github.com/alexballas/Go2TV.git
$ cd Go2TVPlease note, I have my Golang home directory in the ~/go/src/github.com location.
After looking through the instructions and the Makefile, I decide to build it locally by running these commands:
$ make build
$ cd build
$ chmod u+x go2tvNext I load up the help details of the app:
go2tv -hAlright, I turn on my TV and run the following command:
$ go2tv -lThe output I get is as follows:

Interesting! Copy the movie you want to stream to your TV into the build folder.
$ go2tv -v tech-presentation.movOn the Samsung TV it will ask for permission, grant it permission.
On the computer I see this:

And on my TV I see:

Hurray! Exciting to see something written in Golang communicating with my TV. Great job and thank you to Alex Ballas for writing this awesome little app.
