[vdr] error on large EPG loads via SVDRP

Pjotr Kourzanov peter.kourzanov at xs4all.nl
Mon Jan 22 15:45:42 CET 2007


Rob Davis wrote:
> Pjotr Kourzanov wrote:
>> Luca Olivetti wrote:
>>> En/na Klaus Schmidinger ha escrit:
>>>> Udo Richter wrote:
>>>>> Pjotr Kourzanov wrote:
>>>>>>   I am experiencing VDR errors when loading EPG via SVDRP. If the EPG
>>>>>> data to
>>> ...
>>>>
>>>> I have recently sent the attached patch to Thomas Koch 
>>>> <tom at linvdr.org>.
>>>> It dramatically speeds up getting EPG information from VDR.
>>>
>>> I think the OP problem is the reverse: getting EPG data into vdr, not 
>>> out of it.
>>>
>>> Bye
>>
>>  Indeed, I was referring to the problem of loading the data to VDR. 
>> Tweaking the watchdog
>> timer looks like a dirty workaround to me - the value depending on 
>> amount of EPG data to
>> be loaded divided by the speed at which this data could be transferred 
>> to VDR (do we assume
>> loopback access, or ethernet? maybe wireless or WAN/VPN access?).
>>
>> I have neither investigated the problem deeper yet (just found a way 
>> to split the EPG data into
>> parts), nor looked in the source code. Is it so difficult to convince 
>> the watchdog that while SVDR thread is busy it is actually doing 
>> useful work?
> 
> Pjotr,
> 
> How did you split the information up?

See script attached (given stdin, creates epg.[0-9]* files of ~3megs,
without overwriting).

> 
> I have a 17MB xmltv file which I would like to upload into VDR.
> 
> Is it possible to adjust xmltv2vdr.pl to split the xmltv epg into parts 
> too?
> 

Maybe. I found xmltv2vdr just too slow - it took ~9 hours to output
17MB of VDR epg.data. The XML was btw. ~54MB.

> My python knowledge is limited, but I am willing to have a stab at it.
> 

xmltv2vdr.pl is perl:-( But if you know AWK, I've posted my version
of xmltv2epg on this list that takes ~40 minutes on the same data:-)
Also, it takes extra info like credits into VDR's epg...

Regards,

Pjotr
-------------- next part --------------
#!/usr/bin/awk -f
BEGIN {
	max=3*1024*1024
	if (!base) base="epg."
	n=1
	advance()
	size=0
}
/^[CEeTSDX]/ { size+=length }
{ print > base n }
/^c/ { 
	if (size>max) {
		advance()
		size=0 
	}
}
func advance() {
	while (!system("stat " base n " >/dev/null 2>&1")) 
		n++
}


More information about the vdr mailing list