I'm using VDR for maybe 5 years mainly as back-end recording device. Some time ago my VDR started restarting very often so that recording became a mess of many files. I first investigated for possible HW problems - antenna connection, PC - input signal was perfect, same problem on different PC, same for vdr 2.0.4 and vdr 2.1.2. I performed testing with vdr-core only, no plugins. Using Ubuntu 13.10 and before 12.04. I recorded Finnish terrestrial TV channels.
Finally, after some learning about vdr SW, I found the cause. It is inside the vdr.c line 896 if statement:
895: // Handle channel and timer modifications:
896: if (!Channels.BeingEdited() && !Timers.BeingEdited()) {
The problem occurs when primary device, device-1, is recording a channel not equal to channel 1, e.g. channel 13, and the pids of channel 1 change during the recording channel 13. Current channel was 1 all the time(?). It happens with 1 and more devices, I tested with all devices recording. When channel 1 modifications pass the CHANNELMOD_RETUNE mask following function is called:
915: cRecordControls::ChannelDataModified(Channel);
that returns without any action because channel 1 is not the recording channel. Next following sequence leads to switching device 1 to channel 1:
916: if (Channel->Number() == cDevice::CurrentChannel()) {
if (!cDevice::PrimaryDevice()->Replaying() cDevice::PrimaryDevice()->Transferring()) {
if (cDevice::ActualDevice()->ProvidesTransponder(Channel)) { // avoids retune on devices that don't really access the transponder
isyslog("retuning due to modification of channel %d", Channel->Number());
920: Channels.SwitchTo(Channel->Number());
I don't quite understand the purpose of this sequence and I haven't time to investigate it. Anyway in my case the currentChannel = 1 all the time, so for channel 1 it meets the if condition and it also passes the 2nd if.
Well, device 1 is switched to channel 1 even it is recording on channel 13, and after 30s we get timeout in recorder.c line 169, because channel 13 is cut off.
I got vdr working, at least for me, using a simple correction by commenting out line 920:
920: // Channels.SwitchTo(Channel->Number());
Maybe someone with a deeper knowledge about vdr could explain what really happens and propose a proper solution.