android-videoview

How to play multiple video in different video view in one activity

谁说胖子不能爱 提交于 2019-12-01 18:34:50
问题 Sample Code: How to play the two video in one activity public class Two_videos extends Activity { VideoView video1, video2; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.two_video); VideoView video1= (VideoView) findViewById(R.id.video1); video1.setVideoPath("/mnt/sdcard/Movies/com.bnb.giggle/IMG_20130415184609.mp4"); video1.start(); VideoView video2= (VideoView) findViewById(R.id.video2); video2.setVideoPath("/mnt

MediaMetadataRetrieverJNI(14060): getFrameAtTime: videoFrame is a NULL pointer(Android)

♀尐吖头ヾ 提交于 2019-12-01 18:18:40
问题 I am creating thumbnails by videos frame using MediaMetadataRetriever but I am getting this message in Logcat : E/MediaMetadataRetrieverJNI(14060): getFrameAtTime: videoFrame is a NULL pointer Here is my code: MediaMetadataRetriever retriever = new MediaMetadataRetriever(); try { Uri videoURI = Uri.parse("android.resource://"+getPackageName()+"/"+R.raw.video_one); retriever = new MediaMetadataRetriever(); retriever.setDataSource(mContext, videoURI); Bitmap bitmap = retriever.getFrameAtTime

Android does not display m3u8 format in videoview, only sound

旧巷老猫 提交于 2019-12-01 18:14:06
I didn't use a real device, I was working on emulator. (Problem Solved) I am developing a live stream video application. I have so many live stream URLs which have *.m3u8 postfix. When I start the app, I can hear only sound but no video displaying. Video display area is always dark. I am waiting for your helpful suggestions to solve my problem. Regards. Some of my code: public class MainActivity extends Activity { private static ProgressDialog progressDialog; String videourl = "URL/playlist.m3u8"; VideoView videoView; @Override protected void onCreate(Bundle savedInstanceState) { super

How to play multiple video in different video view in one activity

我的未来我决定 提交于 2019-12-01 18:01:59
Sample Code: How to play the two video in one activity public class Two_videos extends Activity { VideoView video1, video2; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.two_video); VideoView video1= (VideoView) findViewById(R.id.video1); video1.setVideoPath("/mnt/sdcard/Movies/com.bnb.giggle/IMG_20130415184609.mp4"); video1.start(); VideoView video2= (VideoView) findViewById(R.id.video2); video2.setVideoPath("/mnt/sdcard/Movies/com.bnb.giggle/IMG_20130415184608.mp4"); video2.start(); } } cannot play two video same

Android videoview control is not displaying video, only audio is played

百般思念 提交于 2019-12-01 12:29:34
I am trying to play a video from a url in android, for this I am using videoview control in the fragment class, but while playing there is no video output only audio output is there, the video is in .mp4 format. I have done it the following way- VideoView vv; vv=(VideoView)view.findViewById(R.id.videoView1); String src="video path"; Uri uri=Uri.parse(src); getActivity().getWindow().setFormat(PixelFormat.TRANSLUCENT); MediaController mc=new MediaController(getActivity()); mc.setMediaPlayer(vv); vv.setMediaController(mc); vv.setVideoURI(uri); vv.requestFocus(); vv.start(); This is my xml code

getting PVMFErrContentInvalidForProgressivePlayback error while playing mp4 files on samsung devices

本小妞迷上赌 提交于 2019-12-01 11:07:46
I'm using classic VideoView implementation to play video on Android. Same mp4 file url works fine on HTC Desire. However it doesn't work on Samsung devices. Samsung Galaxy S1 and Samsung Galaxy Tab say: "Cannot play video. Unable to play video. Invalid streaming data" Samsung 5110 says: "Cannot play video. Sorry this video is not valid for streaming to this device" When I looked at mp4 file with a text editor, I realized that mdat tag is before moov . My question is how does it work on HTC whereas it doesn't on samsung devices. And I dont have any chances to change the format of mp4 files, so

How to play a video from url using videoview smoothly?

倖福魔咒の 提交于 2019-12-01 09:06:10
I have an activity which has a VideoView . It's playing video from url. What I am doing is for playing smoothly, I have put a ProgressDialog on the start of the activity. And dismisses it inside onPreparedListener so that it would play well and smoothly. But still It's not helping. The video is playing like playing for 10-20 sec and stops for 5-10sec and it keeps going. I have seen an application on Google play Workout Trainer in which if user will start to see the video its showing a horizontal progress bar which buffered the video and then play it smoothly whether it is a slow connection or

getting PVMFErrContentInvalidForProgressivePlayback error while playing mp4 files on samsung devices

两盒软妹~` 提交于 2019-12-01 08:38:47
问题 I'm using classic VideoView implementation to play video on Android. Same mp4 file url works fine on HTC Desire. However it doesn't work on Samsung devices. Samsung Galaxy S1 and Samsung Galaxy Tab say: "Cannot play video. Unable to play video. Invalid streaming data" Samsung 5110 says: "Cannot play video. Sorry this video is not valid for streaming to this device" When I looked at mp4 file with a text editor, I realized that mdat tag is before moov . My question is how does it work on HTC

How to play a video from url using videoview smoothly?

大兔子大兔子 提交于 2019-12-01 06:53:30
问题 I have an activity which has a VideoView . It's playing video from url. What I am doing is for playing smoothly, I have put a ProgressDialog on the start of the activity. And dismisses it inside onPreparedListener so that it would play well and smoothly. But still It's not helping. The video is playing like playing for 10-20 sec and stops for 5-10sec and it keeps going. I have seen an application on Google play Workout Trainer in which if user will start to see the video its showing a

Android Marshmallow “Can't play this video” error

一世执手 提交于 2019-12-01 06:36:24
I am in the process of upgrading an app to android 6.0. Everything seems to be alright except when trying to play certain videos from a remote source. They play just fine on our non Marshmallow devices (for specifics, I have a Galaxy S3 on 4.1.2 Jelly Bean that's playing the exact same video just fine, no issues). We've tested with multiple devices on 6.0, and the problem seems to be localized to just this OS. When trying to play a video in a simple videoview, I get an alert saying "Can't play this video". I had some problems with other videos on 4.1.2 in the past, and thought it may be a