Recently while going down the YouTube rabbit hole I found myself watching a video by clabretro. In this video, he creates his own home TV stations using some Raspberry Pis and RF modulators. Over the years I have collected a fairly large amount of media on my media server however, I didn’t just want the stream to be available when I am in my house so Clab’s method of using RF modulators wouldn’t work.
This is where the hero of our story enters, ErsatzTV. This project allows users to create their own IPTV servers to be played via any IPTV-supported player.
Getting started

For my use case, I am running the Windows version of ErsatzTV on an old laptop with an NVIDIA GTX 1650. This will allow me to use the more advanced streaming protocols that support channel watermarks but require transcoding. The server can be downloaded from here. Once downloaded, extract the files and run ErsatzTV-Windows.exe. This will start the server and web portal at http://localhost:8409.
Adding Media
Now that server is started the first step is to add in some media. As mentioned above I already use Jellyfin as my media server and fortunately, ErsatzTV supports linking to Jellyfin to pull media file metadata such as the file path to the media, name, and description.
To do this, navigate to the Jellyfin tab under Media Sources. Click the Connect Jellyfin button and enter the URL to the instance as well as the API key. A guide for creating a Jellyfin API key can be found
With Jellyfin connected we now need to tell ErsatzTV what libraries should be added. To do this click the second button and toggle on the libraries you would like added.
Important to note is that the connection to Jellyfin is just used for metadata and discovery. The media files need to be available on the machine running ErsatzTV. In my case, my media files are all on a shared NAS so this was no problem. I mounted the media folders to the same drive letters they use on Jellyfin and it was good to go.
Setting up a collection and channel
Since I don’t want to create a rigid schedule of what shows should play at what times I plan to use the collection feature of ErsatzTV. This allows me to create a group of shows that I can shuffle and play on a continuous loop. To do this, navigate to the TV Shows tab and select the shows that should be shuffled. Once all are selected click the Add To Collection button on the top right and enter a name for the collection.
By default, there will be a channel named ErsatzTV at channel number 1 using an h264 1080p FFmpeg preset. I modified the FFmpeg preset for my setup to use hardware encoding as well as h265 by navigating to FFmpeg Profiles and editing the default profile. I also went to the Channels tab to edit the name.
With the channel set up the next step is to create a schedule and playout. As you can likely guess schedules determine what shows should play at what times. Playouts are how schedules are assigned to channels. Since this is just a simple shuffled 24-hour loop of shows, both of these will be very simple.
Click the Schedules tab on the left-hand side and create a new schedule. I choose to keep multi-part episodes together as well as to shuffle schedule items. After clicking Add Schedule you can then start adding your schedule items. My setup for a simple shuffled list of shows can be seen below.

Save the changes and navigate to Playouts. Add a playout, selecting the recently created schedule and playout and everything will be good to go.
Streaming the content
So now the server is ready to start serving up your scheduled content all you need to do is point a client to it. The easiest client to configure is VLC. You can test the stream locally by first copying the link labeled M3U at the top of the ErsatzTV page, installing/running VLC, selecting File –> Open Network Stream and pasting the link there. If you want the client to work on a remote machine you will need to replace localhost with your host IP as well as ensure that your firewall rules allow access to port 8409. If everything went well the stream should open and your content should begin playing.
Conclusion
In a later blog post, I plan to further expand upon this setup. While a 24/7 looping stream is fun, it doesn’t have the full replication of live TV I want. ErsatzTV has support for pre-roll, mid-roll and post-roll filler content. I plan to use this feature to add vintage commercials. Additionally developing a weekly schedule of content would make this far more interesting to me as well so stay tuned for more on those changes in a future update.
Leave a Reply