Kodi Community Forum

Full Version: IPTV remuxer for tvheadend - make any stream work as IPTV input
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
I'm putting this up here in case anyone is interested.


This is a small program that sits in the background and remuxes video streams into MPEG-TS so that tvheadend can use them as IPTV input. This way you can use e.g. HLS streams from svtplay.se as IPTV channels in tvheadend. The README on Github should have all the information you need to get started. An example sources.json with real sources is available here.

A couple of notes about support:
  • If your sources don't use codecs that are standard in DVB (H.264/MPEG-2 video, MP2/AC3/AAC audio) you will need to modify it to do transcoding, which is out of the scope of this thread.
  • anyone using streams that are obviously illegal will not get any support. Legal sources counts as official live streams from a channel's own website
  • do not ask about how to get EPG for the channels, you can do that with XMLTV but it's not related to this
  • do not ask for Windows support, it is not on my priority list

Short HOWTO (read the README on Github first):
  • install the program and configure your sources
  • test your sources with VLC to ensure that they play correctly
  • create a new network in tvheadend, then add each stream as a mux on that network

Planned features:

None at the moment.
This looks great. I think I spoke to you in IRC about something like this a few months ago.
I tried to so it using a phpproxy but this is much better.

I will try this at the weekend.

I implemented customizable parameters per source today. Tested so far with some random HLS streams, a simple RTMP stream and one RTMP stream that required an endless amount of parameters, all worked fine.
Working nicely on Arch with a soft symbolic link to ffmpeg (haven't added parameters).
Tested both audio only and video HLS streams.
Sadly nodejs + ffmpeg is too much for my Tvheadend server which only got 128MB RAM (Pogoplug v4), I guess it's time to move on to something with a little bit more RAM.

I don't see a reason why this can't be packaged for OpenELEC after changing the npm's avconv package to point to ffmpeg.
@dhead you can change the binary used using the -a switch. That way you don't have to create any symbolic links.
thanks @negge.
This feature is implemented directly into Tvheadend since 3.9.2100.


Indeed it is.
This is awesome and could be a game changer for PseudoTV. Imagine either negge's IPTV remuxer or Tvheadend's as input source for custom TV channels based on your video library. Would it be possible to tell ffmpeg reading a whole directory of video files and loop? No more PseudoTV skinning neccessary…
I don't think that's possible, and you'd need to inject the fake EPG data somehow too which is a bit tricky.
I think fake EPG data could be injected using either NFO files or from the Kodi library itself.
tvheadend reads the EPG data from the stream or optionally from XMLTV. You could probably make a script that used the XBMC API to get a list of movies, then shuffle those around and produce XMLTV for tvheadend to consume, though I really don't see the point.
Totally forgot about this. XMLTV grabber aren't that hard to write. And the point is: PseudoTV channels with native LiveTV integration Smile
Feel free, I couldn't care less about pseudo TV ;-)
Is it possible in some way to do the reverse, take a http, .ts (Radio) stream from tvh and remux to an ordinary stream that can be used in e.g. Logitech Media server ?
Pages: 1 2 3 4