android-videoview

VideoView on top of SurfaceView

心不动则不痛 提交于 2019-11-29 23:58:15
问题 I try to show a VideoView on top of a SurfaceView . But it isn't visible but reacts on clicks (MediaController appears and the sound plays). The video seems to be played behind the SurfaceView so I also tried to make use of setZOrderMediaOverlay() and/or setZOrderOnTop() but nothing changed When I go to the home screen I see the VideoView for a split second in the fading animation, so it is really there. I tried it with a xml layout and also completely programmatically but nothing works. Here

How to capture/record clip from Video URL in Android and save to phone

谁说我不能喝 提交于 2019-11-29 18:45:28
问题 In Android, is it possible to record a short clip (ex: an arbitrary 5-10 seconds in the video) from a Video URL (ex: http://www.test.com/video.mp4)? For example, I'd like to stream a video (from url) in an Activity and allow the ability to capture/record a short clip from it. Perhaps, allow the user to record an arbitrary Start/End time from the video. If so, is there an API to accomplish this? If not, is there an Android library to support this? Please provide a sample code solution for this

Streaming to VideoView only plays on Wifi when using Samsung phones

依然范特西╮ 提交于 2019-11-29 18:17:16
问题 I am using the following library to stream YouTube videos to an Android application. http://code.google.com/p/android-youtube-player/source/browse/trunk/OpenYouTubeActivity/src/com/keyes/youtube/OpenYouTubePlayerActivity.java?r=3 I am successfully able to play videos on HTC and Motorola phones over 3G and Wifi. However, on Samsung Galaxy (Epic 4G) and Samsung Galaxy II phones I am only able to play using Wifi. 3G gives me this error: "Cannot play video. Sorry this video cannot be played." I

is there a way to play streaming youtube video from my activity?

一世执手 提交于 2019-11-29 18:14:10
Somewhere in my Android app I would like to play a youtube video, in my activity, in a small view. I'm trying to do this using VideoView , but no luck so far.. I wrote a simple activity, here is my code so far: public class MainView extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); VideoView videoView = (VideoView) findViewById(R.id.VideoView); MediaController mediaController = new MediaController(this); mediaController.setAnchorView(videoView); /*working good but IT'S NOT youtube*/ //Uri video =

Detect if a VideoVIew is buffering

匆匆过客 提交于 2019-11-29 17:01:26
问题 Does anyone know if it's possible to detect when a VideoView is buffering? I want to show a ProgressDialog when the video is buffering. So far I tried using a OnPreparedListener, but that only works when the video is first loaded. If a video is playing and the user moves the scrub bar to a different point the video is still "prepared" even though it is buffering. I also tried (I know this is awful) an AsyncThread that just busy waits on isPlaying(): private class BufferTask extends AsyncTask

How to capture screenshot or video frame of VideoView in Android

最后都变了- 提交于 2019-11-29 15:32:20
I've tried the following tutorial from this blog ( http://android-er.blogspot.kr/2013/05/get-current-frame-in-videoview-using.html ), which shows how to capture a video frame using MediaMetadataRetriever from a video source. However , it only works if the video is located locally on the phone. Is there a way to capture a video frame while the VideoView is streaming the video over IP? I have found a solution to this problem. It appears that the VideoView does not allow this because of low-level hardware GPU reasons while using a SurfaceView. The solution is to use a TextureView and use a

Playing encrypted video files using VideoView

只愿长相守 提交于 2019-11-29 14:41:58
问题 Does android native "VideoView" video rendering widget plays encrypted video files? And if yes then how to play it and what all the APIs. I have gone through this link i don't find anything related playing encrypted video. Is it that i need to decrypt my video and then pass it to VideoView? 回答1: VideoView can't play an encrypted video, you have to decrypt it yourself. There are roughly two ways: generate a temporary clear file from the encrypted one, but this has some inconveniences: a delay

Editing android VideoView frames

丶灬走出姿态 提交于 2019-11-29 13:47:36
Environment: Nexus 7 Jelly Bean 4.1.2 Problem: I'm trying to make a Motion Detection application that works with RTSP using VideoView. I wish that there was something like an onNewFrameListener videoView.onNewFrame(Frame frame) I've tried to get access to the raw frames of an RTSP stream via VideoView but couldn't find any support for that in the Android SDK. I found out that VideoView encapsulates the Android's MediaPlayer class. So i dived into the media_jni lib to try and find a way to access the raw frames, But couldn't find the byte buffer or whatever that represents a frame. Question:

Android 4.1 - RTSP using VideoView and MediaController

蹲街弑〆低调 提交于 2019-11-29 12:35:06
问题 Developing a simple app to play a RTSP stream on Android 4.1, but unable to do so Update I am able Able to play if I use BigBuckBunny_115k.mov Uri video = Uri.parse("rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov"); BUT I tried with lot of RTSP streams mentioned here and here, but none worked :( ****Problem: I could not see any stream on my phone, only black screen is visible.. After some time, a dialog box appears "Can't play this video". I tried with many RTSP streams, but same result,

java.lang.StringIndexOutOfBoundsException while playing video in videoView : Android v 4.2.1

会有一股神秘感。 提交于 2019-11-29 09:14:01
I am getting this crash when I play video on videoView in Android version 4.2.1. I found this out specifically on Micromax Canvas A210 device. It is not showing any message where the error is occurring. Is this a bug or something wrong in application? The crash log is as below: 09-18 11:05:53.245: E/AndroidRuntime(2323): FATAL EXCEPTION: main 09-18 11:05:53.245: E/AndroidRuntime(2323): java.lang.StringIndexOutOfBoundsException: length=11; regionStart=0; regionLength=-1 09-18 11:05:53.245: E/AndroidRuntime(2323): at java.lang.String.startEndAndLength(String.java:583) 09-18 11:05:53.245: E