kiall / android-tvheadend

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

Player crashing after switching to channel with multi-audio to single audio #166

Open stevellion opened 7 years ago

stevellion commented 7 years ago

If I am on a channel with 2 audio channels and select the 2nd channel.. Then switch to a channel with only 1. 1) No audio output (I guess still set to channel 2 and no stream) 2) When I try to select the audio channel it crashes.

On restart, must be on channel 1 and dialog says no multi-audio to pick (or something like that)

kiall commented 7 years ago

@stevellion I have some channels like this, and don't see the same issues? I'm wondering if what you're really seeing is issue #165 could you try v0.3.10 from the GitHub releases page and see if this persists? https://github.com/kiall/android-tvheadend/releases

stevellion commented 7 years ago

Looking at #165 I don't think it's that at all, it's definately only when I've selected a 2nd audio channel and then going to a single audio channel. but trying 3.10 now.

stevellion commented 7 years ago

Nope, 3.10 is the same. Although seems to take longer to continue playback after switching to the 2nd Audio channel. In fact, had to reselect channel for it to play. So, to confirm .. switch to 105 (C4 HD), switch to 2nd audio channel (English without commentary)., then switch to BBC1 SD. No Audio. Go to select audio channel and the player (tv guide) crashes. logcat.tvh.txt

kiall commented 7 years ago

Okay, looking at your logs, this is defiantly a bug on it's own, when you switched to the second channel, we didn't select any audio tracks (The [X} vs [ ] next to the track names indicates what we selected:

ie.macinnes.tvheadend.player.EventLogger: Tracks [
ie.macinnes.tvheadend.player.EventLogger:   Renderer:0 [
ie.macinnes.tvheadend.player.EventLogger:     Group:0, adaptive_supported=N/A [
ie.macinnes.tvheadend.player.EventLogger:       [X] Track:0, id=1, mimeType=video/mpeg2, containerMimeType=null, res=720x576, fps=25.0, supported=YES
ie.macinnes.tvheadend.player.EventLogger:     ]
ie.macinnes.tvheadend.player.EventLogger:   ]
ie.macinnes.tvheadend.player.EventLogger:   Renderer:2 [
ie.macinnes.tvheadend.player.EventLogger:     Group:0, adaptive_supported=N/A [
ie.macinnes.tvheadend.player.EventLogger:       [ ] Track:0, id=2, mimeType=audio/mpeg-L2, containerMimeType=null, channels=2, sample_rate=48000, language=eng, supported=YES
ie.macinnes.tvheadend.player.EventLogger:     ]
ie.macinnes.tvheadend.player.EventLogger:   ]
ie.macinnes.tvheadend.player.EventLogger:   Renderer:3 [
ie.macinnes.tvheadend.player.EventLogger:     Group:0, adaptive_supported=N/A [
ie.macinnes.tvheadend.player.EventLogger:       [ ] Track:0, id=5, mimeType=application/x-subrip, containerMimeType=null, language=eng, supported=YES
ie.macinnes.tvheadend.player.EventLogger:     ]
ie.macinnes.tvheadend.player.EventLogger:   ]
ie.macinnes.tvheadend.player.EventLogger: ]
kiall commented 7 years ago

Actually, trying to reproduce this, it looks like those logs are normal, and we get another set below after the audio track is selected (Either that, or I somehow fixed this without knowing!)

Could you check with v0.3.12 and see if issue is gone?

stevellion commented 7 years ago

Tried with 3.13 and still exactly the same.

kiall commented 7 years ago

Ah, damn :(

Okay... some more questions then:

1) Could you grab a fresh set of logs including more logs from after the channel change? It looks like that logfile was filtered to only show the EventLogger logs, and it stops right before where the logs from my devices would otherwise show them selecting the correct track

2) What device is this? it looks like a Sony from the logs, or at least something based on the MediaTek chipset, do you know if it's a 2015 / 2016 / 2017 model? what version of android is running on it?

3) What TV sources do you have? Satellite? What networks etc?

4) Is this the only Android TV device you have? If not, do you see the same issue on all of them?

5) If you do see the same issue on multiple devices, could I could temporary access to your TVHeadend server? (As it may be something unusual in the broadcasts you get - but this is about as unlikely as it gets ;))

stevellion commented 7 years ago

Sorry it took a while to get back to you on this. 1) new log attached. 2) Yes, Sony bravia 2016, KD-XD7505 : latest firmware PKG6.1004.0010EUA : Android 6.0.1 3) Sources.. this one, that's it.. and Kodi with TvHeadend.. and HDMI with MiBox and Headend. No satellite, not terrestrial. 4) Not installed on MiBox.. I could if you really need it. 5) sure, can setup access if needed. logcat.txt

stevellion commented 7 years ago

Just something else to add, but might be a feature request. On TVH PVR plugin on Kodi, I rarely have to change the audio channel, it just defaults to english and plays as normal (without audio descriptions)

kiall commented 7 years ago

In theory, we pass your system preference for audio language through to the selector. But I have a feeling it doesn't work as expected, and can be confused by the fact that many broadcasters use the same language setting for both audio streams.

I'll look into how we can try to avoid selecting this track by default..

stevellion commented 7 years ago

Tried it on my MiBox this morning ,also on 3.13. Doesn't crash, but behaviour is different. 1) Seems to remember the right audio channel from last time playing.. so less likely need to change. 2) When I switch to a single audio stream channel, the option to change audio stream is greyed out. (The Bravia crashes when I actually go into the Audio channel selection and I guess it crashes because the audio stream that it thinks it's changing from doesn't actually exist). PS - The channels I'm using (BBC HD) shows Unknown or English. Unknown being the audio descriptions stream.

stevellion commented 7 years ago

FYI - Bravia on-screen message from the last day or so, that Android 7.x is rolling out from 31/05/17 - Not sure what effect this will have.

stquinn commented 6 years ago

Hi,
I am seeing a slight variant of this. My version info is:

I will follow up with a log as soon as I can get organised with logcat and access to the device when a show is on that I know it will happen with.

Example of when it happens:

  1. Watching Channel 4 HD on Freesat (I have seen it happen on BBC HD channels as well)
  2. A show like Big Bang Theory which is in full HD with audio reported as 5.1
  3. The show goes to advert break or it ends...the player freezes
  4. The last frame of the show you were watching is left on screen
  5. It takes a restart to get it working again and If you do it quickly, you will see that the adverts have a different audio, something like stereo or 2.0

I know without a log this is not much value, but I said I would report it anyway just to highlight that it doesn't just need a channel change to crash the player.

xi784 commented 6 years ago

@stquinn its reported here #149 including sample