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.74k stars 6.03k forks source link

Audio/Video is not sync if Audio codec is EAC-3 on TCL Parcee Android TV with Amazon Fire Stick #6213

Closed GouravSna closed 5 years ago

GouravSna commented 5 years ago

[REQUIRED] Content description

The content where Audio codec is EAC-3 then on that in the following steps content is not playing properly on Android TV with Fire Stick.

Note: If we directly play the same content with EAC-3 audio tracks, it works fine. Issue is only with Fire Stick.

Steps:

  1. Play the content.
  2. Pause the content when there is audio.
  3. Observe that the video frame is paused but the audio keeps playing for next few (~ 5 secs)
  4. Play the content again; video frame will be skipped to the exact frame where audio was stopped after pause.

[REQUIRED] Link to test content

Please let us know, we will share the content URL over the email.

[REQUIRED] Version of ExoPlayer being used

Tested on Dev-V2 (https://github.com/google/ExoPlayer/tree/dev-v2)

[REQUIRED] Device(s) and version(s) of Android being used

TCL Android TV with FireStick Android OS: 5.1.1 FireStick S/W version: Fire OS 5.2.7.0 (639566220)

[REQUIRED] A full bug report captured from the device

Logcat ```07-23 11:31:44.886 6779-6794/com.google.android.exoplayer2.demo I/Kernel: [ 214.240435].(2)[6794:GCDaemon]name:Log.main_188 unmap vm_start 9dbf4000 end: 9dc05000 07-23 11:31:44.886 6779-6794/com.google.android.exoplayer2.demo I/Kernel: [ 214.240515].(2)[6794:GCDaemon]name:Log.main_187 unmap vm_start 9dbd2000 end: 9dbe3000 07-23 11:31:44.904 6779-6779/com.google.android.exoplayer2.demo I/ExoPlayerImpl: Init 384e3a90 [ExoPlayerLib/2.10.3] [tank, AFTT, Amazon, 22] 07-23 11:31:44.910 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: state [0.00, 0.00, window=0, true, BUFFERING] 07-23 11:31:44.976 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: surfaceSizeChanged [0.07, 0.00, window=0, 1920, 1080] 07-23 11:31:45.017 6779-6803/com.google.android.exoplayer2.demo D/OpenGLRenderer: endAllStagingAnimators on 0xb818eca8 (ExpandableListView) with handle 0xb84ee748 07-23 11:31:45.516 6779-6794/com.google.android.exoplayer2.demo I/Kernel: [ 214.873088].(2)[6794:GCDaemon]name:Log.amazon_main_141 unmap vm_start a0ebf000 end: a0ed0000 07-23 11:31:45.588 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: timelineChanged [0.68, 0.00, window=0, periodCount=1, windowCount=1, reason=PREPARED 07-23 11:31:45.589 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: period [9106.77] 07-23 11:31:45.589 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: window [9106.77, true, false] 07-23 11:31:45.589 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: ] 07-23 11:31:45.591 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: mediaPeriodCreated [0.68, 0.00, window=0, period=0] 07-23 11:31:45.601 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: loading [0.69, 0.00, window=0, period=0, true] 07-23 11:31:46.086 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: decoderEnabled [1.18, 0.00, window=0, period=0, video] 07-23 11:31:46.087 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: decoderEnabled [1.18, 0.00, window=0, period=0, audio] 07-23 11:31:46.088 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: tracksChanged [1.18, 0.00, window=0, period=0, 07-23 11:31:46.088 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: Renderer:0 [ 07-23 11:31:46.088 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: Group:0, adaptive_supported=YES [ 07-23 11:31:46.088 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: [X] Track:0, id=0, mimeType=video/avc, bitrate=444549, codecs=avc1.42c01e, res=480x272, supported=YES 07-23 11:31:46.088 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: [X] Track:1, id=1, mimeType=video/avc, bitrate=585406, codecs=avc1.42c01e, res=640x360, supported=YES 07-23 11:31:46.088 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: [X] Track:2, id=2, mimeType=video/avc, bitrate=778284, codecs=avc1.42c01e, res=640x360, supported=YES 07-23 11:31:46.088 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: ] 07-23 11:31:46.088 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: Metadata [ 07-23 11:31:46.088 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: HlsTrackMetadataEntry 07-23 11:31:46.088 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: ] 07-23 11:31:46.088 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: ] 07-23 11:31:46.089 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: Renderer:1 [ 07-23 11:31:46.089 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: Group:0, adaptive_supported=YES_NOT_SEAMLESS [ 07-23 11:31:46.089 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: [X] Track:0, id=audio2:default, mimeType=audio/eac3, codecs=ec-3, channels=6, sample_rate=48000, label=default, supported=YES 07-23 11:31:46.089 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: [ ] Track:1, id=audio0:default, mimeType=audio/mp4a-latm, codecs=mp4a.40.2, channels=2, sample_rate=48000, label=default, supported=YES 07-23 11:31:46.089 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: ] 07-23 11:31:46.089 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: Metadata [ 07-23 11:31:46.089 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: HlsTrackMetadataEntry [audio2, default] 07-23 11:31:46.089 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: ] 07-23 11:31:46.089 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: ] 07-23 11:31:46.089 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: Renderer:2 [ 07-23 11:31:46.089 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: Group:0, adaptive_supported=N/A [ 07-23 11:31:46.089 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: [ ] Track:0, id=1/8219, mimeType=application/cea-608, supported=YES 07-23 11:31:46.089 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: ] 07-23 11:31:46.089 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: ] 07-23 11:31:46.089 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: Renderer:3 [ 07-23 11:31:46.089 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: Group:0, adaptive_supported=N/A [ 07-23 11:31:46.089 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: [X] Track:0, id=1/21, mimeType=application/id3, supported=YES 07-23 11:31:46.089 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: ] 07-23 11:31:46.090 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: Group:1, adaptive_supported=N/A [ 07-23 11:31:46.090 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: [ ] Track:0, id=1/21, mimeType=application/id3, supported=YES 07-23 11:31:46.090 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: ] 07-23 11:31:46.090 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: ] 07-23 11:31:46.090 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: ] 07-23 11:31:46.103 6779-6910/com.google.android.exoplayer2.demo D/MediaCodec: [SVP] MediaCodec::Init=AMessage(what = 'init', target = 9) = { string name = "OMX.google.raw.decoder" int32_t nameIsType = 0 } 07-23 11:31:46.103 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: mediaPeriodReadingStarted [1.20, 0.00, window=0, period=0] 07-23 11:31:46.103 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: downstreamFormatChanged [1.20, 0.00, window=0, period=0, id=audio2:default, mimeType=audio/eac3, codecs=ec-3, channels=6, label=default] 07-23 11:31:46.108 6779-6927/com.google.android.exoplayer2.demo I/OMXClient: Using client-side OMX mux. 07-23 11:31:46.110 6779-6927/com.google.android.exoplayer2.demo D/ACodec: [SVP] msg=AMessage(what = 'allo', target = 8) = { string componentName = "OMX.google.raw.decoder" } 07-23 11:31:46.111 6779-6927/com.google.android.exoplayer2.demo D/MtkOmxCore: Core_Init called 07-23 11:31:46.111 6779-6927/com.google.android.exoplayer2.demo D/MtkOmxCore: Core_Init gInstancePoolLock init 07-23 11:31:46.112 6779-6927/com.google.android.exoplayer2.demo D/MtkOmxCore: +MTK_OMX_Init tick=1563861706112 07-23 11:31:46.112 6779-6927/com.google.android.exoplayer2.demo D/MtkOmxCore: +ParseMtkCoreConfig 07-23 11:31:46.112 6779-6927/com.google.android.exoplayer2.demo D/MtkOmxCore: ParseMtkCoreConfig: gCoreComponentCounts = 23 07-23 11:31:46.112 6779-6927/com.google.android.exoplayer2.demo D/MtkOmxCore: -ParseMtkCoreConfig 07-23 11:31:46.112 6779-6927/com.google.android.exoplayer2.demo D/MtkOmxCore: Mtk_OMX_Init gCoreComponents 0xb85e53e8 07-23 11:31:46.112 6779-6927/com.google.android.exoplayer2.demo D/MtkOmxCore: +++++ dump_core_comp_table +++++ 07-23 11:31:46.112 6779-6927/com.google.android.exoplayer2.demo D/MtkOmxCore: name(OMX.MTK.VIDEO.DECODER.H263), role(video_decoder.h263), path(libMtkOmxVdec.so) 07-23 11:31:46.112 6779-6927/com.google.android.exoplayer2.demo D/MtkOmxCore: name(OMX.MTK.VIDEO.DECODER.MPEG2), role(video_decoder.mpeg2), path(libMtkOmxVdec.so) 07-23 11:31:46.112 6779-6927/com.google.android.exoplayer2.demo D/MtkOmxCore: name(OMX.MTK.VIDEO.DECODER.MPEG4), role(video_decoder.mpeg4), path(libMtkOmxVdec.so) 07-23 11:31:46.112 6779-6927/com.google.android.exoplayer2.demo D/MtkOmxCore: name(OMX.MTK.VIDEO.DECODER.AVC), role(video_decoder.avc), path(libMtkOmxVdec.so) 07-23 11:31:46.112 6779-6927/com.google.android.exoplayer2.demo D/MtkOmxCore: name(OMX.MTK.VIDEO.DECODER.VPX), role(video_decoder.vpx), path(libMtkOmxVdec.so) 07-23 11:31:46.112 6779-6927/com.google.android.exoplayer2.demo D/MtkOmxCore: name(OMX.MTK.VIDEO.DECODER.AVC.secure), role(video_decoder.avc), path(libMtkOmxVdec.so) 07-23 11:31:46.112 6779-6927/com.google.android.exoplayer2.demo D/MtkOmxCore: name(OMX.MTK.VIDEO.ENCODER.AVC), role(video_encoder.avc), path(libMtkOmxVenc.so) 07-23 11:31:46.112 6779-6927/com.google.android.exoplayer2.demo D/MtkOmxCore: name(OMX.MTK.VIDEO.DECODER.HEVC.secure), role(video_decoder.hevc), path(libMtkOmxVdec.so) 07-23 11:31:46.112 6779-6927/com.google.android.exoplayer2.demo D/MtkOmxCore: name(OMX.MTK.VIDEO.DECODER.HEVC), role(video_decoder.hevc), path(libMtkOmxVdec.so) 07-23 11:31:46.112 6779-6927/com.google.android.exoplayer2.demo D/MtkOmxCore: name(OMX.MTK.VIDEO.ENCODER.H263), role(video_encoder.h263), path(libMtkOmxVenc.so) 07-23 11:31:46.112 6779-6927/com.google.android.exoplayer2.demo D/MtkOmxCore: name(AIV.play), role(AIV.play.101), path(libMtkOmxAIVPlayer.so) 07-23 11:31:46.112 6779-6927/com.google.android.exoplayer2.demo D/MtkOmxCore: name(AIV.play.avcddp), role(play.avcddp), path(libMtkOmxAIVPlayer.so) 07-23 11:31:46.112 6779-6927/com.google.android.exoplayer2.demo D/MtkOmxCore: name(AIV.play.generic), role(AIV.play.role.generic), path(libMtkOmxAIVPlayer.so) 07-23 11:31:46.112 6779-6927/com.google.android.exoplayer2.demo D/MtkOmxCore: name(OMX.MTK.AUDIO.DECODER.MP3), role(audio_decoder.mp3), path(libMtkOmxMp3Dec.so) 07-23 11:31:46.112 6779-6927/com.google.android.exoplayer2.demo D/MtkOmxCore: name(OMX.MTK.AUDIO.DECODER.AAC), role(audio_decoder.aac), path(libMtkOmxAacDec.so) 07-23 11:31:46.112 6779-6927/com.google.android.exoplayer2.demo D/MtkOmxCore: name(OMX.MTK.AUDIO.DECODER.G711), role(audio_decoder.g711), path(libMtkOmxG711Dec.so) 07-23 11:31:46.112 6779-6927/com.google.android.exoplayer2.demo D/MtkOmxCore: name(OMX.MTK.AUDIO.DECODER.RAW), role(audio_decoder.raw), path(libMtkOmxRawDec.so) 07-23 11:31:46.112 6779-6927/com.google.android.exoplayer2.demo D/MtkOmxCore: name(OMX.MTK.AUDIO.DECODER.AMR.NB), role(audio_decoder.amrnb), path(libMtkOmxAMRNBDec.so) 07-23 11:31:46.112 6779-6927/com.google.android.exoplayer2.demo D/MtkOmxCore: name(OMX.MTK.AUDIO.DECODER.AMR.WB), role(audio_decoder.amrwb), path(libMtkOmxAMRWBDec.so) 07-23 11:31:46.112 6779-6927/com.google.android.exoplayer2.demo D/MtkOmxCore: name(OMX.MTK.AUDIO.ENCODER.AMR), role(audio_encoder.amrnb), path(libMtkOmxAmrEnc.so) 07-23 11:31:46.112 6779-6927/com.google.android.exoplayer2.demo D/MtkOmxCore: name(OMX.MTK.AUDIO.ENCODER.AWB), role(audio_encoder.amrwb), path(libMtkOmxAwbEnc.so) 07-23 11:31:46.112 6779-6927/com.google.android.exoplayer2.demo D/MtkOmxCore: name(OMX.MTK.AUDIO.ENCODER.AAC), role(audio_encoder.aac), path(libMtkOmxAacEnc.so) 07-23 11:31:46.112 6779-6927/com.google.android.exoplayer2.demo D/MtkOmxCore: name(OMX.MTK.AUDIO.DECODER.VORBIS), role(audio_decoder.vorbis), path(libMtkOmxVorbisDec.so) 07-23 11:31:46.112 6779-6927/com.google.android.exoplayer2.demo D/MtkOmxCore: ----- dump_core_comp_table ----- 07-23 11:31:46.112 6779-6927/com.google.android.exoplayer2.demo D/MtkOmxCore: -MTK_OMX_Init tick=1563861706112 07-23 11:31:46.122 6779-6927/com.google.android.exoplayer2.demo I/MediaCodecLogger: [ASAP] SW.audio.raw P2 + 215454 07-23 11:31:46.123 6779-6927/com.google.android.exoplayer2.demo D/MediaCodecLogger: Got m Service!!! 07-23 11:31:46.124 6779-6927/com.google.android.exoplayer2.demo D/ACodec: sendFormatChange 0 07-23 11:31:46.124 6779-6927/com.google.android.exoplayer2.demo D/ACodec: sendFormatChange 0 07-23 11:31:46.128 6779-6927/com.google.android.exoplayer2.demo I/MediaCodecLogger: [ASAP] SW.audio.raw P2 - 215459 07-23 11:31:46.128 6779-6910/com.google.android.exoplayer2.demo I/MediaCodecLogger: [ASAP] SW.audio.raw P3 + 215460 07-23 11:31:46.129 6779-6927/com.google.android.exoplayer2.demo I/MediaCodecLogger: [ASAP] SW.audio.raw P3 - 215460 07-23 11:31:46.130 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: decoderInitialized [1.22, 0.00, window=0, period=0, audio, OMX.google.raw.decoder] 07-23 11:31:46.131 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: decoderInputFormatChanged [1.22, 0.00, window=0, period=0, audio, id=audio2:default, mimeType=audio/eac3, codecs=ec-3, channels=6, sample_rate=48000, label=default] 07-23 11:31:46.455 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: downstreamFormatChanged [1.55, 0.00, window=0, period=0, id=2, mimeType=null, bitrate=778284, codecs=avc1.42c01e,ec-3, res=640x360, fps=25.0] 07-23 11:31:46.539 6779-6910/com.google.android.exoplayer2.demo D/MediaCodec: [SVP] MediaCodec::Init=AMessage(what = 'init', target = 13) = { string name = "OMX.MTK.VIDEO.DECODER.AVC" int32_t nameIsType = 0 } 07-23 11:31:46.540 6779-6936/com.google.android.exoplayer2.demo I/OMXClient: Using client-side OMX mux. 07-23 11:31:46.541 6779-6936/com.google.android.exoplayer2.demo D/ACodec: [SVP] msg=AMessage(what = 'allo', target = 12) = { string componentName = "OMX.MTK.VIDEO.DECODER.AVC" } 07-23 11:31:46.563 6779-6935/com.google.android.exoplayer2.demo I/MediaCodecLogger: [ASAP] HW.video.avc P2 + 215895 07-23 11:31:46.565 6779-6935/com.google.android.exoplayer2.demo D/MediaCodecLogger: Got m Service!!! 07-23 11:31:46.572 6779-6936/com.google.android.exoplayer2.demo D/ACodec: sendFormatChange 1 07-23 11:31:46.573 6779-6936/com.google.android.exoplayer2.demo D/ACodec: sendFormatChange 1 07-23 11:31:46.574 6779-6935/com.google.android.exoplayer2.demo I/MediaCodecLogger: [ASAP] HW.video.avc P2 - 215906 07-23 11:31:46.574 6779-6910/com.google.android.exoplayer2.demo I/MediaCodecLogger: [ASAP] HW.video.avc P3 + 215906 07-23 11:31:46.574 6779-6910/com.google.android.exoplayer2.demo D/MediaCodec: start : turning on cabl 07-23 11:31:46.574 6779-6910/com.google.android.exoplayer2.demo I/MediaCodec: setContextAdaptiveBacklight 07-23 11:31:46.574 6779-6910/com.google.android.exoplayer2.demo E/MediaCodec: setContextAdaptiveBacklight: Could not open file to turn on/off CABL err = No such file or directory 07-23 11:31:46.574 6779-6910/com.google.android.exoplayer2.demo I/MediaCodec: setContextAdaptiveBacklight: Best effort to turn context adaptive backlight ON 07-23 11:31:46.588 6779-6936/com.google.android.exoplayer2.demo D/ACodec: native_window_set_buffers_geometry W(640), H(360), Stride(640), SliceH(384) 07-23 11:31:46.589 6779-6936/com.google.android.exoplayer2.demo W/ACodec: [OMX.MTK.VIDEO.DECODER.AVC] setting nBufferCountActual to 7 failed: -2147483648 07-23 11:31:46.593 6779-6935/com.google.android.exoplayer2.demo I/MediaCodecLogger: [ASAP] HW.video.avc P3 - 215925 07-23 11:31:46.594 6779-6936/com.google.android.exoplayer2.demo D/ACodec: submitOutputMetaBuffers send FTB for ouptut 07-23 11:31:46.601 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: decoderInitialized [1.69, 0.00, window=0, period=0, video, OMX.MTK.VIDEO.DECODER.AVC] 07-23 11:31:46.602 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: decoderInputFormatChanged [1.69, 0.00, window=0, period=0, video, id=2, mimeType=video/avc, bitrate=778284, codecs=avc1.42C01E, res=640x360, fps=25.0] 07-23 11:31:46.644 6779-6936/com.google.android.exoplayer2.demo D/ACodec: native_window_set_buffers_geometry W(640), H(360), Stride(640), SliceH(384) 07-23 11:31:46.646 6779-6936/com.google.android.exoplayer2.demo W/ACodec: [OMX.MTK.VIDEO.DECODER.AVC] setting nBufferCountActual to 8 failed: -2147483648 07-23 11:31:46.659 6779-6936/com.google.android.exoplayer2.demo D/ACodec: submitOutputMetaBuffers send FTB for ouptut 07-23 11:31:46.664 6779-6936/com.google.android.exoplayer2.demo D/ACodec: sendFormatChange 1 07-23 11:31:46.668 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: videoSizeChanged [1.76, 0.00, window=0, period=0, 640, 360] 07-23 11:31:46.682 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: renderedFirstFrame [1.77, 0.00, window=0, period=0, Surface(name=null)/@0x650fa54] 07-23 11:31:49.559 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekStarted [4.65, 0.00, window=0, period=0] 07-23 11:31:49.561 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: positionDiscontinuity [4.65, 15.00, window=0, period=0, SEEK] 07-23 11:31:49.566 6779-6936/com.google.android.exoplayer2.demo D/ACodec: submitOutputMetaBuffers send FTB for ouptut 07-23 11:31:49.572 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekProcessed [4.66, 15.00, window=0, period=0] 07-23 11:31:50.051 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekStarted [5.14, 15.00, window=0, period=0] 07-23 11:31:50.052 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: positionDiscontinuity [5.14, 30.00, window=0, period=0, SEEK] 07-23 11:31:50.058 6779-6936/com.google.android.exoplayer2.demo D/ACodec: submitOutputMetaBuffers send FTB for ouptut 07-23 11:31:50.072 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekProcessed [5.16, 30.00, window=0, period=0] 07-23 11:31:50.102 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekStarted [5.19, 30.00, window=0, period=0] 07-23 11:31:50.102 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: positionDiscontinuity [5.20, 45.00, window=0, period=0, SEEK] 07-23 11:31:50.105 6779-6936/com.google.android.exoplayer2.demo D/ACodec: submitOutputMetaBuffers send FTB for ouptut 07-23 11:31:50.122 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekProcessed [5.21, 45.00, window=0, period=0] 07-23 11:31:50.153 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekStarted [5.24, 45.00, window=0, period=0] 07-23 11:31:50.153 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: positionDiscontinuity [5.25, 60.00, window=0, period=0, SEEK] 07-23 11:31:50.156 6779-6936/com.google.android.exoplayer2.demo D/ACodec: submitOutputMetaBuffers send FTB for ouptut 07-23 11:31:50.171 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekProcessed [5.26, 60.00, window=0, period=0] 07-23 11:31:50.203 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekStarted [5.30, 60.00, window=0, period=0] 07-23 11:31:50.204 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: positionDiscontinuity [5.30, 75.00, window=0, period=0, SEEK] 07-23 11:31:50.207 6779-6936/com.google.android.exoplayer2.demo D/ACodec: submitOutputMetaBuffers send FTB for ouptut 07-23 11:31:50.222 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekProcessed [5.31, 75.00, window=0, period=0] 07-23 11:31:50.254 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekStarted [5.35, 75.00, window=0, period=0] 07-23 11:31:50.255 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: positionDiscontinuity [5.35, 90.00, window=0, period=0, SEEK] 07-23 11:31:50.258 6779-6936/com.google.android.exoplayer2.demo D/ACodec: submitOutputMetaBuffers send FTB for ouptut 07-23 11:31:50.272 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekProcessed [5.36, 90.00, window=0, period=0] 07-23 11:31:50.304 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekStarted [5.40, 90.00, window=0, period=0] 07-23 11:31:50.305 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: positionDiscontinuity [5.40, 105.00, window=0, period=0, SEEK] 07-23 11:31:50.308 6779-6936/com.google.android.exoplayer2.demo D/ACodec: submitOutputMetaBuffers send FTB for ouptut 07-23 11:31:50.323 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekProcessed [5.41, 105.00, window=0, period=0] 07-23 11:31:50.355 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekStarted [5.45, 105.00, window=0, period=0] 07-23 11:31:50.355 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: positionDiscontinuity [5.45, 120.00, window=0, period=0, SEEK] 07-23 11:31:50.358 6779-6936/com.google.android.exoplayer2.demo D/ACodec: submitOutputMetaBuffers send FTB for ouptut 07-23 11:31:50.372 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekProcessed [5.47, 120.00, window=0, period=0] 07-23 11:31:50.405 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekStarted [5.50, 120.00, window=0, period=0] 07-23 11:31:50.406 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: positionDiscontinuity [5.50, 135.00, window=0, period=0, SEEK] 07-23 11:31:50.409 6779-6936/com.google.android.exoplayer2.demo D/ACodec: submitOutputMetaBuffers send FTB for ouptut 07-23 11:31:50.422 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekProcessed [5.51, 135.00, window=0, period=0] 07-23 11:31:50.456 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekStarted [5.55, 135.00, window=0, period=0] 07-23 11:31:50.457 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: positionDiscontinuity [5.55, 150.00, window=0, period=0, SEEK] 07-23 11:31:50.459 6779-6936/com.google.android.exoplayer2.demo D/ACodec: submitOutputMetaBuffers send FTB for ouptut 07-23 11:31:50.472 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekProcessed [5.56, 150.00, window=0, period=0] 07-23 11:31:50.507 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekStarted [5.60, 150.00, window=0, period=0] 07-23 11:31:50.507 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: positionDiscontinuity [5.60, 165.00, window=0, period=0, SEEK] 07-23 11:31:50.511 6779-6936/com.google.android.exoplayer2.demo D/ACodec: submitOutputMetaBuffers send FTB for ouptut 07-23 11:31:50.523 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekProcessed [5.61, 165.00, window=0, period=0] 07-23 11:31:50.557 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekStarted [5.65, 165.00, window=0, period=0] 07-23 11:31:50.558 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: positionDiscontinuity [5.65, 180.00, window=0, period=0, SEEK] 07-23 11:31:50.561 6779-6936/com.google.android.exoplayer2.demo D/ACodec: submitOutputMetaBuffers send FTB for ouptut 07-23 11:31:50.583 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekProcessed [5.68, 180.00, window=0, period=0] 07-23 11:31:50.608 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekStarted [5.70, 180.00, window=0, period=0] 07-23 11:31:50.609 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: positionDiscontinuity [5.70, 195.00, window=0, period=0, SEEK] 07-23 11:31:50.612 6779-6936/com.google.android.exoplayer2.demo D/ACodec: submitOutputMetaBuffers send FTB for ouptut 07-23 11:31:50.622 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekProcessed [5.72, 195.00, window=0, period=0] 07-23 11:31:50.658 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekStarted [5.75, 195.00, window=0, period=0] 07-23 11:31:50.659 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: positionDiscontinuity [5.75, 210.00, window=0, period=0, SEEK] 07-23 11:31:50.661 6779-6936/com.google.android.exoplayer2.demo D/ACodec: submitOutputMetaBuffers send FTB for ouptut 07-23 11:31:50.672 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekProcessed [5.76, 210.00, window=0, period=0] 07-23 11:31:50.709 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekStarted [5.80, 210.00, window=0, period=0] 07-23 11:31:50.710 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: positionDiscontinuity [5.80, 225.00, window=0, period=0, SEEK] 07-23 11:31:50.713 6779-6936/com.google.android.exoplayer2.demo D/ACodec: submitOutputMetaBuffers send FTB for ouptut 07-23 11:31:50.722 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekProcessed [5.81, 225.00, window=0, period=0] 07-23 11:31:50.760 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekStarted [5.85, 225.00, window=0, period=0] 07-23 11:31:50.761 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: positionDiscontinuity [5.85, 240.00, window=0, period=0, SEEK] 07-23 11:31:50.763 6779-6936/com.google.android.exoplayer2.demo D/ACodec: submitOutputMetaBuffers send FTB for ouptut 07-23 11:31:50.774 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekProcessed [5.87, 240.00, window=0, period=0] 07-23 11:31:50.811 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekStarted [5.90, 240.00, window=0, period=0] 07-23 11:31:50.812 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: positionDiscontinuity [5.90, 255.00, window=0, period=0, SEEK] 07-23 11:31:50.814 6779-6936/com.google.android.exoplayer2.demo D/ACodec: submitOutputMetaBuffers send FTB for ouptut 07-23 11:31:50.822 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekProcessed [5.91, 255.00, window=0, period=0] 07-23 11:31:50.861 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekStarted [5.95, 255.00, window=0, period=0] 07-23 11:31:50.862 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: positionDiscontinuity [5.95, 270.00, window=0, period=0, SEEK] 07-23 11:31:50.865 6779-6936/com.google.android.exoplayer2.demo D/ACodec: submitOutputMetaBuffers send FTB for ouptut 07-23 11:31:50.872 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekProcessed [5.97, 270.00, window=0, period=0] 07-23 11:31:50.912 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekStarted [6.00, 270.00, window=0, period=0] 07-23 11:31:50.913 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: positionDiscontinuity [6.01, 285.00, window=0, period=0, SEEK] 07-23 11:31:50.916 6779-6936/com.google.android.exoplayer2.demo D/ACodec: submitOutputMetaBuffers send FTB for ouptut 07-23 11:31:50.922 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekProcessed [6.01, 285.00, window=0, period=0] 07-23 11:31:50.962 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekStarted [6.05, 285.00, window=0, period=0] 07-23 11:31:50.963 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: positionDiscontinuity [6.05, 300.00, window=0, period=0, SEEK] 07-23 11:31:50.965 6779-6936/com.google.android.exoplayer2.demo D/ACodec: submitOutputMetaBuffers send FTB for ouptut 07-23 11:31:50.972 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekProcessed [6.07, 300.00, window=0, period=0] 07-23 11:31:51.013 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekStarted [6.11, 300.00, window=0, period=0] 07-23 11:31:51.013 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: positionDiscontinuity [6.11, 315.00, window=0, period=0, SEEK] 07-23 11:31:51.016 6779-6936/com.google.android.exoplayer2.demo D/ACodec: submitOutputMetaBuffers send FTB for ouptut 07-23 11:31:51.022 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekProcessed [6.11, 315.00, window=0, period=0] 07-23 11:31:51.063 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekStarted [6.16, 315.00, window=0, period=0] 07-23 11:31:51.064 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: positionDiscontinuity [6.16, 330.00, window=0, period=0, SEEK] 07-23 11:31:51.068 6779-6936/com.google.android.exoplayer2.demo D/ACodec: submitOutputMetaBuffers send FTB for ouptut 07-23 11:31:51.074 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekProcessed [6.17, 330.00, window=0, period=0] 07-23 11:31:51.114 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekStarted [6.21, 330.00, window=0, period=0] 07-23 11:31:51.115 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: positionDiscontinuity [6.21, 345.00, window=0, period=0, SEEK] 07-23 11:31:51.118 6779-6936/com.google.android.exoplayer2.demo D/ACodec: submitOutputMetaBuffers send FTB for ouptut 07-23 11:31:51.123 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekProcessed [6.22, 345.00, window=0, period=0] 07-23 11:31:51.165 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekStarted [6.26, 345.00, window=0, period=0] 07-23 11:31:51.166 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: positionDiscontinuity [6.26, 360.00, window=0, period=0, SEEK] 07-23 11:31:51.170 6779-6936/com.google.android.exoplayer2.demo D/ACodec: submitOutputMetaBuffers send FTB for ouptut 07-23 11:31:51.175 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekProcessed [6.27, 360.00, window=0, period=0] 07-23 11:31:51.215 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekStarted [6.31, 360.00, window=0, period=0] 07-23 11:31:51.216 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: positionDiscontinuity [6.31, 375.00, window=0, period=0, SEEK] 07-23 11:31:51.221 6779-6936/com.google.android.exoplayer2.demo D/ACodec: submitOutputMetaBuffers send FTB for ouptut 07-23 11:31:51.224 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekProcessed [6.32, 375.00, window=0, period=0] 07-23 11:31:51.266 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekStarted [6.36, 375.00, window=0, period=0] 07-23 11:31:51.266 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: positionDiscontinuity [6.36, 390.00, window=0, period=0, SEEK] 07-23 11:31:51.269 6779-6936/com.google.android.exoplayer2.demo D/ACodec: submitOutputMetaBuffers send FTB for ouptut 07-23 11:31:51.273 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekProcessed [6.36, 390.00, window=0, period=0] 07-23 11:31:51.316 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekStarted [6.41, 390.00, window=0, period=0] 07-23 11:31:51.317 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: positionDiscontinuity [6.41, 405.00, window=0, period=0, SEEK] 07-23 11:31:51.319 6779-6936/com.google.android.exoplayer2.demo D/ACodec: submitOutputMetaBuffers send FTB for ouptut 07-23 11:31:51.324 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekProcessed [6.42, 405.00, window=0, period=0] 07-23 11:31:51.369 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekStarted [6.46, 405.00, window=0, period=0] 07-23 11:31:51.369 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: positionDiscontinuity [6.46, 420.00, window=0, period=0, SEEK] 07-23 11:31:51.373 6779-6936/com.google.android.exoplayer2.demo D/ACodec: submitOutputMetaBuffers send FTB for ouptut 07-23 11:31:51.391 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekProcessed [6.48, 420.00, window=0, period=0] 07-23 11:31:51.418 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekStarted [6.51, 420.00, window=0, period=0] 07-23 11:31:51.419 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: positionDiscontinuity [6.51, 435.00, window=0, period=0, SEEK] 07-23 11:31:51.422 6779-6936/com.google.android.exoplayer2.demo D/ACodec: submitOutputMetaBuffers send FTB for ouptut 07-23 11:31:51.440 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: seekProcessed [6.53, 435.00, window=0, period=0] 07-23 11:31:51.886 6779-6910/com.google.android.exoplayer2.demo I/Kernel: [ 221.233298]-(0)[6910:ExoPlayerImplIn][printk_delayed:start] 07-23 11:31:51.886 6779-6910/com.google.android.exoplayer2.demo I/Kernel: [ 221.233333]-(0)[6910:ExoPlayerImplIn][WDK], local_bit:0x8, cpu:0,RT[221223341397] 07-23 11:31:51.886 6779-6910/com.google.android.exoplayer2.demo I/Kernel: [ 221.233333][WDK], local_bit:0x9, cpu:0, check bit0x:f,RT[221223350012] 07-23 11:31:51.886 6779-6910/com.google.android.exoplayer2.demo I/Kernel: [ 221.233333][thread:60][RT:221223357320] 2019-07-23 06:01:51.878220 UTC; android time 2019-07-23 11:31:51.878220 07-23 11:31:51.886 6779-6910/com.google.android.exoplayer2.demo I/Kernel: [ 221.233358]-(0)[6910:ExoPlayerImplIn][printk_delayed:done] 07-23 11:31:54.210 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: state [9.30, 435.00, window=0, period=0, false, BUFFERING] 07-23 11:31:54.977 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: state [10.07, 435.00, window=0, period=0, true, BUFFERING] 07-23 11:31:55.141 6779-6935/com.google.android.exoplayer2.demo I/MediaCodecLogger: com.google.android.exoplayer2.demo.HW.video.avc.bitrateInKbps = 267 07-23 11:31:55.323 6779-6927/com.google.android.exoplayer2.demo D/ACodec: sendFormatChange 0 07-23 11:31:55.634 6779-6910/com.google.android.exoplayer2.demo D/android.media.AudioTrack: No AudioTrackFlags provided. Using internal defaults. 07-23 11:31:55.637 6779-6910/com.google.android.exoplayer2.demo D/android.media.AudioTrack: AUDIOINFO: audio_input: format: 6 sample_rate: 48000 channels: 6 content_type: 0 07-23 11:31:55.642 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: audioSessionId [10.73, 435.00, window=0, period=0, 34] 07-23 11:31:55.921 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: renderedFirstFrame [11.01, 435.00, window=0, period=0, Surface(name=null)/@0x650fa54] 07-23 11:31:55.931 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: state [11.02, 435.00, window=0, period=0, true, READY] 07-23 11:31:56.441 6779-6910/com.google.android.exoplayer2.demo W/AudioTrack: releaseBuffer() track 0xb84c0038 disabled due to previous underrun, restarting 07-23 11:31:57.844 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: loading [12.94, 436.38, window=0, period=0, false] 07-23 11:31:57.969 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: state [13.06, 436.50, window=0, period=0, false, READY] 07-23 11:32:07.548 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: state [22.64, 436.51, window=0, period=0, true, READY] 07-23 11:32:07.554 6779-6910/com.google.android.exoplayer2.demo I/MediaCodecLogger: Flushing: com.google.android.exoplayer2.demo.HW.video.avc.framerate = 25.676 fps 07-23 11:32:07.558 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: droppedFrames [22.65, 443.62, window=0, period=0, 135] 07-23 11:32:07.561 6779-6936/com.google.android.exoplayer2.demo D/ACodec: submitOutputMetaBuffers send FTB for ouptut 07-23 11:32:07.572 6779-6927/com.google.android.exoplayer2.demo I/MediaCodecLogger: com.google.android.exoplayer2.demo.SW.audio.raw.bitrateInKbps = 232 07-23 11:32:07.582 6779-6935/com.google.android.exoplayer2.demo I/MediaCodecLogger: com.google.android.exoplayer2.demo.HW.video.avc.bitrateInKbps = 303 07-23 11:32:07.612 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: loading [22.70, 443.64, window=0, period=0, true] 07-23 11:32:07.891 6779-6779/com.google.android.exoplayer2.demo D/EventLogger: loading [22.98, 443.77, window=0, period=0, false] 07-23 11:32:08.062 6779-6910/com.google.android.exoplayer2.demo W/AudioTrack: releaseBuffer() track 0xb84c0038 disabled due to previous underrun, restarting ```
GouravSna commented 5 years ago

If we try to check Dolby (7.1) media on Youtube then we can see it plays. In Stats for nerds it does not show the Audio Codec info, it only shows video codec with other info.

So there could be two cases,

  1. Youtube player is excluding EAC-3 codec when it knows that the device is not capable.
  2. Exoplayer has some bug.
andrewlewis commented 5 years ago

Assuming the FireTV device is behaving the same as an Android L device: before Android M there was a bug with surround sound passthrough output where pausing the AudioTrack had no effect, so we work around this on pre-API 23 devices by stopping writing data and allowing the track to underrun. The behavior you are seeing sounds like it may be related to that workaround.

I'd suggest trying the following:

GouravSna commented 5 years ago

I tried turning off AudioTrackPositionTracker.needsPassthroughWorkarounds but it did not work.

Then I tried changing the buffer size in DefaultAudioSink.configure to 24k then it was working fine for the time it was coming 44.1k at which it was playing the audio after doing a pause on the media. So just want to understand what is your suggested value to fix this as a temporary workaround ?

Screenshot 2019-08-14 at 10 10 36 AM

PS. This issue is only reproducible on TCL Percee tv with Fire TV Stick(config is in description).

Android OS: 8.0.0 Kernal Verison: 3.10.79

andrewlewis commented 5 years ago

Based on your comment, it sounds like the workaround we have for Lollipop is indeed needed on Fire OS 5. This means that there is going to be some audio playout after pausing in passthrough mode. Picking a smaller buffer size reduces the duration of this playout but also increases the chance of an underrun.

The default buffer size is a conservative estimate based on the maximum bitrate for this format, so if your stream is at a lower bitrate then you can pick a lower value. I don't have any specific suggestions for the value, but you can probably choose something sensible based on the calculations in DefaultAudioSink and the known bitrate of your media. I'm not sure if it's an option for your use case, but switching to AC-3 might be an easy way to address this as it has a lower maximum bitrate.

GouravSna commented 5 years ago

Thanks @andrewlewis for reconsideration.

So if the audio track will under run if we decrease the buffer size and eventually we will not be able to play the Dolby track then it is an issue which needs to be fixed. Right ?

andrewlewis commented 5 years ago

Unfortunately there isn't much we can do about this: to work around the platform issue the only way to pause the audio track is to let it underrun, but this means that some audio plays out after pausing. It's probably worth noting that devices on newer versions of Android don't have this issue (and the same probably holds for FireOS).

If your bitrate is lower than the bitrate used for the default buffer size calculation then you can safely pick a lower buffer size, as described in my previous comment. However, it won't be possible to eliminate the audio playout after pausing completely.