Mailing List Archive

Ticket #11018: Distortion of Recordings/LiveTV if EIT-Scan is processing on another capturecard
#11018: Distortion of Recordings/LiveTV if EIT-Scan is processing on another
capturecard
------------------------+----------------------------------
Reporter: Shinck@… | Type: Patch - Bug Fix
Status: new | Priority: minor
Milestone: unknown | Component: MythTV - General
Version: 0.25-fixes | Severity: medium
Keywords: EIT | Ticket locked: 0
------------------------+----------------------------------
After upgrading from MythTV 0.21 / Mythbuntu 08.10 to MythTV 0.24 /
Mythbuntu 10.04 I detected distortions and artefacts in video/audio in
recordings/LiveTV of my BT878/BTTV based DVB-S capturecard. After further
investigations I saw that this was caused by an active EIT-Scan on my
other DIBcom-3000mc based DVB-T card.
If both two cards are active I saw lots of this lines in backend-log:
{{{
E DVBRead mpeg/pespacket.cpp:79 (AddTSPacket) AddTSPacket: Out of
sync!!! Need to wait for next payloadStart PID: 0x12, continuity counter:
6 (expected 5).
}}}
So I decided to switch of EIT-Scanning of the DVB-T card and the
distortions were gone (But as DVB-T and DVB-S in my setup don't based on
the same Video-Source I lost EPG-Information of DVB-T and had to record or
look LiveTV on the DVB-T channels to update the information).
I don't know If this was caused by mythtv or the LinuxTV-v4l/DVB driver
framework but I hoped that updating to 0.25 makes things better.
As the problem wasn't gone with 0.25 I decided to write a patch that
switches of the EIT-Scanning at all capture-cards if a program records or
I look liveTV.
After the last record finishes the timer eitCrawlIdleStart is set again on
all cards.
With this attempt I also resolve another problem: I've setup my system to
shutdown(hibernate) if it's idle and ACPI-wakeup before new recordings,
but it never shutdown after a recording because a EIT-Scan on another card
than the recording-card was running after the recording.

So now I provide the patch. Perhaps it could be helpful for some other
people.

--
Ticket URL: <http://code.mythtv.org/trac/ticket/11018>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-commits
Re: Ticket #11018: Distortion of Recordings/LiveTV if EIT-Scan is processing on another capturecard [ In reply to ]
#11018: Distortion of Recordings/LiveTV if EIT-Scan is processing on another
capturecard
------------------------------+----------------------------
Reporter: Shinck@… | Owner:
Type: Patch - Bug Fix | Status: new
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: 0.25-fixes
Severity: medium | Resolution:
Keywords: EIT | Ticket locked: 0
------------------------------+----------------------------

Comment (by wagnerrp):

Are these all PCI devices? Is it possible you are simply putting too much
traffic on the bus, and starving your framegrabbers of bandwidth to their
frame buffers?

--
Ticket URL: <http://code.mythtv.org/trac/ticket/11018#comment:1>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-commits
Re: Ticket #11018: Distortion of Recordings/LiveTV if EIT-Scan is processing on another capturecard [ In reply to ]
#11018: Distortion of Recordings/LiveTV if EIT-Scan is processing on another
capturecard
------------------------------+----------------------------
Reporter: Shinck@… | Owner:
Type: Patch - Bug Fix | Status: new
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: 0.25-fixes
Severity: medium | Resolution:
Keywords: EIT | Ticket locked: 0
------------------------------+----------------------------

Comment (by Shinck@…):

I don't think so. I've 3 capture-cards. And all stays on different busses.
One Bt878-Bttv based DVB-S card on the PCI-Bus, It is for SD-Content only
and worked flawlessly at Mythbuntu/Ubuntu 08.10 with one USB1.1-DVB-T card
(Dibcom-3000mc-based) with an hardware PID filter (table count: 16).
The third an newest one (but the problem was also before) is an
SAA716x_TBS/TBS6928fe based DVB-S2 card on the PCI-express-bus for the
DVB-S HD-Content.

--
Ticket URL: <http://code.mythtv.org/trac/ticket/11018#comment:2>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-commits
Re: Ticket #11018: Distortion of Recordings/LiveTV if EIT-Scan is processing on another capturecard [ In reply to ]
#11018: Distortion of Recordings/LiveTV if EIT-Scan is processing on another
capturecard
------------------------------+----------------------------
Reporter: Shinck@… | Owner:
Type: Patch - Bug Fix | Status: new
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: 0.25-fixes
Severity: medium | Resolution:
Keywords: EIT | Ticket locked: 0
------------------------------+----------------------------

Comment (by Shinck@…):

Annotation: None of my cards is an analog framegrabber, all cards are
digital DVB-cards.

--
Ticket URL: <http://code.mythtv.org/trac/ticket/11018#comment:3>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-commits
Re: Ticket #11018: Distortion of Recordings/LiveTV if EIT-Scan is processing on another capturecard [ In reply to ]
#11018: Distortion of Recordings/LiveTV if EIT-Scan is processing on another
capturecard
------------------------------+----------------------------
Reporter: Shinck@… | Owner:
Type: Patch - Bug Fix | Status: new
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: 0.25-fixes
Severity: medium | Resolution:
Keywords: EIT | Ticket locked: 0
------------------------------+----------------------------

Comment (by Shinck@…):

Annotation2: And the distortion and discontinuities of video/audio are on
the DVB-S card which resides on the PCI bus not the USB1.1 device (it has
no problems).

--
Ticket URL: <http://code.mythtv.org/trac/ticket/11018#comment:4>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-commits
Re: Ticket #11018: Distortion of Recordings/LiveTV if EIT-Scan is processing on another capturecard [ In reply to ]
#11018: Distortion of Recordings/LiveTV if EIT-Scan is processing on another
capturecard
------------------------------+----------------------------
Reporter: Shinck@… | Owner:
Type: Patch - Bug Fix | Status: new
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: 0.25-fixes
Severity: medium | Resolution:
Keywords: EIT | Ticket locked: 0
------------------------------+----------------------------

Comment (by Shinck@…):

Recently I switched from fixes/0.25 to master. After some adaptions the
patch also works here fine. So I will attach it here.

--
Ticket URL: <http://code.mythtv.org/trac/ticket/11018#comment:5>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-commits
Re: Ticket #11018: Distortion of Recordings/LiveTV if EIT-Scan is processing on another capturecard [ In reply to ]
#11018: Distortion of Recordings/LiveTV if EIT-Scan is processing on another
capturecard
------------------------------+----------------------------
Reporter: Shinck@… | Owner:
Type: Patch - Bug Fix | Status: new
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: 0.25-fixes
Severity: medium | Resolution:
Keywords: EIT | Ticket locked: 0
------------------------------+----------------------------

Comment (by stuartm):

What level of logging are you using? Extremely verbose logging (i.e.non
standard levels) can have an effect on performance e.g. high disk I/O that
has been known to cause problems on some systems. During normal operation
the defaults for verbosity/level should be used and greater verbosity only
turned on when debugging an issue.

--
Ticket URL: <http://code.mythtv.org/trac/ticket/11018#comment:6>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-commits
Re: Ticket #11018: Distortion of Recordings/LiveTV if EIT-Scan is processing on another capturecard [ In reply to ]
#11018: Distortion of Recordings/LiveTV if EIT-Scan is processing on another
capturecard
------------------------------+----------------------------
Reporter: Shinck@… | Owner:
Type: Patch - Bug Fix | Status: new
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: 0.25-fixes
Severity: medium | Resolution:
Keywords: EIT | Ticket locked: 0
------------------------------+----------------------------

Comment (by Shinck@…):

At daily use I leave the Standard levels (verbose: general and LogLevel:
info). With these levels the distortions were existent. For debugging
purposes sometimes I change verbose to idle,eit,record,dvbcam but leave
LogLevel at info.

But since I've switched of EIT-Scanning during recording or LiveTV with
the patch the error is gone. So it works now for me.

--
Ticket URL: <http://code.mythtv.org/trac/ticket/11018#comment:7>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-commits
Re: Ticket #11018: Distortion of Recordings/LiveTV if EIT-Scan is processing on another capturecard [ In reply to ]
#11018: Distortion of Recordings/LiveTV if EIT-Scan is processing on another
capturecard
------------------------------+----------------------------
Reporter: Shinck@… | Owner: (none)
Type: Patch - Bug Fix | Status: new
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: 0.25-fixes
Severity: medium | Resolution:
Keywords: EIT | Ticket locked: 0
------------------------------+----------------------------

Comment (by Klaas de Waal):

This might be useful for low-end devices such as the RPI when used as a
backend. Let's keep this one open for now.

--
Ticket URL: <https://code.mythtv.org/trac/ticket/11018#comment:8>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #11018: Distortion of Recordings/LiveTV if EIT-Scan is processing on another capturecard [ In reply to ]
#11018: Distortion of Recordings/LiveTV if EIT-Scan is processing on another
capturecard
------------------------------+-------------------------------
Reporter: Shinck@… | Owner: Klaas de Waal
Type: Patch - Bug Fix | Status: assigned
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: 0.25-fixes
Severity: medium | Resolution:
Keywords: EIT | Ticket locked: 0
------------------------------+-------------------------------
Changes (by Stuart Auchterlonie):

* owner: (none) => Klaas de Waal
* status: new => assigned


--
Ticket URL: <https://code.mythtv.org/trac/ticket/11018#comment:9>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #11018: Distortion of Recordings/LiveTV if EIT-Scan is processing on another capturecard [ In reply to ]
#11018: Distortion of Recordings/LiveTV if EIT-Scan is processing on another
capturecard
------------------------------+-------------------------------
Reporter: Shinck@… | Owner: Klaas de Waal
Type: Patch - Bug Fix | Status: assigned
Priority: minor | Milestone: needs_triage
Component: MythTV - General | Version: 0.25-fixes
Severity: medium | Resolution:
Keywords: EIT | Ticket locked: 0
------------------------------+-------------------------------
Changes (by Stuart Auchterlonie):

* milestone: unknown => needs_triage


--
Ticket URL: <https://code.mythtv.org/trac/ticket/11018#comment:10>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #11018: Distortion of Recordings/LiveTV if EIT-Scan is processing on another capturecard [ In reply to ]
#11018: Distortion of Recordings/LiveTV if EIT-Scan is processing on another
capturecard
------------------------------+-------------------------------
Reporter: Shinck@… | Owner: Klaas de Waal
Type: Patch - Bug Fix | Status: assigned
Priority: minor | Milestone: needs_triage
Component: MythTV - General | Version: 0.25-fixes
Severity: medium | Resolution:
Keywords: EIT | Ticket locked: 0
------------------------------+-------------------------------

Comment (by Klaas de Waal):

This can be a useful feature if the backend is very low power, e.g. a
RPi3B, and there is more than one video source used with EIT for the guide
data.

The implementation is updated to make it compile against today's master.

It works largely as documented:
- No recording and no Live TV then active EIT scan is running on all
inputs
- When recording there is passive EIT on that input; the active scan on
the other inputs is paused
- When the recording is stopped then the active EIT on all inputs is
restored
- With Live TV there is no EIT collection at all. The expected behavior is
that there is passive EIT from the input used for Live TV, so this is not
yet perfect.
- When Live TV is stopped then the active EIT on all inputs is restored.
Patch is attached.

--
Ticket URL: <https://code.mythtv.org/trac/ticket/11018#comment:11>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #11018: Distortion of Recordings/LiveTV if EIT-Scan is processing on another capturecard [ In reply to ]
#11018: Distortion of Recordings/LiveTV if EIT-Scan is processing on another
capturecard
------------------------------+-------------------------------
Reporter: Shinck@… | Owner: Klaas de Waal
Type: Patch - Bug Fix | Status: assigned
Priority: minor | Milestone: needs_triage
Component: MythTV - General | Version: 0.25-fixes
Severity: medium | Resolution:
Keywords: EIT | Ticket locked: 0
------------------------------+-------------------------------
Changes (by Klaas de Waal):

* Attachment "20201230-trac11018.patch" added.

Active EIT scan only when backend is idle, updated to compile against
master of 20201230

--
Ticket URL: <https://code.mythtv.org/trac/ticket/11018>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #11018: Distortion of Recordings/LiveTV if EIT-Scan is processing on another capturecard [ In reply to ]
#11018: Distortion of Recordings/LiveTV if EIT-Scan is processing on another
capturecard
------------------------------+-------------------------------
Reporter: Shinck@… | Owner: Klaas de Waal
Type: Patch - Bug Fix | Status: assigned
Priority: minor | Milestone: needs_triage
Component: MythTV - General | Version: 0.25-fixes
Severity: medium | Resolution:
Keywords: EIT | Ticket locked: 0
------------------------------+-------------------------------

Comment (by Stuart Auchterlonie):

As LiveTV is a recording, i'd expect passive EIT collection behaviour

--
Ticket URL: <https://code.mythtv.org/trac/ticket/11018#comment:12>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #11018: Distortion of Recordings/LiveTV if EIT-Scan is processing on another capturecard [ In reply to ]
#11018: Distortion of Recordings/LiveTV if EIT-Scan is processing on another
capturecard
------------------------------+-------------------------------
Reporter: Shinck@… | Owner: Klaas de Waal
Type: Patch - Bug Fix | Status: assigned
Priority: minor | Milestone: needs_triage
Component: MythTV - General | Version: 0.25-fixes
Severity: medium | Resolution:
Keywords: EIT | Ticket locked: 0
------------------------------+-------------------------------

Comment (by Klaas de Waal):

Figured out why LiveTV does not collect EIT as described in comment 11. It
has nothing to do with the code in this ticket.

The reason is that EIT is only collected on the real capture card.

The real capturecard is the entry with parentid=0 in table capturecard.
All entries with parentid!=0 are multirec instances and use the capture
card identified by the parentid.

To select the input for LiveTV all available inputs are sorted on LiveTV
priority.
All available inputs includes both the real and the multirec instances.
So it is possible that the LiveTV is started on a multirec instance in
which case there is no EIT collected.

There is definitely room for improvement here; it would be great if there
is passive EIT collection on any input.

--
Ticket URL: <https://code.mythtv.org/trac/ticket/11018#comment:13>
MythTV <http://www.mythtv.org>
MythTV Media Center