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

ExoPlayer playing mp2 formats #2633

Closed Stalker11 closed 7 years ago

Stalker11 commented 7 years ago

Hi, I try to play HLS stream:

 Stream #0:0: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 720x576 [SAR 704:675 DAR 176:135], 25 fps, 25 tbr, 90k tbn, 50 tbc
   Stream #0:1: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s

But if player start plaiyng I have a message in logs:

Tracks
 [
 Renderer:0 [
  Group:0, adaptive_supported=N/A [
  [X] Track:0, id=0, mimeType=video/avc, supported=YES
     ]
   ]
 Renderer:1 [
    Group:0, adaptive_supported=N/A [
       [ ] Track:0, id=null, mimeType=audio/mpeg-L2, channels=2, sample_rate=48000, supported=NO_UNSUPPORTED_TYPE
    ]
   ]
   Renderer:2 [
   Group:0, adaptive_supported=N/A [
   [ ] Track:0, id=null, mimeType=application/cea-608, supported=YES
     ]
   ]
  Renderer:3 [
     Group:0, adaptive_supported=N/A [
       [X] Track:0, id=null, mimeType=application/id3, supported=YES
     ]
  ]
]

Video start playing but sound not. I have tried searching this issue and have not found a whole lot of details regarding these unsupported types. I am using exoplayer version r2.1.1. How I can fix this broken? Thanks.

AquilesCanta commented 7 years ago

Seems to me the device does not provide decoding support for mpeg-2 audio. You can try the ffmpeg extension to decode it through software. Have a look at the supported formats page for more information.