You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to loop a single video from sdcard. (Big Buck Bunny 1080p 60fps)
It runs several turns with my current setup and fails to start a new one, freezes on last frame of the video.
I have used SurfaceView, TextureView and SimpleExoPlayerView, result is same for all, loop breaks after some time.
I am not seeing any log cat logs from ExoPlayer, also onPlayerError is not called as well.
Note: After freeze on SimpleExoPlayerView, seeking a few seconds before the last frame results in passing to next turn successfully.
Edit: I am seeing those lines on Logcat whenever loop breaks:
09-05 16:42:46.285 216-338/? I/AudioFlinger: BUFFER TIMEOUT: remove(4096) from active list on thread 0xb372f008
09-05 16:42:48.742 216-338/? D/AudioHardwareTiny: close device
Reproduction steps
This is how I prepare player and run the loop:
private fun prepareExoPlayerFromFileUri(uri: Uri, mediaView: SurfaceView) {
val exoPlayer = ExoPlayerFactory.newSimpleInstance(DefaultRenderersFactory(this), DefaultTrackSelector(null as BandwidthMeter?), DefaultLoadControl())
exoPlayer.setVideoSurfaceView(mediaView)
val dataSpec = DataSpec(uri)
val fileDataSource = FileDataSource()
try {
fileDataSource.open(dataSpec)
} catch (e: FileDataSource.FileDataSourceException) {
e.printStackTrace()
}
val factory = DataSource.Factory { fileDataSource }
val mediaSource = ExtractorMediaSource(fileDataSource.uri, factory, DefaultExtractorsFactory(), null, null)
exoPlayer.prepare(mediaSource)
exoPlayer.repeatMode = Player.REPEAT_MODE_ONE
exoPlayer.playWhenReady = true
}
I can reproduce your problem on another device and it's also independent of the view you use.
The reason behind this is that the media file is broken because the audio track is slightly shorter than the video track. As a result the player switches to buffering in order to wait for audio that will never come. When playing this media on its own without looping, this is not a problem, because all streams just play out independently. However, for looping and concatenation the player expect both streams to end simultaneously to allow the next media file to start correctly.
The issue is actually known and already tracked in #1874. There is some work in progress to prevent this from happening (e.g. by introducing some silence while the video plays out the remaining frames).
Issue description
I am trying to loop a single video from sdcard. (Big Buck Bunny 1080p 60fps)
It runs several turns with my current setup and fails to start a new one, freezes on last frame of the video.
I have used SurfaceView, TextureView and SimpleExoPlayerView, result is same for all, loop breaks after some time.
I am not seeing any log cat logs from ExoPlayer, also
onPlayerError
is not called as well.Note: After freeze on SimpleExoPlayerView, seeking a few seconds before the last frame results in passing to next turn successfully.
Edit: I am seeing those lines on Logcat whenever loop breaks:
Reproduction steps
This is how I prepare player and run the loop:
Link to test content
Videos can be found here:
http://bbb3d.renderfarming.net/download.html
It is
Full HD (1920x1080)
under the sectionStandard 2D
Version of ExoPlayer being used
version 2.5.1
Device(s) and version(s) of Android being used
Asus Tinkerboard booted with Android Marshmallow
A full bug report captured from the device
Here is a bugreport using adb:
https://www.dropbox.com/s/rrk3hsrqmmz3pzy/exoplayer.debug.log.txt?dl=0
The text was updated successfully, but these errors were encountered: