I finally found a solution for the problems with playing Live-TV from Tvheadend on Raspberry Pi.
The two main problems are:
- The I-Frame issue. Omxplayer needs an I-Frame first. This was already discussed and there were special pvr.hts add-on versions trying to fix this issue.
- The other problem is with HD LiveTV on a lot of channels. Tvheadend submits height=1088 in the subsciptionStart message. Omxplayer seems to have problems, it needs height=1080 to start the stream correctly.
What I've done to solve this problems:
I wrote a Python Tvheadend proxy which is used between XBMC/Pi and Tvheadend. The proxy drops the first frames until an I-Frame arrives and corrects the height from 1088 to 1080. The benefits of this solution:
- This workaround can be used until Tvheadend or pvr.hts add-on or Omxplayer are corrected.
- You don't need a special version of OpenELEC, Tvheadend etc. Just use your current installation.
- The solution doesn't affect other clients (PC/Laptops etc.) as you only pass your Pi(s) through the proxy
You can download TvhPiProxy here:
https://github.com/polini/TvhPiProxy
TvhPiProxy has beta status. My Python-knowledge is very limited, so the script could be optimized perhaps. But it works. I had 100% success rate with the proxy up to now.