google / ExoPlayer

This project is deprecated and stale. The latest ExoPlayer code is available in https://github.com/androidx/media
https://developer.android.com/media/media3/exoplayer
Apache License 2.0
21.69k stars 6.01k forks source link

Video freezes when exoplayer encounter the “Audio discontinuity” issue #5693

Open kaemanspk opened 5 years ago

kaemanspk commented 5 years ago

Issue description

We are playing UDP (TS) stream from the head end. Video freezes (sometime after Freeze it continues to play) when exoplayer encounters the “Audio discontinuity detected” issue. Also noticed while Audio format (audio channel 6 to 2) change happens in the stream same behavior happens Video freezes sometime continue to play after some time. This behavior happens in Amlogic 905X2 chipset and Android P (PIE) devices. We were tested multiple Google certified vendor boxes The Same stream tested on other Amlogic 905x (not X2) chipset and Android M (Marshmallow) and Android N (Nougat) versions. But in those devices there is a slight pixilation and continues to playm But Amlogic 905X2 and Android P devices video freezes.

Reproduction steps

Stream sent to dev.exoplayer@gmail.com id AudioFormatChangeIssue.ts (2minutes 40 to 50 seconds issue will occur) AudioDiscontinuityIssue.ts (2minutes 40 to 50 seconds issue will occur)

A full bug report captured from the device

Bug report sent to dev.exoplayer@gmail.com id

Version of ExoPlayer being used

Exoplayer 2.9.4

Device(s) and version(s) of Android being used

Google certified Amlogic 905X2 chipset and Android P device

kaemanspk commented 5 years ago

Marcbaechinger any further insight on this issue. we are awaiting an update from you eagerly.

kaemanspk commented 5 years ago

Hello team, any update on this?

kaemanspk commented 5 years ago

Team please give us some insight on this issue? If it could be some direction or result.

umeshongithub commented 5 years ago

Even I am facing this issue. Please share if there is any update on this.

AquilesCanta commented 5 years ago

Sorry, went under the radar. I'll look into it,

AquilesCanta commented 5 years ago

A few questions:

kaemanspk commented 5 years ago

Apologies for a somewhat delayed response.

• What is the expected behavior? We are playing Satellite TV Broadcast channels HD and SD such as CNN, Fox News, ESPN and so on some 100 channels. We are trying to use Android EXO Player on an Android STB to achieve this. We also have a non Android STB which has giving perfectly satisfactory results. We want the EXO Player to provide similar results. The Satellite streams are fine most of the time but being satellite streams could have some small problem once in a while. With the non Android STB what happens is (and that is the same desired behavior we want), there may be some small pixelization or some small disruption but as soon the stream recovers, TV will start playing again. To give an extreme example, the stream may completely stop (due to satellite disturbance) for a few seconds or a few minutes or may be even longer. This is not under our control. In the non Android STB, the Video will freeze and stay frozen. As soon as the proper stream resumes, the channel will start playing again perfectly. That is the desired behavior. What the EXO Player does is it seems to flag the following kind of issues and stops playing and may or may not restart on its own. Audio discontinuity issue Audio format change Audio under run Dropped frames

• On which devices do the streams play as expected? On non Android STB available in the market. We are not mentioning the brands here because this is an open forum. • When I play the streams with other players (like VLC) I see log lines indicating corruption (and the frames are dropped). How do we know the media is not just corrupted? As explained above because these are satellite streams there may be slight corruption in the stream and the stream will typically recover in a few milli seconds or seconds, so the EXOplayer should play whatever it gets even if it is garbled for a few seconds. • Is there any evidence suggesting this is an Exoplayer issue? We have explained the issue above. We could say it is an EXOPlayer issue for these kinds of streams. EXOplayer may be doing too much and this may be the problem

ghost commented 5 years ago

Hello, any updates on this issue ? I have the same problem.

kaemanspk commented 5 years ago

Hello Team Any further update

ojw28 commented 4 years ago

@AquilesCanta - What is the status of this issue? Is it correct that it's marked as a bug?

AquilesCanta commented 4 years ago

I'll try to summarize, please correct me if i'm wrong: Expected behavior: Stream plays (possibly with slight pixelation due to stream errors). Observed behavior: Playback stops and does not resume.

Tested on Amlogic 905X2.

I'm playing AudioDiscontinuityIssue.ts on a Pixel3a running Q (exoplayer dev branch), and the behavior seems to me as the one you are expecting. There is a slight pixelation, but playback continue and resumes normally after < 2 seconds of visual artifacts.

Is the issue you are observing specific to Amlogic 905X2? Have you tried a different device?

kaemanspk commented 4 years ago

Yes right, specific to Amlogic 905X2 devices. tried in Amlogic 905x and Amlogic 805x devices and normally played after < 2 seconds of visual artifacts

laurafuente commented 4 years ago

We could reproduce a similar freeze behaviour for the Amlogic 905X2 chipset with a live channel. In our case the video got freezed for several minutes and after that the exoplayer demo died. We could reproduce this error using exoplayer demo app 2.10.4 and exoplayer demo app 2.11.1. What we had observed was that there was a class SampleQueue tha was increasing its memory all the time and that it appeared a lot of instances of SampleQueue$AllocationNodes. We also know that exoplayer is working on android MediaCodec layer, and in this layer we didn't find the player injected DRM data when the issue happened. At the point we reproduced this problem we saw that the player was at READY state but the rendered frames were not being increased. We can't pass a video that reproduces the problem because we are not able to reproduce it anymore. It could be a good idea if we can get the video that was making the freeze mentioned at this issue to see if we can reproduce the problem again.

I have attached an image with a memory dump at the moment of the freeze Screenshot from 2020-01-22 11-28-28(1)