Project

General

Profile

Timeshift status

Added by Henric Müller over 11 years ago

Hi,
First, I would like to say that you are making a great tv-server. Really nice.

I'm a bit curious about the status of the timeshift feature. I realize it's not planned until 3.4 release, but I was curious how far you have come, so I compiled the latest tvheadend from github and enabled timeshift to give it a try.
But it doesn't work well. I use XBMC as frontend. I have tried on Mac OS, Ubuntu, Windows, Raspberry Pi (OpenElec), different releases of XBMC and the pvr plugin, 1.1.0 to latest, 1.7 something. On all platforms (except the Ubuntu which is running a XBMC 12 alpha) I have the same problem. I can pause, but when I hit play again the picture freezes after 2-3 seconds and I must stop the live tv and start the channel again.
I haven't seen anything special in the log files - maybe a warning but it seems to be pretty common.

I saw someone wrote something about permissions on the timeshift folder on the server. I believe I have set them readable and executable as I guess it should be:

ll ../hts/TV/
total 16
drwxr-xr-x 4 hts hts 4096 Apr  1 15:01 ./
drwxr-xr-x 8 hts hts 4096 Apr 10 21:09 ../
drwxrwxr-x 2 hts hts 4096 Apr 14 21:58 recording/
drwxr-xr-x 3 hts hts 4096 Apr 15 10:31 timeshift/

Is this a known problem? What can I do to help you solve this? Provide logs etc? Is this problem entirely on the XBMC side (the pvr plugin) or does the server side has anything to do with this as well?

This is a part of the XBMC log where I have started watching a channel and then hit pause and play again.
XBMC PVR plugin version 1.7.19

10:51:49 T:140735200289152   DEBUG: ExecuteXBMCAction : Translating PlayerControl(Play)
10:51:49 T:140735200289152   DEBUG: ExecuteXBMCAction : To PlayerControl(Play)
10:51:49 T:4680597504   DEBUG: AddOnLog: Tvheadend HTSP Client: SendSpeed(1, 0)
10:51:50 T:140735200289152   DEBUG: CAnnouncementManager - Announcement: OnPause from xbmc
10:51:50 T:140735200289152   DEBUG: GOT ANNOUNCEMENT, type: 1, from xbmc, message OnPause
10:51:50 T:4665565184    INFO: AddOnLog: Tvheadend HTSP Client: ParseSubscriptionSpeed - speed = 0
10:51:50 T:140735200289152   DEBUG: Keyboard: scancode: 0x00, sym: 0x0136, unicode: 0x0000, modifier: 0x0
10:51:50 T:140735200289152   DEBUG: GetActionCode: Trying Hardy keycode for 0xf200
10:51:50 T:140735200289152   DEBUG: Previous line repeats 3 times.
10:51:50 T:140735200289152   DEBUG: OnKey: 0 (0xf200) pressed, action is
10:51:54 T:4609581056   DEBUG: Thread Jobworker 4609581056 terminating (autodelete)
10:51:54 T:4609044480   DEBUG: Thread Jobworker 4609044480 terminating (autodelete)
10:51:54 T:4621729792   DEBUG: Thread Jobworker 4621729792 terminating (autodelete)
10:51:56 T:140735200289152   DEBUG: Keyboard: scancode: 0x24, sym: 0x000d, unicode: 0x000d, modifier: 0x0
10:51:56 T:140735200289152   DEBUG: OnKey: return (0xf00d) pressed, action is Select
10:51:56 T:140735200289152   DEBUG: ExecuteXBMCAction : Translating PlayerControl(Play)
10:51:56 T:140735200289152   DEBUG: ExecuteXBMCAction : To PlayerControl(Play)
10:51:56 T:4680597504   DEBUG: AddOnLog: Tvheadend HTSP Client: SendSpeed(1, 100)
10:51:57 T:4665565184    INFO: AddOnLog: Tvheadend HTSP Client: ParseSubscriptionSpeed - speed = 100
10:51:57 T:140735200289152   DEBUG: CAnnouncementManager - Announcement: OnPlay from xbmc
10:51:57 T:140735200289152   DEBUG: GOT ANNOUNCEMENT, type: 1, from xbmc, message OnPlay
10:51:57 T:140735200289152   DEBUG: Keyboard: scancode: 0x00, sym: 0x0136, unicode: 0x0000, modifier: 0x0
10:51:57 T:140735200289152   DEBUG: GetActionCode: Trying Hardy keycode for 0xf200
10:51:57 T:140735200289152   DEBUG: Previous line repeats 3 times.
10:51:57 T:140735200289152   DEBUG: OnKey: 0 (0xf200) pressed, action is
10:52:05 T:4683280384 WARNING: CDVDMessageQueue(video)::Get - asked for new data packet, with nothing available
10:52:05 T:4683280384    INFO: CDVDPlayerVideo - Stillframe detected, switching to forced 50.000000 fps
10:52:05 T:4683280384   DEBUG: CPullupCorrection: pattern lost on diff 100000.000000
10:52:06 T:140735200289152   DEBUG: Keyboard: scancode: 0x00, sym: 0x0136, unicode: 0x0000, modifier: 0x0
10:52:06 T:140735200289152   DEBUG: GetActionCode: Trying Hardy keycode for 0xf200
10:52:06 T:140735200289152   DEBUG: Previous line repeats 3 times.
10:52:06 T:140735200289152   DEBUG: OnKey: 0 (0xf200) pressed, action is
10:52:07 T:4683280384   DEBUG: CPullupCorrection: detected pattern of length 1: 20000.00, frameduration: 20000.000000
10:52:14 T:140735200289152   DEBUG: Keyboard: scancode: 0x00, sym: 0x0136, unicode: 0x0000, modifier: 0x0
10:52:14 T:140735200289152   DEBUG: GetActionCode: Trying Hardy keycode for 0xf200
10:52:14 T:140735200289152   DEBUG: Previous line repeats 3 times.
10:52:14 T:140735200289152   DEBUG: OnKey: 0 (0xf200) pressed, action is
10:52:22 T:140735200289152   DEBUG: Keyboard: scancode: 0x24, sym: 0x000d, unicode: 0x000d, modifier: 0x0
10:52:22 T:140735200289152   DEBUG: OnKey: return (0xf00d) pressed, action is Select
10:52:22 T:140735200289152   DEBUG: ExecuteXBMCAction : Translating PlayerControl(Play)
10:52:22 T:140735200289152   DEBUG: ExecuteXBMCAction : To PlayerControl(Play)
10:52:22 T:4680597504   DEBUG: AddOnLog: Tvheadend HTSP Client: SendSpeed(1, 0)
10:52:22 T:4665565184    INFO: AddOnLog: Tvheadend HTSP Client: ParseSubscriptionSpeed - speed = 0
10:52:22 T:140735200289152   DEBUG: CAnnouncementManager - Announcement: OnPause from xbmc
10:52:22 T:140735200289152   DEBUG: GOT ANNOUNCEMENT, type: 1, from xbmc, message OnPause
10:52:23 T:140735200289152   DEBUG: Keyboard: scancode: 0x24, sym: 0x000d, unicode: 0x000d, modifier: 0x0
10:52:23 T:140735200289152   DEBUG: OnKey: return (0xf00d) pressed, action is Select
10:52:23 T:140735200289152   DEBUG: ExecuteXBMCAction : Translating PlayerControl(Play)
10:52:23 T:140735200289152   DEBUG: ExecuteXBMCAction : To PlayerControl(Play)
10:52:23 T:4680597504   DEBUG: AddOnLog: Tvheadend HTSP Client: SendSpeed(1, 100)
10:52:23 T:4665565184    INFO: AddOnLog: Tvheadend HTSP Client: ParseSubscriptionSpeed - speed = 100
10:52:23 T:140735200289152   DEBUG: CAnnouncementManager - Announcement: OnPlay from xbmc
10:52:23 T:140735200289152   DEBUG: GOT ANNOUNCEMENT, type: 1, from xbmc, message OnPlay
10:52:24 T:140735200289152   DEBUG: Keyboard: scancode: 0x00, sym: 0x0136, unicode: 0x0000, modifier: 0x0
10:52:24 T:140735200289152   DEBUG: GetActionCode: Trying Hardy keycode for 0xf200
10:52:24 T:140735200289152   DEBUG: Previous line repeats 3 times.
10:52:24 T:140735200289152   DEBUG: OnKey: 0 (0xf200) pressed, action is

Replies (23)

RE: Timeshift status - Added by Prof Yaffle over 11 years ago

I can't immediately help with the log file, but some thoughts...

1. I use the default timeshift folder, so it's in /home/hts/.hts/tvheadend... here are all of my permissions:

hts@Server:~/.hts/tvheadend$ ls -la
total 32444
drwxr-xr-x 13 hts hts       4096 Apr 12 10:50 .
drwxr-xr-x  3 hts hts       4096 Mar 26 20:54 ..
drwx------  2 hts video     4096 Mar 28 18:33 accesscontrol
drwx------  2 hts video     4096 Apr 12 15:38 autorec
drwx------  2 hts video    12288 Apr 15 19:39 channels
drwx------  2 hts video     4096 Apr 10 09:47 channeltags
drwx------  2 hts video     4096 Apr  8 17:25 dvbadapters
drwx------  4 hts video     4096 Apr  7 19:40 dvbmuxes
drwx------  3 hts video     4096 Apr  7 19:37 dvbsatconf
drwx------ 96 hts video    12288 Apr  7 20:17 dvbtransports
drwx------  3 hts video     4096 Apr 12 13:58 dvr
-rwx------  1 hts video 33148761 Apr 15 12:24 epgdb.v2
drwx------  2 hts video     4096 Apr 15 12:38 epggrab
-rw-------  1 hts hts         43 Apr 12 10:50 superuser
drwx------  3 hts video     4096 Apr 15 12:25 timeshift

2. You could change permissions to 777 if you want to truly rule out permissions.

3. Or try a ramdisk for the timeshift buffer.

I'm not (yet) a big user of the timeshift function, so I can't preach on how wonderful it is - but I haven't noticed any major problems on any of my systems, which are OE3 or 12.2 with recent add-ons.

RE: Timeshift status - Added by Henric Müller over 11 years ago

Thanks for your reply. I have now reset the entire config for timeshift (I removed the timeshift folders and reenabled it in the web UI), so now my tvheadend folder looks like yours:

ll -a
total 8520
drwx------  16 hts hts      4096 Apr 15 22:38 ./
drwx------   3 hts hts      4096 Apr  3 00:16 ../
drwx------   2 hts hts      4096 Apr  3 00:30 accesscontrol/
drwx------   2 hts video    4096 Apr  7 19:12 autorec/
drwx------   2 hts hts      4096 Apr 14 17:30 channels/
drwx------   2 hts hts      4096 Apr 14 11:19 channeltags/
-rwx------   1 hts video      47 Apr 14 10:40 config*
drwx------   2 hts hts      4096 Apr  3 00:06 cwc/
drwx------   2 hts hts      4096 Apr  3 00:06 dvbadapters/
drwx------   7 hts hts      4096 Apr  3 00:06 dvbmuxes/
drwx------   6 hts hts      4096 Apr  3 00:06 dvbsatconf/
drwx------ 313 hts hts     53248 Apr  8 02:22 dvbtransports/
drwx------   3 hts hts      4096 Apr  3 00:06 dvr/
-rwx------   1 hts hts   8599085 Apr 14 22:58 epgdb.v2*
drwx------   2 hts hts      4096 Apr 15 22:52 epggrab/
drwx------   3 hts video    4096 Apr  7 00:23 imagecache/
-rw-------   1 hts hts        49 Apr 10 21:44 superuser
drwx------   3 hts video    4096 Apr 15 22:39 timeshift/
drwx------   2 hts hts      4096 Apr 14 10:40 tvhtime/

I also verified that tvheadend actually creates the buffers inside timeshift folder and it does.

Unfortunately it's still the same problem. Another thing I noticed is that it sometimes works the first time I tune in to a channel after having started XBMC. But if I stop the live tv in XBMC and then start the channel again, the problem occurs (freeze after 3 seconds and I need to hit Stop and start the channel again). I will see if ramdisk changes anything.

RE: Timeshift status - Added by Prof Yaffle over 11 years ago

I don't know your backend config or how much load you're putting on the disc - maybe also worth considering trying a different platter (USB should be plenty fast enough) for the timeshift buffer?

RE: Timeshift status - Added by Henric Müller over 11 years ago

I don't think that's an issue at the moment. The server isn't doing anything else. However, I plan to install another disk so I can separate recording and timeshifting. Even better would be if you could specify a disk per tuner, but I don't believe that's possible for tvheadend?
However, when I did my tests now, the server didn't do anything else but tuning in to the channel I was watching. Previously I have also tried recording two programs and watching another one and it didn't affect performance.

I have now also tested to put the timeshift folder on a ramdisk with the same result. More and more I believe this has nothing to do with the server side, but instead the XBMC side.

df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       227G   77G  139G  36% /
udev            1.5G  4.0K  1.5G   1% /dev
tmpfs           581M  616K  581M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            1.5G     0  1.5G   0% /run/shm
none            100M     0  100M   0% /run/user
tmpfs           512M     0  512M   0% /tmp/ramdisk
root@tvserver:~# ll /tmp/ramdisk/
total 4
drwxrwxrwt 3 root root    60 Apr 16 08:36 ./
drwxrwxrwt 5 root root  4096 Apr 16 08:38 ../
drwx------ 3 hts  video   60 Apr 16 08:36 timeshift/

RE: Timeshift status - Added by Henric Müller over 11 years ago

Nobody else having these problems? Is timeshift working good for everyone or is there simply onone out there using it fully? Could anyone of the author please clarify the status of timeshift feature - is it suppose to work with xbmc as frontend for example?

Kind regards
Henric

RE: Timeshift status - Added by Nathan Fieldhouse over 11 years ago

HI, yes I am having pretty much the same issues. I have asked on the XBMC forums but have had no response. My setup is :-

File and TV Server :
AMD FX2 Quadcore CPU
2 X Hauppauge DVB-T 1200 Cards
7 Harddisks. 6 in Raid and the 7th is for TVHeadend + OS (LinuxMint v13).

Clients :
AMD E-350 running Openelec 3.0.1

Shuttle XS35 with ION running LinuxMint v14 and XBMC 12.1

AMD Phenom x4 with HD6770 running Ubuntu 12.10 and XBMC 12.1.

All the clients have the same problem. I am finding LiveTV Pause hit and miss, 75% fail (resumes for about a sec) but sometimes does resume correctly.

RE: Timeshift status - Added by wet willy over 11 years ago

Timeshift is working exactly as it is supposed to for me, I think you guys are using old versions.

Henric you wrote: "I realize it's not planned until 3.4 release." So I guess you missed that 3.4 is considered stable in the new ppa's.

Backend:
Tvheadend 3.4~quantal running as a VM with USB-passthrough'd Nanostick 290E tuner
Timeshift Enabled and "On-Demand" from webgui.

Frontend:
PXE-booted OpenElec 3.0.1

Can pause and resume and view for hours ;)

But I do recognize the issues you mentione from earlier versions.

RE: Timeshift status - Added by Nathan Fieldhouse over 11 years ago

Sorry forgot to state I currently using version 3.4. I had same issue on all betas pre 3.4 release. I did try the unstable ppa and did get a better result probably 75% success instead of 75% fail. The strange thing is the status page indicates it is streaming correctly the front end

RE: Timeshift status - Added by wet willy over 11 years ago

The issue could also be with the frontend.

Make sure you are using at least XBMC 12.1

RE: Timeshift status - Added by Nathan Fieldhouse over 11 years ago

I did list all three clients as running XBMC 12.1. I will try the latest unstable PPA build and see how it goes.

RE: Timeshift status - Added by Nathan Fieldhouse over 11 years ago

OK updated to version 3.5.115 off the the unstable ppa. The first channel I started watching worked perfectly, I could pause and resume without issue. Changed channel and back to the old problem, plays about 1-2 secs then stops. Changed to a different client box same issue. I did notice that when resume did work for the first time, after about 3 secs of play back the picture went all pixilated and messed up, then it came right and played fine. What are the chances that XBMC cannot handle this stream error correctly and so stops playback?

RE: Timeshift status - Added by Henric Müller over 11 years ago

Nathan: This is exactly how I experience it.

wet willy: I have build from latest source and I am regulary updating from git and recompiling. I will try some more this week since I haven't updated for a week or so but I don't think it has happened anything with the timeshifting in the code since I last compiled.
Regarding XBMC I have tried latest stable and latest nightly builds so I do not think it's about me running old versions.

You say you have selected "on demand" - that I haven't tried. I will check and see if there is any difference. Have you tried without "On demand"? From the docs: "Turn this on to start timeshift buffer on pause. In this mode you cannot rewind the buffer"
This isn't what I would like since I would like to be able to rewind at any time even when I haven't pressed pause.

Also, are you using timeshift and how are you using it. Pause, rewind etc?

RE: Timeshift status - Added by wet willy over 11 years ago

Yes, I have enabled on demand.

My timeshift usage would be something like this:

Watching TV and get disturbed, need to go to bathroom etc. Press space to pause.

Get back and unpause, then when a commercial comes up I fastforward. I never rewind.

RE: Timeshift status - Added by Adam Sutton over 11 years ago

Try without on-demand, I admit I added this as a bit of an after-thought based on some user requests and I have heard a few people suggest its not working properly. I will try and take a look when I get a chance.

Adam

RE: Timeshift status - Added by Henric Müller over 11 years ago

I have now tried with latest source of tvheadend: 3.5.116~ga2ccbb2~precise and it's still the same problem. Both with "On demand" and without "On demand".
I also downloaded the latest alpha of XBMC 13.0 (Mac OSX).
I also tried installing from latest ppa:

sudo aptitude show tvheadend
Package: tvheadend                       
New: yes
State: installed
Automatically installed: no
Version: 3.5.116~ga2ccbb2~quantal
Priority: extra
Section: video
Maintainer: Andreas Öman <[email protected]>
Architecture: i386
Uncompressed Size: 7,124 k
Depends: libavahi-client3 (>= 0.6.16), libavahi-common3 (>= 0.6.16), libc6 (>= 2.7), libcurl3-gnutls (>= 7.16.2), libssl1.0.0 (>= 1.0.0), zlib1g (>= 1:1.1.4)
Recommends: xmltv-util
Replaces: hts-tvheadend
Enhances: showtime
Description: Tvheadend
 Tvheadend is a TV streaming server for Linux supporting DVB, ATSC, IPTV, and Analog video (V4L) as input sources. Can be used as a backend to Showtime, XBMC and various other clients.
Homepage: https://tvheadend.org

Still the same result.

RE: Timeshift status - Added by Henric Müller over 11 years ago

Hi Adam,
Thanks for your reply. Is there anything I cano do to help you out? Provide logs or any other info? Or do you have any idea what might be wrong in the code and I maybe can have a look? Do you think it's on the tvheadend side or the XBMC side?

RE: Timeshift status - Added by Nathan Fieldhouse over 11 years ago

I have been testing with the On-demand checked and unchecked both has the same results. It does seem that if TVHeadend is restarted the first channel I watch will pause correctly after that it fails. The garbled stream after the first 3 secs I thought could be upsetting XBMC so I wondered if it a problem in front-end. If I check the status page when the stream has frozen, TVHeadend still shows it's streaming happily.

RE: Timeshift status - Added by Nathan Fieldhouse over 11 years ago

Check the Unlimited File Size box on the timeshift config tab. Problem solved.

RE: Timeshift status - Added by Henric Müller over 11 years ago

Yes! Thanks Nathan - that did it for me as well.
So now I can pause - I will try to examine the rewind/forward functionality the coming week.

RE: Timeshift status - Added by Pedro Pena about 11 years ago

Hello Henric,

I was wondering of you are still having any issues with timeshift? I've followed lots of recommendations to make this work but all I can reliably do is pause and resume.
Rew and FF seem to be unpredictable for me.

I'm using XBMC 12.2 as a frontend and running HTS Tvheadend 3.5.244~gf5c5ffd-dirty.

I can kind of work around my problem by letting XBMC handle timeshifting. I'll start recording what I want to watch, stop viewing and then begin playing
back the show as a recording as it's being recorded.

Doing it this way I can reliably pause, play , rewind and fast forward.

It would be nice to have an option to let the frontend handle the timeshifting if desired.
I'll search to see if someone has recommended this.

RE: Timeshift status - Added by Henric Müller about 11 years ago

Hi,

I haven't used my tvheadend server in a while but when I tried it from time to time there is still the same problem. I can pause (sometimes) but forward and rewind is buggy and basically doesn't work.

RE: Timeshift status - Added by Pedro Pena about 11 years ago

I saw how you hadn't commented after your last post and it made me hope you had had some success with the timeshift feature.
Thanks anyhow

RE: Timeshift status - Added by Bennett Kanuka about 11 years ago

Hi, I'm having the same issues described here. Is there some way I can help?

    (1-23/23)