kiall / android-tvheadend

Android + TV Headend + TV Input Framework
Apache License 2.0
191 stars 61 forks source link

Playback interrupted approx. every 30 minutes #212

Closed sphr2k closed 6 years ago

sphr2k commented 6 years ago

Hi,

since I don't watch TV that often, I can't really say if this happens on all channels or not. Approximately every 30 minutes or so playback will be interrupted and the spinning wheel will appear for 1/2 second up to 1 minute. This has happened e.g. on "Das Erste" (H.264) as well as on "Eurosport 1" (in SD/MPEG2 on my network). Not sure if it happens on other channels as well since I don't watch TV that often.

Happened on 27-07 around 19:31, so I pulled the logs from that time: shield-logcat2.txt

kiall commented 6 years ago

It looks from the logs like your stream is damaged - e.g. lots of messages like this:

07-27 19:31:25.390  1520 16061 E AudioTrack: Discontinuity detected [expected 6740928000, got 6745440000]
07-27 19:31:25.410  1520  1520 D ie.macinnes.tvheadend.player.EventLogger: droppedFrames [6690.92, 50]
07-27 19:31:25.441  1520  1520 D ie.macinnes.tvheadend.tvinput.LiveSession: Session onPlayerStateChanged: 2 (2)
07-27 19:31:25.441  1520  1520 D ie.macinnes.tvheadend.player.EventLogger: state [6690.94, true, B]
07-27 19:31:25.441  1520  1520 D ie.macinnes.tvheadend.player.EventLogger: droppedFrames [6690.95, 19]

"Discontinuity detected" often means a badly encoded stream, where the timestamps are not in in the correct order - in this case there was a huge gap - 6740928000 to 6745440000.

The two "droppedFrames" log entries I pasted above shows 50, and then 19 frames being skipped - which is more than enough to cause issues!

Looking at the "Queue Status" logs:

07-27 19:31:19.025  1520 16106 I Subscriber: Queue Status: S: 46 P: 1 B: 1243 E: 27 D: 0 bD: 0 pD: 0 iD: 0
07-27 19:31:29.026  1520 16106 I Subscriber: Queue Status: S: 46 P: 1 B: 1243 E: 28 D: 0 bD: 0 pD: 0 iD: 0
07-27 19:31:49.025  1520 16106 I Subscriber: Queue Status: S: 46 P: 1 B: 9554 E: 30 D: 0 bD: 0 pD: 0 iD: 0
07-27 19:31:59.026  1520 16106 I Subscriber: Queue Status: S: 46 P: 1 B: 8082 E: 31 D: 0 bD: 0 pD: 0 iD: 0

the number after E: is the number of errors TVH has found in the stream, depending on the severity of the error, they will easily cause a break in playback.

I'd check your signal levels/cables/dish orientation - even if other players can handle these errors smoothly, it's entirely possible the built in shield media decoders can't.

sphr2k commented 6 years ago

Hi Kiall, thanks for your hint, I’ll keep looking!