ashqal / md360player4android Goto Github PK
View Code? Open in Web Editor NEWIt is a lite library to render 360 degree panorama video for Android. VR Player.
License: Apache License 2.0
It is a lite library to render 360 degree panorama video for Android. VR Player.
License: Apache License 2.0
Hi!
After version 1.1 it is not possible to simply drag the viewport anymore.
What did change exactly?
Thank you very much!
PS: Sorry It is working. It was my fault. You are getting all the credit from my side! Awesome library! Especially how smooth it became after 1.1 version.
我通过ontouch事件,捕捉到了放大和缩小的手势,可是我该怎么利用您的库改变画面的尺寸?
@ashqal
你好。看到你的这个DEMO非常开心。正好需要这个功能。感谢你的无私分享。
在你的DEMO里面遇到一个问题,DEMO提供的M3U8地址有声音,画面出不来。替换了其他M3U8地址也有同样的情况。换成MP4的地址则无这个问题。请问下,这是什么原因呢?
另外,每次在把手控制画面改成陀螺仪的时候,都会出现滑动转动很多圈的情况。试了一下,发现是陀螺仪的问题。当快速转圈的时候,陀螺仪会出现回滚的情况。
hello大神,有个功能想和您讨论下。
一般情况下,视频播放后我们才会手机放到VR设备里观看,这样的话就会出现已经播放了一段,而且在观看途中也无法暂停,只有把手机从设备拿出来之后才能进行视频的暂停。能不能设置一个这样的功能:当头往下低看底部的时候进入某个区域范围的时候可以触发一个事件,我们可以在事件里进行播放和暂停的操作,退出这个区域范围的时候还可以触发一个事件,方便取消操作。有点类似于UtoVR的功能。
我的视频不是360度的,假如是120度的,该怎么修改才能显示呢?
how to add progressbar
手头碰巧有一部api版本15的设备,有对它适配的可能么?
能不能直接指定switchDisplayMode或者switchInteractiveMode啊?传个int值进去,而不是只有传activity这种形式
I've tried to play some local videos, but I can't.
The error that returns to me is Protocol not Found.
I've tried a lot of combinations to use android.resource:// protocol, but no luck.
My final version is this:
private Uri getRawResourceUri(@RawRes int resId){ Resources resources = getResources(); Uri uri = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" + resources.getResourcePackageName(resId) + '/' + resources.getResourceTypeName(resId) + '/' + resources.getResourceEntryName(resId) ); return uri; }
When I try a remote video, the app runs like a charm.
My video file has been placed on resources/raw folder and called default_movie.mp4.
Thanks a lot.
视频底部会出现图形扭曲的情况,如果使用cardboard就不会出现
How can I load a spherical image with this library?
How I implement a equivalent listener to - (void)videoPlayerViewDidReachEnd:(VIMVideoPlayer *)videoPlayer on iOS version in my Android App?
I have tried to get a message from onDestroy event, but when videoplayback stop, this method don't is fired.
Thanks
比较了其他VR播放器, 比如http://www.insta360.com/download, MD360Player播放同样的视频清晰度不高,请问如果想优化视频显示的清晰度,如何优化?多谢啦
@ashqal : Very helpful library indeed. But I tried to load a video from my server and the player failed to play it..
你好:
您的渲染库中有支持dome半球视频的部分代码,渲染是没问题的。但是初始的位置是不完美的,拖动时的方式也暂未处理。
请问今后是否会对这部分功能进行完善?
Sorry for inconvenience.
I want to create projection mode when playing 360 degree video.
@ashqal Could you help me? Thank you so much.
为了方便扩展,能不能自定义pinch的max和min以及自定义MD360Director的属性,而不是去修改源码
拖动之后希望能有reset功能恢复到最初的样子
想问下博主,在处理全景图片播放时,为什么要采取代码中的那么复杂的方式?
private ThreadLocal mLocalGLTexture = new ThreadLocal<>();
而不是直接把图片load进来作为texture就好了?谢谢!
@ashqal Can you show me solution to do this? Thank you very much
你好,我在自己的工程里面使用您的DEMO。我想请教一下你实现360全景视频和双屏幕的原理是什么呢?我对Opengl不太熟悉,如果可以的话,最好能大概描述一下关键性代码和类,这应该是很多同学也很关心的。非常感谢,不胜感激。
我用的oppo手机,没有陀螺仪,然后就无法播放。黑屏。带陀螺仪的nexus可以正常播放,请问是为什么?Could not find class 'android.view.WindowInsets', referenced from method com.flyco.banner.widget.LoopViewPager.LoopViewPager.access$super
使用touch模式或者reset以后初始化位置在偏右侧位置,请问如何修改使它初始化位置在比较正的位置?
我发现在魅族手机上,画面没办法跟随手机动,我抓了sensor的回调,发现魅族根本没有这个传感器的回调。而且在部分手机上很晃。
你好,我发现个问题,搞了好久没有解决,我在集成微博第三方登录后,发现部分机子无法播放视频,像是华为meat7,Lg5等等,但有的机子能够正常播放。我比较了一下,发现,可能是s0库的问题,因为在我集成的sdk当中,只有微博SDK和ijkplayer用到了so库,当我删掉微博SDK库后,播放器又能够正常适配所有的机器播放了。搞不懂这是为什么?
我早gradle中加了这句:compile 'com.github.8tory:weibo-android-sdk:-SNAPSHOT'
然后就不能播放了 。
报错信息:
java.lang.UnsatisfiedLinkError: com.android.tools.fd.runtime.IncrementalClassLoader$DelegateClassLoader[DexPathList[[dex file "/data/data/com.asha.md360player4android/files/instant-run/dex/slice-weibo-android-sdk-core-3.1.4_cb5be235648f20ce3dae1eb49c702704e22e7382-classes.dex", dex file "/data/data/com.asha.md360player4android/files/instant-run/dex/slice-tv.danmaku.ijk.media-ijkplayer-java-0.4.5_301e583e7006e65bfc439fc6de23b8c7a5e386e2-classes.dex", dex file "/data/data/com.asha.md360player4android/files/instant-run/dex/slice-tv.danmaku.ijk.media-ijkplayer-armv7a-0.4.5_16eab7ffae67c1cb5f7e787ccce9e5b0e0835114-classes.dex", dex file "/data/data/com.asha.md360player4android/files/instant-run/dex/slice-support-annotations-23.2.0_2aa979df686c6cddf3e3cb3dc08b5f0c749828c3-classes.dex", dex file "/data/data/com.asha.md360player4android/files/instant-run/dex/slice-slice_9-classes.dex", dex file "/data/data/com.asha.md360player4android/files/instant-run/dex/slice-slice_8-classes.dex", dex file "/data/data/com.asha.md360player4android/files/instant-run/dex/slice-slice_7-classes.dex", dex file "/data/data/com.asha.md360player4android/files/instant-run/dex/slice-slice_6-classes.dex", dex file "/data/data/com.asha.md360player4android/files/instant-run/dex/slice-slice_5-classes.dex", dex file "/data/data/com.asha.md360player4android/files/instant-run/dex/slice-slice_4-classes.dex", dex file "/data/data/com.asha.md360player4android/files/instant-run/dex/slice-slice_3-classes.dex", dex file "/data/data/com.asha.md360player4android/files/instant-run/dex/slice-slice_2-classes.dex", dex file "/data/data/com.asha.md360player4android/files/instant-run/dex/slice-slice_1-classes.dex", dex file "/data/data/com.asha.md360player4android/files/instant-run/dex/slice-slice_0-classes.dex", dex file "/data/data/com.asha.md360player4android/files/instant-run/dex/slice-picasso-2.5.2_efef3d5c78b95624ad3d185370992dbdbf36bc0f-classes.dex", dex file "/data/data/com.asha.md360player4android/files/instant-run/dex/slice-internal_impl-23.2.0_d2eef739ef69f25e181879b8aef75fab610a6eeb-classes.dex", dex file "/data/data/com.asha.md360player4android/files/instant-run/dex/slice-com.infstory-weibo-android-sdk-core-3.1.4_3e8ee89e2d5b97459af1553da1dde348ba425cb0-classes.dex", dex file "/data/data/com.asha.md360player4android/files/instant-run/dex/slice-com.github.8tory-weibo-android-sdk--SNAPSHOT_f63c85d600c0c0046e1088c84580b19bc765ec1a-classes.dex", dex file "/data/data/com.asha.md360player4android/files/instant-run/dex/slice-com.android.support-support-vector-drawable-23.2.0_2592da3b32e21b8d2aec3778e0677295154e8ed9-classes.dex", dex file "/data/data/com.asha.md360player4android/files/instant-run/dex/slice-com.android.support-support-v4-23.2.0_0e62e90d2810375ef464a49fec4fac2b42a27f26-classes.dex", dex file "/data/data/com.asha.md360player4android/files/instant-run/dex/slice-com.android.support-appcompat-v7-23.2.0_6f636057addae73c4003267e4fe8ac807e0916ae-classes.dex", dex file "/data/data/com.asha.md360player4android/files/instant-run/dex/slice-com.android.support-animated-vector-drawable-23.2.0_19d4813e91635ba991c5fac9feb3277a7d4f3720-classes.dex"],nativeLibraryDirectories=[/data/app/com.asha.md360player4android-1/lib/arm64, /data/app/com.asha.md360player4android-1/base.apk!/lib/arm64-v8a, /vendor/lib64, /system/lib64]]] couldn't find "libijkffmpeg.so"
at java.lang.Runtime.loadLibrary(Runtime.java:367)
at java.lang.System.loadLibrary(System.java:1076)
at tv.danmaku.ijk.media.player.IjkMediaPlayer$1.loadLibrary(IjkMediaPlayer.java:157)
at tv.danmaku.ijk.media.player.IjkMediaPlayer.loadLibrariesOnce(IjkMediaPlayer.java:168)
at tv.danmaku.ijk.media.player.IjkMediaPlayer.initPlayer(IjkMediaPlayer.java:209)
at tv.danmaku.ijk.media.player.IjkMediaPlayer.(IjkMediaPlayer.java:205)
at tv.danmaku.ijk.media.player.IjkMediaPlayer.(IjkMediaPlayer.java:196)
at com.asha.md360player4android.MediaPlayerWrapper.init(MediaPlayerWrapper.java:33)
at com
enable to switch to plane projection.
这里为什么要加android:process=":vrPlayer",有什么作用吗?加了这句后,我在页面上存的值有些会返回空。
I'm trying to modify this app to play stereo image. In my idea, two view should play 2 images which are capture by 2 cameras.
What's the better way to implement this function based on your project? Could you give some advice?
Thank you!
I want to run also the YouTube 360 videos .
Does this player runs the YouTube videos.
Hello how can i add some hotspot objects to the video. And call some function if hotspot is in center of screen
我看了代码里面有一段是openLocalFile在MediaPlayerWrapper.java
在播放视频时,该如何区分单击和滑动的效果?我在OnTouch里面只能得到action_down的事件
实在不好意思,我研究了半天没有研究出来,只好厚着脸皮又来请教你了。
请问如何获取到当前视野中心位置在视频中的坐标呢??
还有个问题就是,如果我想渲染一个水印到视野中的某一个位置,有办法实现么?
你好,这个软件很好,现在刚好能满足我们项目需求。但我发现这个播放器的视频清晰度较差,相同的视频源,vlc播放出来会清晰很多,请问这个是什么原因啊?能进行修改优化吗?谢谢啦
stop();
mPlayer.reset();
try{
mPlayer.setDataSource(uri.toString());
}catch (Exception e){
}
mPlayer.prepareAsync();
mPlayer.start();
视频播放过程中,调用如下代码,画面卡住,声音播放,请教一下有什么解决办法吗?
如何取消鱼眼效果?
陀螺仪出现晃动比较严重的情况,特别是定点之后进行移动的时候,会出现上下晃动
能不能把陀螺仪的onSensorChanged事件暴露出来到MDVRLibrary?好做一些自定义的操作?
Sorry for my problem. Can you support me?
private void setupPlayer(String file) {
seekbar.setProgress(0);
mMediaPlayerWrapper.openRemoteFile(file);
mMediaPlayerWrapper.prepare();
}
private View.OnClickListener forwardListener = new View.OnClickListener() {
public void onClick(View v) {
Log.d(TAG, "onClick forward");
if(position >= mDataList.size() - 1){
Toast.makeText(mActivity,"次の動画がありません",Toast.LENGTH_SHORT).show();
return;
}
position++;
String uri = (mDataList.get(position)).getFileUrl();
Log.d(TAG + "_forward_url", uri);
if (uri != null) {
setupPlayer(uri);
}
}
};
When i clicked next or previous video, it had error in line mMediaPlayerWrapper.openRemoteFile(file);
player.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "mediacodec", 1);
这句话必须注销掉
大侠,我在oppo和华为的手机上运行时,视频无法播放,console提示两个相关的错误:MediaPlayer-JNI: QCMediaPlayer mediaplayer NOT present、MotionStrategy: TYPE_ROTATION_VECTOR sensor not support!。这该怎么办?
你好, 我在Demo里添加了惯性滑动, 这是参考 https://github.com/pangff/DemoView/blob/v2/DemoView/src/com/pangff/demoview/MyView.java
希望大神能直接加到库里,谢谢
能不能每次打开视频的时候都固定一个方向?比如我现在对着正前方打开视频的话是一个画面,如果对着正南方打开的话又是另一个画面,而我想实现每次打开视频,不管是对着哪个方向打开的时候都是同一个初始画面
http://recorded.live.doubo.tv/realrealcomp.mp4
这类地址的视频播放起来画面卡顿,像是慢动作,而且声音跟画面不同步,声音应该是正常速率播放的,但是画面没跟上。会不会跟帧率有关?在哪里可以设置帧率吗?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.