exoplayer

Exo player DASH Streaming example

此生再无相见时 提交于 2019-11-30 17:23:16
I'm trying to play DASH video on android devices with the ExoPlayer from Google ( http://developer.android.com/guide/topics/media/exoplayer.html ). The documentation is very, very poor and I cannot find some simplest working example with DASH (if someone did it). In the video ( https://www.youtube.com/watch?v=6VjF638VObA#t=462 ) it looks simple but in reality there is a lot of unknown objects. I want to use only ExoPlayer library and without using their github demo because it is very complex and I didn't find a way to add my testing URL because all samples are from YouTube. Thanks Here is a

Is there a non-youtube example to implement DASH using ExoPlayer?

a 夏天 提交于 2019-11-30 16:28:10
Hi I am looking for an example to configure ExoPlayer for DASH . But the example I found uses Youtube videos. Is there an example on videos which are not on youtube? Can DASH be configured for any video on the internet? Yes, ExoPlayer can play any DASH, SmoothStreaming, HLS or MP4 Progressive download over HTTP URLs. The demo application provided in ExoPlayer source code can be modified to add any video that will be shown in the startup Activity. To do that, edit https://github.com/google/ExoPlayer/blob/master/demo/src/main/java/com/google/android/exoplayer/demo/Samples.java file to add a new

Is there a non-youtube example to implement DASH using ExoPlayer?

喜欢而已 提交于 2019-11-30 16:21:53
问题 Hi I am looking for an example to configure ExoPlayer for DASH . But the example I found uses Youtube videos. Is there an example on videos which are not on youtube? Can DASH be configured for any video on the internet? 回答1: Yes, ExoPlayer can play any DASH, SmoothStreaming, HLS or MP4 Progressive download over HTTP URLs. The demo application provided in ExoPlayer source code can be modified to add any video that will be shown in the startup Activity. To do that, edit https://github.com

How to prevent the exoplayer from reloading in case of seek backward?

我与影子孤独终老i 提交于 2019-11-30 15:00:15
I am using exoplayer to play mp3 tracks. All good. If the track is completely buffered then in case of seek forward it does not reload as expected. However, in case of seek backward it reloads. How do i prevent that? Is it a bug in exo? Not really a solution, but you can use a library that acts as a proxy between ExoPlayer and the video URL like AndroidVideoCache . It downloads the video to disk and supplies ExoPlayer with the local file URL so re-buffering is much faster. 来源: https://stackoverflow.com/questions/32837803/how-to-prevent-the-exoplayer-from-reloading-in-case-of-seek-backward

How to show subtitle in android ExoPlayer

纵然是瞬间 提交于 2019-11-30 14:01:51
问题 I am using Exoplayer for streaming URL. I want to add srt file in exoplayer. But I think player not support srt file so I put my file content in 1 variable. How to show subtitles in android exoplayer? 回答1: A bit late but it might help others using Exoplayer 1.5.1 where DebugTrackRenderer has been removed. Use, DataSource textDataSource = new DefaultUriDataSource(context, bandwidthMeter, userAgent); SingleSampleSource textSampleSource = new SingleSampleSource(subTitleUrl, textDataSource,

How to show subtitle in android ExoPlayer

前提是你 提交于 2019-11-30 09:13:47
I am using Exoplayer for streaming URL. I want to add srt file in exoplayer. But I think player not support srt file so I put my file content in 1 variable. How to show subtitles in android exoplayer? Faisal A bit late but it might help others using Exoplayer 1.5.1 where DebugTrackRenderer has been removed. Use, DataSource textDataSource = new DefaultUriDataSource(context, bandwidthMeter, userAgent); SingleSampleSource textSampleSource = new SingleSampleSource(subTitleUrl, textDataSource, MediaFormat.createTextFormat(MediaFormat.NO_VALUE,MimeTypes.APPLICATION_SUBRIP, MediaFormat.NO_VALUE,

How can I scale video in ExoPlayer-V2 - Play Video In Full Screen

假如想象 提交于 2019-11-30 07:34:08
I am playing video from URL on Exoplayer , it stretching the video on resizing/on using resize_mode as I have mentioned in layout file using this I am not able to maintain the aspect ratio of video. I want to do scale type CENTER_CROP like we do in TextureSurface as mentioned in image2 but I am getting output as image1 I have tried following example Exoplayer Demo Example My Output (Img 1) and Expected Output (Img 2) exoplayer layout code <com.google.android.exoplayer2.ui.SimpleExoPlayerView android:id="@+id/player_view" android:layout_width="match_parent" android:layout_height="match_parent"

ExoPlayer Restore State when Resumed

戏子无情 提交于 2019-11-30 07:30:22
I have implemented the Player and now there is a problem. When the video is playing and if the app is closed and resumed, the video screen freezes. I even saw the ExoPlayer Demo Activity from Google for better understanding but I could not get through it for implementing in my app. I have attached the Player Activity here and for the full code, I am sharing the GitHub repository for the complete set of files used. RecipeStepDetailFragment.java package com.example.android.recipe.ui; import android.content.Context; import android.content.res.Configuration; import android.net.Uri; import android

修改ExoPlayer源码,获取帧时间

蹲街弑〆低调 提交于 2019-11-30 07:15:53
最近在研究google的ExoPlayer,根据项目需求,需要获得当前帧的显示时间,看源码发现解码在MediaCodecVideoRenderer这个类中执行解码,发现processOutputBuffer函数内有时间数据,根据测试知道presentationTimeUs是显示时间,然后就是想办法把时间给我们了 既然想改源码,那先下载源码,源码 新建个module,把core,dash,hls,smoothstreaming,ui文件夹内的代码和资源都复制到这个module内 新建个interface VideoTimeListener public interface VideoTimeListener { void onVideoTimeChanged(long time); } 修改MediaCodecVideoRenderer,添加一个VideoTimeListener和构造函数 private VideoTimeListener timeListener; public MediaCodecVideoRenderer(Context context, MediaCodecSelector mediaCodecSelector, long allowedJoiningTimeMs, @Nullable DrmSessionManager

Google ExoPlayer guide

寵の児 提交于 2019-11-30 05:32:25
I am struggling to build basic app with ExoPlayer. First you need to add this in your build.gradle compile 'com.google.android.exoplayer:exoplayer:r2.1.1' 1. Your Layout File <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" > <com.google.android.exoplayer2.ui.SimpleExoPlayerView android:id="@+id/player_view" android:focusable="true" android:layout_width="match_parent" android:layout_height="match_parent"/> <