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.

800 questions
3
votes
1 answer

ExoPlayer : Uri : Not able to load local media Android

I am trying to play media from mobile phone into ExoPlayer. I am getting the path from Environment.getExternalStorageDirectory().getAbsoluteFile(); Whenever I try to play media- I got this error- Source error …
Avinash Saran
  • 144
  • 1
  • 9
3
votes
0 answers

How to stream encrypted file using exoplayer (sample)?

I am trying to stream encrypted audio file (.mp3),but I do not know how to achieve this. I am requesting a sample, or some form of direction to do that?. There is an issue here https://github.com/google/ExoPlayer/issues/2467 but it is discussing…
3
votes
2 answers

Google ExoPlayer guide

I am struggling to build basic app with ExoPlayer. hello, well, i have problem with "getting started" part. don't know what need to use in order to play video or stream. how to stop,play,pause... Another problem is that I don't know what I am…
svarog
  • 688
  • 1
  • 12
  • 29
2
votes
0 answers

libc : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 3829 (EventThread), pid 2863 TV AP

I am seeing crash on my android TV app, I am looping a video using exoplayer endlessly(8 to 12hrs) & in between app is getting crashed with libc : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 3829 (EventThread), pid 2863 error. here I am…
Amartya
  • 251
  • 1
  • 15
2
votes
1 answer

At first only Default time bar disappears after timeout and then again after timeout full controller disappears of Exoplayer

As shown in the image and video, I am facing an issue while using styled player view. I have set controllerShowTimeoutMs to 2 seconds, but I am getting results as shown in the below image... Or as In this video... YouTube link When the controller…
2
votes
2 answers

java.lang.NoSuchMethodError: No virtual method setParameters(Lcom/google/android/exoplayer2/trackselection/DefaultTrackSelector$Paramet

I am facing this issue with BrightCove Video player. The player uses the exoplayer internally. When running the app the player shows only poster of the video but when clicking the play gives the below mentioned error msg. I have multiple modules…
Devendra Singh
  • 2,343
  • 4
  • 26
  • 47
2
votes
1 answer

How to handle exo players in recycler view?

How can we use multiple exo player in a recycler view? I saw many posts and videos like this and this but that all use a custom recycler view class. I could continue with that. But, I wanted to make a complete Insta clone where I can send gif and…
2
votes
1 answer

Exoplayer load frame when seekbar change

I'm using Exoplayer to play a locally saved video. I noticed that when you move the seekbar the video changes only when it is released. Is there a way to load the video frame with every move of the seekbar?
blacky99
  • 115
  • 1
  • 12
2
votes
0 answers

Unable to get Metadata form video using exoplayer without playback

I am trying to get video metadata using exoplayer without playback as mentioned in document when i try to run i cannot get list of audio track and subtitle track from local video file. MediaItem mediaItem = MediaItem.fromUri(videoUrl); …
sanoj lawrence
  • 951
  • 5
  • 29
  • 69
2
votes
2 answers

ExoPlayer with Jetpack Compose - Orientation change restarts video

I'm trying to use Jetpack Compose with ExoPlayer Problems When orientation is changed, ExoPlayer restarts video, but previous playback still exists and plays in the background. For example, if I rotate the phone twice, there are three sound tracks…
Saehun Sean Oh
  • 2,103
  • 1
  • 21
  • 41
2
votes
1 answer

how to get low latency in Exoplayer RTSP live streaming on android?

I am working on RTSP live Streaming. I am getting live stream on my android App using exoplayer RTSP stream player. But latency of that streaming is about 3 seconds. As latency on vlc media player is 1 second. so how to reduce latency in exoplayer.…
2
votes
0 answers

Caused by: com.google.android.exoplayer2.source.UnrecognizedInputFormatException

I have downloaded the HLS videos via DataSource.Factory and I have implemented the DRM support for both drm enabled and non-enabled videos via DefaultHttpDataSourceFactory. But when I am updating the app and playing the existing downloaded videos…
2
votes
2 answers

How to download and add subtitles to video using Exoplayer

I have a video player app which used the Exoplayer library to play videos but I want to be able to download and add subtitles dynamically using something like OpenSubtitles and then add them to the currently playing video. Video players with similar…
2
votes
0 answers

MediaDrmStateException: Failed to handle key response: General DRM error

I am using Exoplayer to play Widevine DRM content for offline content playing. I have below params set for my widevine policy for test purpose: "rental_duration_seconds": 900 "playback_duration_seconds": 600 "license_duration_seconds": 300 The…
user_1989
  • 375
  • 4
  • 10
2
votes
1 answer

Use TextureView programmatically with ExoPlayer?

I create a PlayerView programmatically: PlayerView playerView = new PlayerView(context); Instead of using SurfaceView, I want it to use TextureView. In the documentation, it says to do the following: