This guide will go over how to install Jellyfin on a Samsung smart TV.

The instructions here are based off of the notes at: https://github.com/jellyfin/jellyfin-tizen, which I found to be quite sparse. I hope this guide will help someone doing the same thing.

Setup your environment[edit | edit source]

I will be using Ubuntu 21.10 within a VM for the compile/deployment of Jellyfin. You may also do this on your computer. Keep in mind that your TV should be on the same subnet as your deployment machine.

Install the Tizen studio and compile dependencies[edit | edit source]

Download Tizen Studio from https://developer.tizen.org/development/tizen-studio/download and run the installer.

## Download the install package and run it (as yourself)
$ chmod 755 web-ide_Tizen_Studio_4.5.1_ubuntu-64.bin
$ ./web-ide_Tizen_Studio_4.5.1_ubuntu-64.bin

You will also need to install these additional packages to compile Jellyfin.

## Install dependencies (as root)
# apt install git nodejs npm
## Yarn
# npm install --global yarn

Tizen Studio also requires libwebkitgtk 1. On Ubuntu 21.10, this package isn't available anymore and you need to manually add bionic into your sources.

# echo "deb http://us.archive.ubuntu.com/ubuntu bionic main universe" >> /etc/apt/sources.list
# apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3B4FE6ACC0B21F32
# apt update
# apt install libwebkitgtk-1.0-0

Setup Tizen Studio to talk to your TV[edit | edit source]

Main packages required to install custom apps on a Samsung TV
Main packages required to install custom apps on a Samsung TV

You will need to install a few dependencies in order to be able to build and sign your Jellyfin app. At the minimum, you need to install the Certificate Manager and Samsung Certificate Extension because the app has to be signed by a custom certificate that Samsung has signed. Getting the certificate signed by Samsung requires that you log in with a Samsung account.

You can also install the emulator manager to play with a virtualized TV. This is optional.

Start the Tizen Studio Package Manager.

Under "Main SDK", install:

  • Certificate Manager
  • Emulator manager
  • Web CLI
  • Web IDE
Extra packages required to install custom apps on a Samsung TV
Extra packages required to install custom apps on a Samsung TV

Under "Extension SDK", install:

  • TV Extensions-6.0 -> Emulator (optional)
  • Samsung Certificate Extension
  • Web app. tools (optional)

At this point, power on your TV and navigate to and run Smart Apps. On the main Apps screen, enter '12345' in your remote (for my TV, you had to use the on-screen numeric keyboard). You should be shown a dialog box for developer mode. Turn developer mode on and enter your computer's IP address. Restart your TV by holding down the power button on the remote for 2 seconds.

Start the Tizen Device Manager. Add a new device by clicking on the 'Remote Device Manager' button and then the '+' icon. Give your TV a name and enter your TV's IP address. If you don't know your TV's IP address, navigate to the WiFi settings on your TV and show the connection information. Toggle the connection toggle switch in the device list and see if you're able to connect. If all goes well, you should see something like the image:

Tizen Device Manager used to add a new TV device
Tizen Device Manager used to add a new TV device

Obtain a Tizen distributor certificate[edit | edit source]

With your device in the device manager, you can now generate a new distributor certificate to sign your custom app. Start the Tizen Certificate Manager. Click on the '+' icon to create a new certificate. Select 'Samsung' as the certificate type. Select 'TV' as the device type. Give your certificate a profile name. Create a new author certificate with your name and password. Next, in order to get your distributor certificate signed, you will be prompted to log in to your Samsung account. Next, your Distributor certificate should list your device's DUID. If you added your device in the device manager, this should have been automatically populated for you.

With the distributor certificate created, you may now compile Jellyfin and sign the package to work with your TV.

Build Jellyfin wgt package[edit | edit source]

Build Jellyfin. This might take a few minutes.

$ cd ~
$ git clone https://github.com/jellyfin/jellyfin-web.git
$ cd jellyfin-web
$ npm ci --no-audit

Build the Jellyfin-tizen project.

$ cd ~
$ git clone https://github.com/jellyfin/jellyfin-tizen.git
$ cd jellyfin-tizen
$ JELLYFIN_WEB_DIR=../jellyfin-web/dist yarn install

## Create the Tizen package. Export Tizen to your path if you haven't done so already.
$ export PATH=$PATH:$HOME/tizen-studio/tools/ide/bin
## Compile
$ tizen build-web -e ".*" -e gulpfile.js -e README.md -e "node_modules/*" -e "package*.json" -e "yarn.lock"
Build Web Application:  100% (10/10)

BUILD SUCCESSFUL

Output path : /home/leo/jellyfin-tizen/.buildResult

## Package and sign
$ tizen package -t wgt -o . -- .buildResult
The active profile is used for signing. If you want to sign with other profile, please use '--sign' option.
Author certficate: /home/leo/SamsungCertificate/Mine/author.p12
Distributor1 certificate : /home/leo/SamsungCertificate/Mine/distributor.p12
Excludes File Pattern: {.manifest.tmp, .delta.lst}
Ignore File: /home/leo/jellyfin-tizen/.buildResult/.manifest.tmp
Package File Location: /home/leo/jellyfin-tizen/Jellyfin.wgt

At this point, you should have a Jellyfin.wgt package file.

Upload the Jellyfin package to your TV[edit | edit source]

Go back to Device Manager and right click on your TV. Click on 'Permit to install applications'. This should upload your distributor certificate to your TV and allow you to deploy apps onto your device.

Permit to install applications in Tizen device manager
Permit to install applications in Tizen device manager

Once that is done, run the following to deploy the app:

$ tizen install -n Jellyfin.wgt
Transferring the package...
Transferred the package: /home/leo/jellyfin-tizen/Jellyfin.wgt -> /home/owner/share/tmp/sdk_tools/tmp
Installing the package...
--------------------
Platform log view
--------------------
install AprZAARz4r.Jellyfin
package_path /home/owner/share/tmp/sdk_tools/tmp/Jellyfin.wgt
app_id[AprZAARz4r.Jellyfin] install start
app_id[AprZAARz4r.Jellyfin] installing[10]
app_id[AprZAARz4r.Jellyfin] installing[12]
...
app_id[AprZAARz4r.Jellyfin] installing[95]
app_id[AprZAARz4r.Jellyfin] installing[97]
app_id[AprZAARz4r.Jellyfin] installing[100]
app_id[AprZAARz4r.Jellyfin] install completed
spend time for wascmd is [6820]ms
Installed the package: Id(AprZAARz4r.Jellyfin)
Tizen application is successfully installed.
Total time: 00:00:08.376

The Jellyfin should now be on your TV. Congrats!

Troubleshooting[edit | edit source]

Check certificate error[edit | edit source]

Trying to upload a Jellyfin package results in a certificate error:

leo@ubuntu:~/jellyfin-tizen$ tizen install -n Jellyfin.wgt -t T-samsung-6.0-x86
Transferring the package...
Transferred the package: /home/leo/jellyfin-tizen/Jellyfin.wgt -> /home/owner/share/tmp/sdk_tools/tmp
Installing the package...
--------------------
Platform log view
--------------------
install AprZAARz4r.Jellyfin
package_path /home/owner/share/tmp/sdk_tools/tmp/Jellyfin.wgt
app_id[AprZAARz4r.Jellyfin] installing[10]
app_id[AprZAARz4r.Jellyfin] installing[13]
app_id[AprZAARz4r.Jellyfin] installing[16]
app_id[AprZAARz4r.Jellyfin] installing[18]
app_id[AprZAARz4r.Jellyfin] installing[21]
app_id[AprZAARz4r.Jellyfin] installing[24]
app_id[AprZAARz4r.Jellyfin] install failed[118, -12], reason: Check certificate error : 
spend time for wascmd is [1222]ms
Failed to install Tizen application.
Total time: 00:00:03.689

Possible causes:

  • Your package wasn't signed with the distributor certificate. You need to re-build the Jellyfin.wgt package if your distributor certificate changed.
  • Your distributor certificate isn't installed on your TV device. You need to generate your distributor certificate and then go to Device Manager and 'Permit to install applications'.

Browser cannot be initialized.[edit | edit source]

When trying to obtain a Tizen distributor certificate, you will be prompted to log in to your Samsung account. You may get a "Browser cannot be initialized" error with an empty popup window.

Tizen - Browser cannot be initialized error
Tizen - Browser cannot be initialized error

This is because Tizen doesn't bundle the libwebkitgtk library. The fix here is to install libwebkitgtk 1.0. See the installation steps above on how to get this installed.