I used the following code to play the video. It is working properly.
videoView = (VideoView) findViewById(R.id.VideoView);
File f=new File(Environment.getExternalStorageDirectory(), "words/"+videoname);
Uri video = Uri.parse(f.getAbsolutePath());
videoView.setVideoURI(video);
videoView.start();
But sometimes a few specific files starts to play and almose at the end of the video, it is giving error with following msg.
Cannot play video
Sorry, this video cannot be played
This is happening only when I am trying it Motorola Droid.
In the logcate it is giving following error.
04-16 11:46:12.244: WARN/MediaPlayer(7541): info/warning (1, 44)
04-16 11:46:12.244: INFO/MediaPlayer(7541): Info (1,44)
04-16 11:46:12.244: DEBUG/MediaPlayer(7541): getMetadata
04-16 11:46:12.268: DEBUG/AudioHardwareMot(7788): AudioMgr:Output 0xb538 exiting standby
04-16 11:46:14.018: WARN/AudioSystem(7112): AudioFlinger server died!
04-16 11:46:14.018: WARN/AudioSystem(7112): AudioPolicyService server died!
04-16 11:46:14.018: INFO/ServiceManager(1040): service 'media.audio_flinger' died
04-16 11:46:14.018: INFO/ServiceManager(1040): service 'media.player' died
04-16 11:46:14.018: INFO/ServiceManager(1040): service 'media.camera' died
04-16 11:46:14.018: INFO/ServiceManager(1040): service 'media.audio_policy' died
04-16 11:46:14.018: WARN/MediaPlayer(7541): MediaPlayer server died!
04-16 11:46:14.018: ERROR/MediaPlayer(7541): error (100, 0)
04-16 11:46:14.018: ERROR/MediaPlayer(7541): Error (100,0)
04-16 11:46:14.018: DEBUG/VideoView(7541): Error: 100,0
04-16 11:46:14.557: INFO/(7802): ServiceManager: 0xad80
But the same file is playing without any problem in other device. What may the problem?
Related
I'm trying to play video from the URL. Everything seems fine in the first few minutes, but then it crashes and the message "Can't Play Video" occurs. My code:
videoView.setVisibility(View.VISIBLE);
videoView.setVideoPath(url);
videoView.setMediaController(mediaController);
videoView.seekTo(time);
videoView.start();
Logcat:
2020-04-03 22:02:29.572 25409-25409/com.modyf.anime_app W/InputTransport: Slow Input: 152ms so far, channel 'ClientState{7a1b727 uid 10348 pid 25409} (server)' publisher ~ publishKeyEvent: seq=1, deviceId=4, source=0x101, action=0x0, flags=0x8, keyCode=25, scanCode=114, metaState=0x0, repeatCount=0,downTime=101580658000000, eventTime=101580658000000
2020-04-03 22:03:54.751 25409-25421/com.modyf.anime_app W/MediaHTTPConnection: readAt 25214561 / 16799 => java.net.ProtocolException: unexpected end of stream
2020-04-03 22:05:11.419 25409-25421/com.modyf.anime_app W/MediaPlayerNative: info/warning (804, -1004)
2020-04-03 22:05:11.475 25409-25422/com.modyf.anime_app E/MediaPlayerNative: error (1, -1004)
2020-04-03 22:05:11.476 25409-25409/com.modyf.anime_app E/MediaPlayer: Error (1,-1004)
2020-04-03 22:05:11.476 25409-25409/com.modyf.anime_app D/VideoView: Error: 1,-1004
2020-04-03 22:05:11.604 25409-25439/com.modyf.anime_app W/Adreno-EGL: <qeglDrvAPI_eglGetConfigAttrib:612>: EGL_BAD_ATTRIBUTE
2020-04-03 22:05:11.606 25409-25439/com.modyf.anime_app D/vndksupport: Loading /vendor/lib64/hw/gralloc.msm8937.so from current namespace instead of sphal namespace.
i am trying to play youtube videos in videoview by using rtsp url but i am getting "Can't play this error" i am using this code to play video in videoview
String SrcPath = "rtsp://v5.cache1.c.youtube.com/CjYLENy73wIaLQnhycnrJQ8qmRMYESARFEIJbXYtZ29vZ2xlSARSBXdhdGNoYPj_hYjnq6uUTQw=/0/0/0/video.3gp";
VideoView myVideoView = (VideoView)findViewById(R.id.myvideoview);
myVideoView.setVideoURI(Uri.parse(SrcPath));
myVideoView.setMediaController(new MediaController(this));
myVideoView.requestFocus();
myVideoView.start();
this is my logcat error
01-14 10:41:26.844: D/libEGL(2643): loaded /system/lib/egl/libEGL_tegra.so
01-14 10:41:26.914: D/libEGL(2643): loaded /system/lib/egl/libGLESv1_CM_tegra.so
01-14 10:41:26.974: D/libEGL(2643): loaded /system/lib/egl/libGLESv2_tegra.so
01-14 10:41:27.024: D/OpenGLRenderer(2643): Enabling debug mode 0
01-14 10:41:27.204: D/dalvikvm(2643): GC_FOR_ALLOC freed 225K, 4% free 7886K/8152K, paused 27ms, total 27ms
01-14 10:41:27.634: D/MediaPlayer(2643): Couldn't open file on client side, trying server side
01-14 10:41:27.684: W/MediaPlayer(2643): info/warning (701, 0)
01-14 10:42:40.964: E/MediaPlayer(2643): error (1, -2147483648)
01-14 10:42:40.964: E/MediaPlayer(2643): Error (1,-2147483648)
01-14 10:42:40.964: D/VideoView(2643): Error: 1,-2147483648
could you please help me for this issues..
I have some videos, which plays from http, but won't play from sdcard. Video is absolutely identical. Log cat is:
02-04 11:17:21.139: E/PlayerDriver(24273): Creating Non-Tunnel mode playback - uncompressed MIO
02-04 11:17:21.219: E/QCvdec(24273): get_parameter: unknown param 0ff7a347
02-04 11:17:21.219: W/MediaPlayer(15066): info/warning (1, 26)
02-04 11:17:21.229: I/MediaPlayer(15066): Info (1,26)
02-04 11:17:21.229: W/QCvdec(24273): ======================================================================
02-04 11:17:21.229: W/QCvdec(24273): Open Max Statistics
02-04 11:17:21.229: W/QCvdec(24273): ======================================================================
02-04 11:17:21.229: W/QCvdec(24273): empty this buffer rate = NaN
02-04 11:17:21.229: W/QCvdec(24273): empty this buffer total time = 0
02-04 11:17:21.229: W/QCvdec(24273): empty this buffer count = 0
02-04 11:17:21.229: W/QCvdec(24273): ======================================================================
02-04 11:17:21.229: E/PlayerDriver(24273): Command PLAYER_PREPARE completed with an error or info PVMFErrNoResources
02-04 11:17:21.229: E/MediaPlayer(15066): error (1, -15)
02-04 11:17:21.239: E/MediaPlayer(15066): Error (1,-15)
02-04 11:17:21.239: D/VideoView(15066): Error: 1,-15
02-04 11:17:21.239: W/PlayerDriver(24273): PVMFInfoErrorHandlingComplete
But I think this is not completely log, because in Android source I found:
DEBUG_PRINT_LOW("\n get_parameter returning Height %d , Width %d \n",
m_height, m_width);
I don't find, how to enable low log.
On other devices (like Samsung galaxy S3, android 4.1.3) videos plays from http and sdcard. I tried to convert video into smaller size, so 720x480 is biggest size which plays. Can be problem in video size?
Also I checked, if video don't play from VideoView, it also is not playable with default android media player application.
My phone is Samsung galaxy ace (android 2.3.5)
Maybe someone has same error and founded solution? Or could someone tell next steps for debugging this issue deeper?
I'm trying to play RTSP link in micromax tablet android version 4.0.3,kernel version-3.0.8+inet-soft#inet#1.Same link is playing in another phone(like lava and Dell)but in micromax tab when we want to play it throws error.........
Code:
myVideoView.setVideoURI(Uri.parse(url));
progressDialog.setCancelable(true);
myVideoView.setMediaController(new MediaController(this));
myVideoView.requestFocus();
Error:
W/AudioSystem( 1170): AudioFlinger server died!
W/IMediaDeathNotifier( 1170): media server died
E/MediaPlayer( 1170): error (100, 0)
E/MediaPlayer( 1170): Error (100,0)
D/VideoView( 1170): Error: 100,0
W/IMediaDeathNotifier( 145): media server died
I/ServiceManager( 80): service 'media.audio_flinger' died
I/ServiceManager( 80): service 'media.player' died
I/ServiceManager( 80): service 'media.camera' died
I/ServiceManager( 80): service 'media.audio_policy' died
W/AudioSystem( 145): AudioFlinger server died!
W/AudioSystem( 145): AudioPolicyService server died!
I/ServiceManager( 145): Waiting for service media.player...
I am getting warning messages in the log file. I continuously play a looping sound during gameplay (and adjust the volume). The log message seems to be produced when the sound is being looped (every 2 secs or so). It is a normal .wav file and it plays as expected.
squishSound = MediaPlayer.create(context, R.raw.juicy);
squishSound.setVolume(0, 0);
squishSound.setLooping(true);
squishSound.start();
This produces a log message every 2 seconds: -
05-16 15:31:23.745:
WARN/MediaPlayer(10356): info/warning
(1, 44)
05-16 15:31:26.112:
WARN/MediaPlayer(10356): info/warning
(1, 44)
05-16 15:31:28.479:
WARN/MediaPlayer(10356): info/warning
(1, 44)
05-16 15:31:30.846:
WARN/MediaPlayer(10356): info/warning
(1, 44)
05-16 15:31:33.221:
WARN/MediaPlayer(10356): info/warning
(1, 44)
05-16 15:31:35.589:
WARN/MediaPlayer(10356): info/warning
(1, 44)
I have searched, but I can't find any reason why this would happen.
Any ideas?
This is OK, and probably notifies that the file is replayed.