TVHeadFish

Rating: 
5
Your rating: None Average: 5 (1 vote)

TVHeadFish is TVHeadEnd client for Sailfish OS. It uses the official HTS Protocol to communicate with TVHeadEnd Server. This should allow it to function with the majority of current TVHeadend Server releases. This is my first attempt at changing over to using the HTS Protocol, so the code may be a little shakey to begin with.

To use TVHeadFish, you need the IP address and port number where your TVHeadEnd server is running. Additionally, you can specify the HTTP port where TVHeadend exposes its HTTP interface (this is largely unused). Currently, authenticated access is not supported. I intend to add this in the next release.

TVHeadFish provides the following features:

  • Channel listing by Tag - a pull up menu allows you to select different tags (e.g. TV, Radio etc)
  • EPG (Programme Schedule) - This will show items that are scheduled over the next 24 hours. It excludes items that run longer than 5 hours.
  • Schedule by Channel - clicking on a channel in the channel listing shows you the channel schedule
  • Programme details view - for any programme in view, clicking on the programme shows you the programme title, description, start and end time, channel name etc. For each programme, there is either a label describing that the programme is scheduled to record, is recording; or a button to allow you to set the programme to record.
  • Scheduled Recording View - allows you to view programmes that are due to be recorded in the future. Long press allows you to remove programmes in the schedule.
  • Finished Recordings View - allows you to view programmes that have finished recording. Long press allows you to remove items from this menu. Clicking allows you to view details and to select to watch a recording.
  • Video Playback - you can watch live tv or radio by selecting the 'Watch channel Live' option from the pull-down menu on the channels view. You can watch recordings in the Finished Recordings View. [NB! This does not currently work... but I intend to repair this functionality in the near future]

Video playback is not very stable for some channels. This is probably due to the version of GStreamer that is currently packaged for Sailfish OS. I use very similar code to LLVideoPlayer for this function, and Leszek and I have the same problem here. We are hoping that this will be resolved in a future release of SailfishOS. From my side, some channels and recordings play fine and others just do not. There is not much I can do about this for now.

ROADMAP:

 

  • Support authentication against the TVHeadend Server
  • Prettify home screen and explore options for Cover (maybe a status indicator)
  • Provide more options to control limits and filters
  • Fix video playback
  • Make this app harbour-friendly (this requires harbour to support applications that use the Sailfish Media library API)

If you use this app, please leave feedback. You can help me to work out what items need priority or what is missing from my RoadMap. Or you can just tell me that its great, and that provides a perfect motivator to keep sharing this stuff. This app is only useful to a very niche group of Jolla users, so letting me know what works and what doesn't helps me to ensure that you guys have the best possible experience.

Source code is available at: https://github.com/goroboro/TVHeadFish

Screenshots: 

Keywords:

Application versions: 
AttachmentSizeDate
File tvheadfish-0.1-1.armv7hl.rpm24.61 KB20/03/2014 - 00:11
File tvheadfish-0.2-1.armv7hl.rpm25.47 KB20/03/2014 - 17:49
File tvheadfish-0.3-1.armv7hl.rpm25.55 KB21/03/2014 - 13:03
File tvheadfish-0.4-1.armv7hl.rpm25.59 KB21/03/2014 - 16:59
File tvheadfish-0.5-1.armv7hl.rpm26.1 KB26/03/2014 - 16:58
File tvheadfish-0.6-1.armv7hl.rpm28.02 KB31/03/2014 - 15:29
File tvheadfish-0.7-1.armv7hl.rpm28.59 KB01/04/2014 - 03:24
File tvheadfish-0.8-1.armv7hl.rpm48.25 KB04/06/2015 - 14:41
Changelog: 

(none)

Comments

yoktobit's picture

Maybe this could help you?

https://github.com/RobertMe/QHtsp

It's 3 years old and I don't know if htsp has changed a lot since then...you would also need to register the qmltypes by yourself and it's missing Properties for exposing to qml, but maybe it's a start.

roboro's picture

Hi yoktobit... thanks for the reference. I had a look at RobertMe's repo some time back... unfortunately I struggled to do this in C++ mainly because I lack enough experience with it. So I'm doing it in python and working things out largely from scratch...

Once I got the initial client working things got a lot easier. Probably picking up someone else's work on this would save me a lot of time... but I think the only way I would be able to do this really would be to switch to coding in C or C++.

I think for now I will push along with what I have. Incidentally, does the client work for you?

Thanks

yoktobit's picture

I admit that I couldn't test it until now, because I have authentication activated. After looking at your code maybe it's enough to edit the installed qml files and pass username and password to the open method of XMLHttpRequest, but I had no time to try that out.

roboro's picture

I've updated TVHeadFish to 0.4. This version does not work wtih TVHeadend 3.5! It is a quick fix to get it working with TVHeadend 3.9. So don't upgrade if this was working for you before! I fully intend to change my code eventually to support multiple versions, but this is going to take me a fair bit of time.

jayki's picture

Many thanks :)

Now it at least is showing me the channel Infos :)

Streaming doesn't work, but i think thats a little too soon to expect this ;)

Edit: Streaming is working for some channels, as you said in the Description.

Do you intend to make the Source public at any point? 

So I'm not the best developer, but maybe someone could help you at any point ;)

The Community here is very great so I think you'll find someone helping you, if you make the source available (: 

roboro's picture

Source code now available at: https://github.com/goroboro/TVHeadFish

roboro's picture

Awesome... I can certainly set up a repo somewhere for the source... so that should be no problem. I'll look at this soon. However, in the meanwhile, there is nothing closed about this application... it entirely uses JavaScript and QML to work... so you can check all the source in: /usr/share/TVHeadFish/qml/

Obviously, if I change over to using HTSP, then I am going to have to use something a bit more robust than JavaScript to handle the binary in this protocol. If I take that route, I'm gonna need all the help I can get.

If you work out fixes etc, please feel free to contact me and I will try to incorporate them.

As for the streaming stuff... yeah, its really iffy... I'm just using the same approach that LLsVideoPlayer uses (some of the code is lifted from an early release of this)... so I'm not in control of the underlying player code. Frustrating that things keel over for some channels... I wish I could fix this.

jayki's picture

Thanks for your work!!!

Could you please add error reporting?

Because for me the app doesn't work... after klicking connect i get a plain page...

Would like to know what the problem is... Thvheadend is running and with Android app

TVHGuide its working...

Ps: My Tvheadend version is: HTS Tvheadend 3.9.431~g3f3fdc8

Maybe you can look at the sources from the android app:

http://john-tornblom.github.io/TVHGuide/

Thank you :)

roboro's picture

Good news... I am updating my TVHeadend server to 3.9... which should mean that I have to fix my code to support this as well... :)

So you should find this working fairly soon.

roboro's picture

Thanks for the comment... I'm really sorry if this hasn't worked for you yet.

I have added error reporting on the channel page to eventually display the reason why channels fail to load...

More than likely the issue you are running into is related to the version of TVHeadend that you are using... as I said in the description, I'm only testing against 3.5. After chatting to the guys on #hts it seems that using the undocumented Javascript API leads to a path of pain, since this API has changed for nearly every release so far. That said, the guy behind the iOS client said that he has taken the same approach, but has a load of code to determine which version you are using and then change the API calls appropriately.

I may look into this, but probably the better approach will be to use the HTSP API directly. However, the code for this would be much more complex and I couldn't just get away with QML and JavaScript to do it. So if I switch APIs I'm going to end up with a bunch of dependencies that I'm going to have to deal with. That said, the Android App is using HTSP directly, so I may be able to get a fair picture of what I need to do from that source code.

It might be a while before I am able to support you properly, but keep an eye on my app... as soon as I have the time to switch API or find a workaround, I will let you know.