How to Get Go2TV Working With Your Samsung Smart TV

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 version

I 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 Go2TV

Please 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 go2tv

Next I load up the help details of the app:

go2tv -h

Alright, I turn on my TV and run the following command:

$ go2tv -l

The output I get is as follows:

go2tv -l

Interesting! Copy the movie you want to stream to your TV into the build folder.

$ go2tv -v tech-presentation.mov

On the Samsung TV it will ask for permission, grant it permission.

On the computer I see this:

go2tv running

And on my TV I see:

go2tv running

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.

Golang  IoT 

See also