Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: 'unknown picture type´' while in live-view



Hi brothers in trouble,

Martin Holst schrieb:

Harald Bernlochner wrote:

Well, I think, that there are only some lonely guys, which had this problem. I have it too (see http://www.linuxtv.org/mailinglists/vdr/2003/09-2003/msg00099.html).

i think, there are a lot of people with this problem. But there is still no
solution available.
yes unfortunately, and as far as i have followed, and suffered
it the only things which all problem reports share are:

- 2 card system
- the trouble starts when the 2nd device comes into action
  (2nd record,or transfer mode)

no other similarities come into my mind, so from the advanced users
point of view one is looking for a workaround for now.

for a fix which would/could minimize the effects, until it
is cured, the assumption that a restart should be done
if this error occurs 'n' times in 't' seconds, seems right.

so one possible fix/workaround (i use myself) is to watch
the syslog (/var/log/messages) for repeating occurrences
of the invalid picture type error, in a given time.

this helps for most times, since usually one has a time
pre buffer of some minutes, so nothing of the recording should
be lost/damaged.

BUT this is at least not true for the following cases:
- if after 2 recordings have run on both cards, and the primary
  is still recording and the second gets the error and a third
  recording starts in the 2nd device triggering the restart.
  [2nd recording on 1st card would have a restart within]

- while at least the second card records, the user triggers
  the error by heavily zapping, using transfer mode, cutting,
  massive svdrp,...
  [can be avoided by: user taking care, running tasks at different
   nicelevels, using better cpu/faster disk-system, ...]

so for me it atleast saved 9 recordings while only breaking
one (i did cut, tcmplex and compiling stuff on my 1,1GHZ Athlon)
recording so far.

i'll include the script, in case someone wants to give it a try.
---------------
#!/bin/bash
# watches syslog for "picture type" errors detected by vdr
# if this error occurs MAX_COUNT times in TIME_DELTA seconds
# vdr is killed with signal 9, to trigger a restart.
# (this could also be a svdrp call or a killall runvdr)
# i suggest editing your runvdr to unload/reload the driver
# at least twice to reduce the likeliness of a subsequent
# error.
#
# it is known, that this error is printed to syslog many times,
# and syslog accumulates these messages by printing the error
# once and stating how many times it was repeated, this
# (slightly uncontrollable) effect prevents, that heavy
# zapping triggers the restart too early (never for me),
# yet still the error was caught always in time for my
# recordings.
#
# by onnok-at-web-dot-de
#
#

LOG_FILE=/var/log/messages
MAX_COUNT=3
TIME_DELTA=300

START_DATE=$(date +%s)
PATTERN="ERROR: unknown picture type"
CT=0;T_1=$START_DATE;T_2=$START_DATE

while (true)
    do
        tail -n1 -F $LOG_FILE|grep -m1 "$PATTERN" &>/dev/null
        CT=$(($CT + 1))
        T_3=$T_2
        T_2=$T_1
        T_1=$(date +%s)
        if [ $CT -ge $MAX_COUNT ]
        then
            if [ $(($T_3 - $T_1)) -le $TIME_DELTA ]
            then
                killall -9 vdr
                #sleep 5
                #killall -q -9 vdr
                logger -t DVB-VDR-PICTURE_TYPE_ERROR "killed vdr t1:$T_1 t2:$T_2 t3:$T_3 ct:$CT"
                CT=0;T_1=$START_DATE;T_2=$START_DATE
            fi
        fi
    done

---------

Regards Onno




--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index