kiall / android-tvheadend

Android + TV Headend + TV Input Framework
Apache License 2.0
191 stars 61 forks source link

Local buffering of TV Stream for local timeshifting #234

Open Benoire opened 6 years ago

Benoire commented 6 years ago

Hi

Does the PVR system within Android TV allow you to specify what storage you can use? With external storage on an nVidia Shield you can store content (but not apps etc.) and I wondered whether the PVR api would allow you to change the stream buffer location? If so, you could effectively allow local timeshifting on a buffered stream which would resolve the fast forward issues at higher speeds (greater than x8). I guess you would basically just issues stop/play commands to TVH and then seek in the local buffer rather than the network buffer, as the PVR system does when it connects directly to a network tuner?

xi784 commented 6 years ago

I see no benefit for this. The main goal of tvheadend as backend is to have one server who controls timeshift, recordings and all the other stuff an make it accessible for all clients in the network.

Benoire commented 6 years ago

The main benefit is timeshifting speed. Presently, Kodi and MediaPortal etc. will go to crap with anything greater than a x8 forward seek and then the seek is pointless as you have no idea where you are in the stream. If you've used any PVR box with local recording, you can easily see the value in up to x30 speed, esepcially through live events that have been recorded.

The local stream option would effectively allow local seeking which is more efficient and latency sensitive than a backend doing it... The client is effectively seeking through the timeshift buffer on the network at the moment rather than locally and this approach would allow both satisfying those with local storage attached to their device.

Example of use case is Formula 1, sometimes you don't want to have to sit through the approx. 2.5 hours of pre-race stuff and skipping forward to a specific location is hard to do and I've managed to skip ahead of the start and know who is leading after lap 5 as I was unable to get to the right position in the stream accurately enough.