Questions tagged [exoplayer2.x]

ExoPlayer 2.x is a major iteration of the ExoPlayer (an open source, application level media player built on top of Android’s low level media APIs) library with significant API and architectural improvements.

ExoPlayer 2.x includes significant architectural improvements of ExoPlayer and new features.

Key architectural changes:

  • Late binding between rendering and media source components. Allows the same rendering components to be re-used from one playback to another. Enables features such as gapless playback through playlists and DASH multi-period support.

  • Improved track selection design. More details can be found here.

  • LoadControl now used to control buffering and loading across all playback types.

  • Media source components given additional structure. A new MediaSource class has been introduced. MediaSources expose Timelines that describe the media they expose, and can consist of multiple MediaPeriods. This enables features such as seeking in live playbacks and DASH multi-period support.

  • Responsibility for loading the initial DASH/SmoothStreaming/HLS manifest is promoted to the corresponding MediaSource components and is no longer the application's responsibility.

  • Higher level abstractions such as SimpleExoPlayer have been added to the library. These make the library easier to use for common use cases. The demo app is halved in size as a result, whilst at the same time gaining more functionality. Read more here.

  • Enhanced library support for implementing audio extensions.

  • Format and MediaFormat are replaced by a single Format class.

Key new features:

  • Playlist support. Includes support for gapless playback between playlist items and consistent application of LoadControl and TrackSelector policies when transitioning between items.

  • Seeking in live playbacks for DASH and SmoothStreaming.

  • DASH multi-period support.

  • MediaSource composition allows MediaSources to be concatenated into a playlist, merged and looped.

  • Looping support.

  • Ability to query information about all tracks in a piece of media (including those not supported by the device).

  • Improved player controls.

  • Support for PSSH in fMP4 moof atoms.

  • Support for Opus in Ogg.

  • CacheDataSource support for standalone media file playbacks (mp3, mp4 etc).

  • FFMPEG extension (for audio only).

In case of building a new media app, recommend building it on ExoPlayer 2.X. For those who are using ExoPlayer 1.X, you can include both 1.X and 2.X in your app (due to a different package name), allowing you to test and migrate your users with minimal impact.

634 questions
6
votes
0 answers

android.media.MediaCodec$CodecException: Failed to initialize OMX.qcom.video.decoder.avc, error 0xfffffff4

On Device Lenovo K33a42, Getting below given error, screen is black and not playing the video com.google.android.exoplayer2.ExoPlaybackException: com.google.android.exoplayer2.mediacodec.MediaCodecRenderer$DecoderInitializationException: Decoder…
6
votes
0 answers

ExoPlayer HttpDataSource$InvalidResponseCodeException: Response code: 404

I have a playlist of 7 dash(.mpd) videos. I'm using Exoplayer version 2.8.4. Exoplayer is stuck in loading for the last two of them and I'm getting the following error in my logs. Other 5 videos plays seamlessly. What could be the reason. Thanks in…
Sumukha Aithal K
  • 585
  • 1
  • 6
  • 22
6
votes
0 answers

ExoPlayer seekto function does not seek to the specified point but starts from 0

I'm working on ExoPlayer 2.6.0 for a Radio streaming app. Radio is playing is fine, but when i try to add seekTo for +/-30 seconds it always starts the streaming from 0. In the debug mode, player seeks to +30 seconds but as soon as…
Harry .Naeem
  • 1,037
  • 3
  • 16
  • 29
6
votes
3 answers

How to use TextureView instead of SurfaceView with PlayerView of ExoPlayer?

I know it is possible to use TextureView in ExoPlayer. But I cannot find any sample on how to implement this functionality in a proper way. Could you please help me on this issue?
Elnur Hacıyev
  • 345
  • 2
  • 12
6
votes
0 answers

How to use custom DataSource in ExoPlayer 2?

DefaultBandwidthMeter bandwidthMeter = new DefaultBandwidthMeter(); DataSource.Factory dataSourceFactory = new DefaultDataSourceFactory(this, Util.getUserAgent(this, "yourApplicationName"), bandwidthMeter); ExtractorsFactory extractorsFactory =…
Bincy Baby
  • 2,409
  • 4
  • 27
  • 53
6
votes
1 answer

Exoplayer(2.0.0) giving BehindLiveWindowException when playing live HLS video

I am getting this exception after some time when I am playing a live video(HLS), for recorded videos it is working fine. com.google.android.exoplayer2.source.BehindLiveWindowException at…
Ishant Sagar
  • 216
  • 4
  • 13
5
votes
0 answers

How to create DASH manifest url for youtube videos?

I am creating android application. I want to play Youtube videos in the exoplayer. In the exoplayer demo app all the url's are stored in media.exolist.json like this: { "uri":…
Abhi
  • 85
  • 7
5
votes
0 answers

seekTo restarting playback on exoplayer

While trying to call seekTo function of exoplayer instance the playback is getting reset and playing from start after buffering live audio stream. As some blogs and gists suggest tried calling seekto after pausing exoplayer and then starting the…
Manti_Core
  • 800
  • 6
  • 23
5
votes
1 answer

ExoPlayer can't play audio/video streamed (RTMP) by Adobe live stream encoder

I'm using Adobe Live Stream Encoder to stream RTMP live audio in server side. in my android client app, ExoPlayer with RTMP Extension can't play it and causes RtmpIOException but I can play it with VLC or MPC. I tested my android app with some other…
Ali.M
  • 271
  • 6
  • 24
5
votes
1 answer

ExoPlayerImplInternal: Renderer error can't play video android

I am regularly using google Exoplayer2 library in all my 4 apps. But I have facing some problem to play video its omits error: ExoPlayerImplInternal: Renderer error. …
Nikhil Solanki
  • 520
  • 1
  • 3
  • 15
5
votes
0 answers

ExoPlayer2 Zoomable View?

There are what appear to be several clones of the same answer for the first version of Exoplayer and the original Android media player, but they do not compile on Exoplayer2, which reorganized quite a bit of the internal code. A reasonably-diligent…
Tickerguy
  • 91
  • 1
  • 6
5
votes
2 answers

Set custom controller programmatically for SimpleExoPlayerView

Through XML we can easily add custom UI controller (controller_layout_id) to SimpleExoPlayerView, like this:
Zeero0
  • 1,887
  • 17
  • 34
5
votes
1 answer

Is it possible to change resolution of exoplayer manually?

I'm working on a project that use Exoplayer2 for HLS video streaming. Adaptive streaming is working well in my exoplayer, but i want to implement a feature that user can change the resolution (144p,240p,480p..)of the video manually from UI. I got…
Sarath Sasi
  • 63
  • 1
  • 1
  • 5
5
votes
1 answer

MPEG-TS H.264 with ExoPlayer

I have two mpeg-ts + h.264 video files, which I attempt to read on an Android device (Samsung Tab A 10.1") with ExoPlayer: SimpleExoPlayerView view = new SimpleExoPlayerView(this); TrackSelection.Factory videoTrackSelectionFactory = new…
sdabet
  • 17,379
  • 11
  • 73
  • 143
5
votes
2 answers

Android - ExoPlayer2 subtitles

How to set subtitles on ExoPlayer2? I have tried this tu bild MergingMediaSource: SingleSampleMediaSource singleSampleSource = new SingleSampleMediaSource(Uri.fromFile(new File("/sdcard/Download/a.vtt")), mediaDataSourceFactory, …
TheModularMind
  • 1,963
  • 1
  • 19
  • 36
1 2
3
42 43