Recording problem
#1
I'm having a problem with recording from XBMC and would appreciate any suggestions on how to fix it.

Recording of some channels is failing to start with a pop-up message "PVR backend error. Check the log for details...". Recording of the same channels works fine from the Tvheadend web gui. Watching the channels live works fine in XBMC. Recording other channels works fine in XBMC. I don't know what is different with the failing channels compared to the working ones.

I can't see anything in the Tvheadend log when the recording fails to start. (It's as if the recording is never requested.)

The XBMC log shows:
Code:
17:47:14 T:3132   ERROR: PVR - PVR::CPVRClient::AddTimer - addon 'HTS Tvheadend:192.168.2.1:9982' returned an error: server error
17:47:14 T:3132   ERROR: PVR - PVR::CPVRClients::AddTimer - cannot add timer to client '1': server error


XBMC ver Frodo RC1 running on Win 7.
Tvheadend HTSP client ver 1.6.1.
Tvheadend ver 3.2 running on Ubuntu 12.04.
Reply
#2
Hello,

I do have exact same behavior but only for channels with empty EPG. In debug mode:
--
21:45:55 T:4566122496 DEBUG: AddOnLog: Tvheadend HTSP Client: AddTimer - channelUid=8 title=NRJ12 epgid=-1
21:45:55 T:4566122496 DEBUG: AddOnLog: Tvheadend HTSP Client: GetBackendTime - tvheadend reported time=1356813955, timezone=-60, correction=244771792
21:45:55 T:4566122496 DEBUG: AddOnLog: Tvheadend HTSP Client: AddTimer - Error adding timer: 'Channel does not exist'
21:45:55 T:4566122496 ERROR: PVR - AddTimer - addon 'HTS Tvheadend:192.168.0.76:9982' returned an error: server error
21:45:55 T:4566122496 ERROR: PVR - AddTimer - cannot add timer to client '1': server error
--
There is nothing in backend log.

I tried : XBMC RC2 and RC2 d446c0a and tvheadend 3.2.18 and 3.3

Tks,

Xavier
Reply
#3
That's interesting. I just checked and I do have EPG info even for a bad channel. I just noticed though that recording worked fine when started from the EPG view in XBMC but failed when pressing the REC icon during live watching.

New debug log excerpt:
Code:
20:41:03 T:5608   DEBUG: AddOnLog: Tvheadend HTSP Client: CHTSPData::AddTimer - channelUid=6 title=Beginners epgid=431
20:41:03 T:5608   DEBUG: AddOnLog: Tvheadend HTSP Client: CHTSPData::GetBackendTime - tvheadend reported time=1356810000, timezone=-60, correction=1034494865
20:41:03 T:5608   DEBUG: AddOnLog: Tvheadend HTSP Client: CHTSPData::AddTimer - Error adding timer: 'Could not add dvrEntry'
20:41:03 T:5608   ERROR: PVR - PVR::CPVRClient::AddTimer - addon 'HTS Tvheadend:192.168.2.1:9982' returned an error: server error
20:41:03 T:5608   ERROR: PVR - PVR::CPVRClients::AddTimer - cannot add timer to client '1': server error
Reply
#4
ok I guess we're hitting 2 different issues then
Reply
#5
Maybe not completely different issues after all. I just upgraded to XBMC RC2 and my problem may have turned into yours. I was still not able to record on my first attempt but I noticed I had no EPG. After selecting "Update EPG information", I got some EPG data for the failing channel and recording then worked (even from clicking the icon during live watching).

The debug log from my first failed attempt now shows:
13:30:12 T:4628 DEBUG: AddOnLog: Tvheadend HTSP Client: CHTSPData::AddTimer - Error adding timer: 'Channel does not exist'
Reply
#6
I just built and tested pvr.hts addon 1.6.9 from Git. No change.
Reply
#7
I think I may have located something interesting in the addon source HTSPData.cpp. From the logs, epgid (=timer.iEpgUid) = -1 when there's no EPG. I'm thinking the if condition below will be true as timer.iEpgUid<>0. The else clause will not be executed and channelId will never be set. With no valid epg or channel, tvheadend function htsp_method_addDvrEntry will fail with htsp_error("Channel does not exist"). Comments?

Code:
if ((GetProtocol() >= 6) && timer.iEpgUid)
  {
    htsmsg_add_u32(msg, "eventId",     timer.iEpgUid);
    htsmsg_add_s64(msg, "startExtra",  timer.iMarginStart);
    htsmsg_add_s64(msg, "stopExtra",   timer.iMarginEnd);
  }
  else
  {
    htsmsg_add_str(msg, "title",       timer.strTitle);
    htsmsg_add_u32(msg, "start",       startTime);
    htsmsg_add_u32(msg, "stop",        timer.endTime);
    htsmsg_add_u32(msg, "channelId",   timer.iClientChannelUid);
    htsmsg_add_str(msg, "description", timer.strSummary);
    htsmsg_add_u32(msg, "eventId",     -1);
  }
Reply
#8
I'm not code dev so cannot state here. Maybe the best is to open a case with your findings on http://trac.xbmc.org
In the mean time I use xmltv on backend to get a complete EPG.
Reply
#9
(2012-12-31, 10:58)glue Wrote: I think I may have located something interesting in the addon source HTSPData.cpp. From the logs, epgid (=timer.iEpgUid) = -1 when there's no EPG. I'm thinking the if condition below will be true as timer.iEpgUid<>0. The else clause will not be executed and channelId will never be set. With no valid epg or channel, tvheadend function htsp_method_addDvrEntry will fail with htsp_error("Channel does not exist"). Comments?
this code is correct. it either needs the epg event id or channelid+start+end

the problem should be fixed in xbmc's current master. reset the pvr database if it's not fixed for you
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.
Reply
#10
(2012-12-31, 12:28)dushmaniac Wrote: this code is correct. it either needs the epg event id or channelid+start+end

the problem should be fixed in xbmc's current master. reset the pvr database if it's not fixed for you
This is the first time I look at xbmc code so please bear with me. Are you saying that setting iEpgUid to -1 to indicate no epg was a bug in xbmc code and that it should already be fixed in current master?

I will try building current xbmc master and resetting pvr database.
Reply
#11
correct
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.
Reply
#12
I just downladed the nightly build ffa3e48 and I still have the issue. Is it expected ? I thought the fix should already be in the master branch.

Tks,
Reply
#13
reset your pvr database
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.
Reply
#14
I did reset PVR database.

Code:
15:22:53 T:140735174279552   DEBUG: Keyboard: scancode: 24, sym: 000d, unicode: 000d, modifier: 0
15:22:53 T:140735174279552   DEBUG: OnKey: return (f00d) pressed, action is Select
15:22:53 T:140735174279552   DEBUG: ExecuteXBMCAction : Translating PlayerControl(Record)
15:22:53 T:140735174279552   DEBUG: ExecuteXBMCAction : To PlayerControl(Record)
15:22:53 T:4551139328   DEBUG: AddOnLog: Tvheadend HTSP Client: AddTimer - channelUid=13 title=D8 epgid=-1
15:22:53 T:4551139328   DEBUG: AddOnLog: Tvheadend HTSP Client: GetBackendTime - tvheadend reported time=1357050173, timezone=-60, correction=-60
15:22:53 T:4551139328   ERROR: AddOnLog: Tvheadend HTSP Client: ReadResult - command failed - Channel does not exist
15:22:53 T:4551139328   DEBUG: CAddonCallbacksAddon - QueueNotification - Tvheadend HTSP Client - Error Message : 'Command failed: Channel does not exist'
15:22:53 T:140735174279552   DEBUG: ------ Window Init (DialogKaiToast.xml) ------
15:22:53 T:4551139328   DEBUG: AddOnLog: Tvheadend HTSP Client: AddTimer - Failed to get addDvrEntry
15:22:53 T:4551139328   ERROR: PVR - AddTimer - addon 'HTS Tvheadend:192.168.0.76:9982' returned an error: rejected by the backend
15:22:53 T:4551139328   ERROR: PVR - AddTimer - cannot add timer to client '1': rejected by the backend
15:22:53 T:140735174279552   DEBUG: ------ Window Init (DialogOK.xml) ------
15:22:53 T:140735174279552    INFO: Loading skin file: DialogOK.xml, load type: KEEP_IN_MEMORY
15:22:53 T:4552511488 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available
15:22:54 T:140735174279552   DEBUG: Keyboard: scancode: 24, sym: 000d, unicode: 000d, modifier: 0
15:22:54 T:140735174279552   DEBUG: OnKey: return (f00d) pressed, action is Select
15:22:54 T:140735174279552   DEBUG: ------ Window Deinit (DialogOK.xml) ------
15:22:54 T:4551139328   ERROR: PVRTimers - InstantTimer - unable to add an instant timer on the client
15:22:54 T:140735174279552   DEBUG: ------ Window Init (DialogOK.xml) ------
15:22:55 T:4551974912 WARNING: CDVDMessageQueue(video)::Get - asked for new data packet, with nothing available
15:22:55 T:140735174279552   DEBUG: Keyboard: scancode: 24, sym: 000d, unicode: 000d, modifier: 0
15:22:55 T:140735174279552   DEBUG: OnKey: return (f00d) pressed, action is Select
15:22:55 T:4551974912    INFO: CDVDPlayerVideo - Stillframe detected, switching to forced 25.000000 fps
15:22:55 T:4551974912   DEBUG: CPullupCorrection: pattern lost on diff 200000.000000
15:22:55 T:140735174279552   DEBUG: ------ Window Deinit (DialogOK.xml) ------
15:22:55 T:4551139328   DEBUG: video stream stalled. start buffering
Reply
#15
I just tried the nightly "20121231-ffa3e48" and I still see the problem too. My steps:

1. Install nightly
2. Reset PVR database
3. Uncheck "Activate EPG" in channel manager to remove epg info for one channel.
4. Watch channel live.
5. Press rec icon.
6. Fails with "Channel does not exist" and log still shows epgid=-1.
Reply

Logout Mark Read Team Forum Stats Members Help
Recording problem0