exoplayer

NoSuchMethodError for com/google/android/exoplayer2/upstream/DefaultAllocator

前提是你 提交于 2019-12-11 21:30:47
问题 I am using com.amazon.android:exoplayer-ui:r2.5.4 in my project I just upgraded IDE to Android Studio 3.3.1. in my build.gradle I have below code for compile compileOptions { sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7 } While trying to build, I get this error: Task :app:mergeExtDexDebug FAILED AGPBI: {"kind":"error","text":"Default interface methods are only supported starting with Android N (--min-api 24): void com.google.android.exoplayer2.Player

Create MPD file from String

对着背影说爱祢 提交于 2019-12-11 21:17:27
问题 I've managed to create a MPD file that is perfectly playable when fed to ExoPlayer 2.6.0 via an URL (the MPD is hosted in a testing server). However, I need to create this MPD file in Android and feed it to ExoPlayer without requesting the file to the server. So far I've tried to understand the classes DashManifest & DashManifestParser with no success. Any ideas how to create the file in Android and feed it directly to ExoPlayer? 回答1: When playing an DASH stream you need to create a

Get video pixel data from Exoplayer in Android

≡放荡痞女 提交于 2019-12-11 17:25:29
问题 Is it possible to grab the pixel data (e.g. as RGB byte array) from a running video within the ExoPlayer? Ideally as the real video resolution and not the size as the shown View. I'd want to forward that data to OpenCV for ImageProcessing purposes. Alternatively I'm looking for a robust (ffmpeg based) Android framework to input videos into OpenCV where the input might be IP-Cameras, local files, online files and online streams. Any help is appreciated. 回答1: WARNING this solution currently

Exoplayer Video Quality options for an mp4 video

不问归期 提交于 2019-12-11 16:48:07
问题 I used Exoplayer to play an HLS video track and following code works fine to fetch the different possible video qualities and to show them as options for the user to select from multiple resolutions. for (int i = 0; i < player.getTrackCount(0); i++) { MediaFormat format = player.getTrackFormat(0, i); if (MimeTypes.isVideo(format.mimeType)) { if (format.adaptive) { menu.add(1, (i + 1), (i + 1), "Auto"); } else { menu.add(1, (i + 1), (i + 1), format.width + "p"); } } } Now i use the same code

how to add multiple subtitles in Exo Player 2

a 夏天 提交于 2019-12-11 10:58:00
问题 I want to show subtitles with ExoPlayer 2 . users can choose between languages (English,German, or Arabic) . Video links are HLS (.m3u8) and subtitles are .str files . I couldn't find any samples to do this. is there any sample? 回答1: The link I added as a comment to your original post will be how you'll build the UI around text track selection. Then to actually get the tracks to be added to your mp4 file (or whatever the format is), you'll want to use a MergingMediaSource . The simple version

Video Player Null Pointer Exception using Google Media Framework Exoplayer

我的梦境 提交于 2019-12-11 10:34:20
问题 I am using GMF sample to play Video in my app, where I am fetching video title and url from live JSON, here is the sample of my JSON : { "videos": [ { "title":"Video 1", "url":"88.mp4" }, { "title":"Video 2", "url":"l5.mp4" } ]} And this is what my code looks like : MainActivity.java: JSONObject jsono = new JSONObject(data); JSONArray jarray = jsono.getJSONArray("videos"); for (int i = 0; i < jarray.length(); i++) { JSONObject object = jarray.getJSONObject(i); Videos video = new Videos();

Play encrypted hls in exoplayer using encrypted keys

百般思念 提交于 2019-12-11 09:08:57
问题 I am trying to play the encrypted video using .m3u8 file. I stored my video in AWS and created the .ts files and a master playlist. Aws provided me some keys for that encrypted video file. Now I have to use those keys in exoplayer. I have tried to use Aes128DataSource and DrmSessionManager but no luck. The key types are: Encryption Key: #################################################################### Encryption Key MD5: ################ Encryption Initialization Vector : #############

Missing FrameworkSampleSource from ExoPlayer

醉酒当歌 提交于 2019-12-11 09:07:17
问题 I've been using ExoPlayer for the past couple of days until today which when I tried to build the project I found that there is a missing class named FrameworkSampleSource . I tried looking for it in Exoplayer's source but I can not find it anywhere. It even is gone from github! I wonder what's happened to it?! 回答1: ExoPlayer recently moved away from using Android's MediaExtractor , so FrameworkSampleSource and DefaultSampleSource , as it was named later, were removed from the library. For

How to use events in Nativescript ExoPlayer?

笑着哭i 提交于 2019-12-11 08:42:36
问题 Link to player: https://github.com/nstudio/nativescript-videoplayer I am using exoplayer in my nativescript project. I want to call a function when the player is ready to play the video. The documentation of this plugin is little bit unclear but player events are mentioned there: Event Description ------------------------------------------------- errorEvent This event fires when an error in the source code is thrown. playbackReadyEvent This event fires when the video is ready.

MediaCodec returns null for getOutputImage on real devices - Emulator works

£可爱£侵袭症+ 提交于 2019-12-11 06:35:20
问题 I'm trying to grab the Image of a Video via the MediaCodec using the getOutputImage method (Framework used: Exoplayer). I'm NOT using a SurfaceView and every thing else seems fine (this is the implementation). On my emulator I get proper Images. On all my real devices (OnePlus One with Android 7.1.1, Honor 8 with Android 7.0, Samsung Galaxy Tab S with Android 6.0.1) I ALWAYS get null as Image. The Video does play however because I can hear the sound. When showing the Image on a SurfaceView,