[TVHeadEnd] Hint - Timeshift while recording !

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
LastCoder Offline
Fan
Posts: 434
Joined: Dec 2011
Reputation: 0
Lightbulb  [TVHeadEnd] Hint - Timeshift while recording !
Post: #1
Hi Partypeople,

one of the most requested and used function for me and my wife (you know - WAF Wink ) is the timeshifting while recording .. this function is atm not natively supported .. BUT there is a little circuit to get it without massive C++ hacking ..

put the DVR path location of TVHeadend to a directory that is accessible by XBMC. Then simply stop LiveTV [not recording Laugh], go to Videos -> Files -> your TV directory and - yes - press simply play Nod you'll see that the end time / duration of the video increases while playing .. and if you reach the end, it stops .. [I used MKV for recording, don't know if that matters] ..

you can test playing the file from the records menu but I discovered that this is much more unstable and breaks XBMC at least if you reach end of file ..

Don't know if this works with other PVR Backends ..

Now 'XBMC + PVR supports at this experimental stage everything a good PVR needs Cool

Btw. I'd like to see a XBMC function to copy recordings to "regular" Video / Film directories / locations .. if you delete a recording it's really gone (totally okay) .. so moving would help to keep and organize recordings ...

So long

LastCoder

Ubuntu 12.04 LTS Server, Xfce, XBMC Gotham, Skin reFred, tvheadend tv backend
ASUS P8H61-M LE/USB3, Celeron G530, Geforce 210, 4 GB DDR3 RAM
16 GB CnMemory 300x CF, 1 TB Samsung 2,5" HDD
iHOS104 BluRay Drive, TT DVBS2-1600
Silverstone GD05B Case, Sony PS3 BD Remote control, Logitech Cordless Mediaboard Pro for PS3
find quote
bimbel Offline
Junior Member
Posts: 7
Joined: Jan 2012
Reputation: 0
Post: #2
really nice! i missed this feature.
find quote
ankn Offline
Junior Member
Posts: 17
Joined: Nov 2010
Reputation: 0
Post: #3
LastCoder Wrote:put the DVR path location of TVHeadend to a directory that is accessible by XBMC. Then simply stop LiveTV [not recording Laugh], go to Videos -> Files -> your TV directory and - yes - press simply play Nod you'll see that the end time / duration of the video increases while playing .. and if you reach the end, it stops .. [I used MKV for recording, don't know if that matters] ..

I'm not sure to understand: why tvheadend should record any file in its folder if I press STOP during the livetv session? Do you mean that I should press RECORD in the livetv session?
find quote
LastCoder Offline
Fan
Posts: 434
Joined: Dec 2011
Reputation: 0
Post: #4
Hi,

ankn Wrote:I'm not sure to understand: why tvheadend should record any file in its folder if I press STOP during the livetv session? Do you mean that I should press RECORD in the livetv session?

I didn't mean a general - means always active recording in background independent of a timer / record event like provided by mythTV - timeshift. This is not possible as neither TVHeadEnd nor XBMC supports it. (btw. a function that I always deactivate - personally I don't need and want that).

I meant the following scenario: For example - you want to watch a movie but you have something to do first and you can't start watching it when it starts in TV (If you have little children you know what I mean Tongue). So you'll press record or you have programmed a timer to record that movie. But if you want to watch the currently recorded program later there is atm no function that provides step back / rewind / pause of it. So principally you would have to wait until the recording is finished .. 2 hours waiting if you only missed 10 Minutes ('cause you read a bedtimestory to your children) from the beginning ?? That's oldschool :-)

So with my "hint" you can later, if you have done what you had to do stop LiveTV ('cause record is done by the PVR Backend server, stopping liveTV doesn't affect the recording itself but only the streaming of the current program to XBMC !) and start watching the recorded program as regular video and get your timeshift function .. every commerical break skip takes you closer to the synchronisation with live-stream point and if reached you simply switch back to your liveTV session ...

@dushmaniac: is it hard to embed this "simple" redirection from live-stream to recorded video stream on client side (means XBMC) .. don't see why this should be provided by the TV Backends, seams to be easier on client side ... ?!?

So long

LAstCoder

Ubuntu 12.04 LTS Server, Xfce, XBMC Gotham, Skin reFred, tvheadend tv backend
ASUS P8H61-M LE/USB3, Celeron G530, Geforce 210, 4 GB DDR3 RAM
16 GB CnMemory 300x CF, 1 TB Samsung 2,5" HDD
iHOS104 BluRay Drive, TT DVBS2-1600
Silverstone GD05B Case, Sony PS3 BD Remote control, Logitech Cordless Mediaboard Pro for PS3
find quote
opdenkamp Offline
Team-XBMC PVR Developer
Posts: 2,226
Joined: Feb 2009
Reputation: 29
Location: Heerlen, The Netherlands
Post: #5
no timeshift until after eden. and not like this.

opdenkamp / dushmaniac

xbmc-pvr [Eden-PVR builds] [now included in mainline XBMC, so no more source link here :)]
personal website: [link]

Found a problem with PVR? Report it on Trac, under "PVR - core components". Please attach the full debug log.

If you like my work, please consider donating to me and/or Team XBMC.
find quote
nmcaullay Offline
Member
Posts: 83
Joined: Aug 2010
Reputation: 1
Post: #6
I've been posting to TVHeadend site (feature and forum) about timeshitfing (during recording). There appears to be limited interest in turning this into a feature of TVHeadend.

I can playback a recording that is in progress via XBMC (using recordings under xbmc-PVR, or a NFS mount), but there is sequencing issues on the MKV file that TVHeadend is writing to (which result in seeking issues). From my limited understanding the TVHeadend commitment to MKV format is the barrier. Is this correct? MythTV records to MPEG and doesnt have this issue.

Given the comments above (from two influencial XMBC/OpenElec peoples), do you have any idea how this may pan out? The more I look, the more people I see asking about this functionality. Unfortunately, my coding skills date back to VB6, so I think i'd do more damage than good in the coding department.

Any ideas/thoughts appreciated, as TVHeadend is near perfect for me, just missing the icing on the cake.

Cheers Nathan
(This post was last modified: 2012-06-27 05:40 by nmcaullay.)
find quote
adamsutton Offline
Moderator
Posts: 277
Joined: Jan 2012
Reputation: 16
Post: #7
Nathan,

As you point out you're definitely not the only one who wants time shifting support. The main issue is finding someone with sufficient skill to implement the feature, I haven't yet had a chance to look into the technical issues surrounding time-shifting as its not my area of expertise and I've been busy improving the EPG capabilities. But I know enough to say its not a trivial one.

One issue is that tvheadend isn't being actively developed by Andreas (the project maintainer), but there are others who are working on various aspects and feeding them back through either Andreas or Lars (since most XBMC users use his builds).

And there is a significant fork/re-write of tvheadend (called tvdaemon) that is under way. I'm not personally involved (at this stage) in that work since the timescales don't meet my requirements at the moment, but I believe they are including things like time-shifting in their list of requirements.

And as you also point out there is work required in the XBMC PVR front end to define how this will work and how it will integrate with the backend.

I do feel confident that it will eventually happen, so don't despair just yet Smile Just got to be patient.

Adam
find quote
rcoltrane Offline
Junior Member
Posts: 12
Joined: Jul 2011
Reputation: 0
Post: #8
(2012-06-27 05:39)nmcaullay Wrote:  but there is sequencing issues on the MKV file that TVHeadend is writing to (which result in seeking issues). From my limited understanding the TVHeadend commitment to MKV format is the barrier. Is this correct? MythTV records to MPEG and doesnt have this issue.

You could use EricV's build of tvheadend which can write to an MPEG TS container. It doesn't experience the seek issues you have described.

https://github.com/EricV/tvheadend
find quote
nmcaullay Offline
Member
Posts: 83
Joined: Aug 2010
Reputation: 1
Post: #9
Hi all,

If i had even an ounce of coding skill i'd look into it, but alas, i'm a dummy Smile I hope my comments arent being interpreted as demands or even requests. I am mostly interested in how experienced TVHeadend/XBMC devs think it might go. Based on the above responses, it sounds like the tvdaemon could be a good end point for me. I have had a few runs at the TVHeadend/XBMC partnership, so i have plenty of patience Smile

My current attempt (which is working magnificently) is using the QNAP, with TVHeadend QPKG. This is working great. The only aspect stopping it being mint is the seek issue when watching live recordings (aka timeshifting). I am confident there are enough people out there who are interessted, and hopefully one of them knows how to code Smile

Given my setup above, i have asked the QNAP QPKG maintainer to see if he can package up EricV's version. He is busy for a couple of weeks, but over the weekend I tested EricV's build on a laptop, and it worked fine (with my limited testing). If you are interested, have a look at this thread to see how it is going.
http://forum.qnap.com/viewtopic.php?f=27...&start=330

Cheers and thanks for everyones hard work on this,

Nathan
find quote
adamsutton Offline
Moderator
Posts: 277
Joined: Jan 2012
Reputation: 16
Post: #10
Nathan,

Don't worry too much about making requests Wink Just expect the occasional rebuttle when people can't be assed etc... Wink

Tvdaemon "might" have some potential, but its early days yet and I'm steering clear at the moment because of the potential long lead time and lack of clear timescales. But I think they are trying to address the shortcomings of TVH.

I think the earlier point about Eric's fork is a good one, though I've not personally tried it.

But I know there are some of us trying to improve TVH so hopefully someone will step out of the shadows with a timeshifting implementation Wink But unfortunately its not likely to be me at the moment.

Adam
find quote
cubicle Offline
Junior Member
Posts: 5
Joined: Apr 2010
Reputation: 0
Post: #11
If it helps to know, I'm also very interested in timeshifing in general, not only during recording, and yes, the person who I'm interested in the feature for is my lovely wife :-)

I'm not sure if timeshifting using the back end will ever be effective as through XBMC. Basically, a timeshifting mechanism writes the incoming stream to the disk
* Each packet is appended to the file
* When reaching a certain time limit, packets from the beginning of the file are overwritten (rotational data file)
* Every time the channel is changed, the file is removed

The file doesn't have to be compressed at any time as you might want a recording to be. It's very similar to moving back on a file played on YouTube, but with the rotational behavior.
find quote
adamsutton Offline
Moderator
Posts: 277
Joined: Jan 2012
Reputation: 16
Post: #12
I think the basic use cases are fairly well understood and the high level concepts of how it would work etc...

What's trickier is how it needs to be implemented in practice. This is where my current knowledge falls down.

There also needs to be interaction between XBMC and the backend's to control how this will happen etc.. Since current model (at least for TVH) simply doesn't include the concept of going backwards/forwards in a live stream, its treated very differently to a recording.
find quote
steffen_b Offline
Member
Posts: 52
Joined: Dec 2009
Reputation: 0
Post: #13
Just out of experience (from vdr project), there are 2 things what people are referring to as Timeshift.

1.) pressing "Pause" during live-tv, which starts a recording, and gets seemless played. Or watch any still ongoing recording. (VDR with its own frontends is capable of this, i.e. its one of VDR's features) - in XBMC-PVR is missing:
- the Pause-Key functionality
- not all pvr addons refresh the recording index - so playback of the recordings ending too early (at least last time i tried xvdr/vnsi)

2.) constant Buffer of x minutes running on harddisk, which enables you to pause/rewind x minutes if you watch that station long enough. The request for this one constantly pops-up and there is some patch in development for VDR. Here the community normally divides in 2 halfs. One group thinking its a must have, the other group thinking its a waste of resources (hard disk wear, electricity, cpu ....) - also handling of this is a constant point of discussion (should this be handled like live-tv, should it be handled like a recording, should a new handling in user interface be introduced). Such a buffer would also introduce a lot of buffers to the live tv - which does not help in getting the best usability.

The first one could be fairly easy - though i don't know the dev schedule of xbmc pvr - i hope its being worked on after xbmc-pvr is in xbmc core (i mean we are waiting 2-3 years now - extending scope is nothing which will help to change this) - the second one - is nothing i care about - if it will be implemented, i hope its done being optional feature.

@cubicle: i think no pvr backend is compressing ANY recording at any time - its writing to disk whats coming from the stream - as we are mostly talking about digital tv here. It gets compressed before distribution happens.
find quote