Error after 3gp video playback

All your problems with Audio, Video and Images.

Error after 3gp video playback

Postby Grafas » Sat Mar 26, 2011 10:55 am

Hi,
I'm playing 7s length video as splash screen. Video is played and afterwards I get error:
Sorry, this video cannot by played.

Why I'm getting the error after the playback?

Here is my activity:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. @Override
  2.         protected void onCreate(Bundle savedInstanceState) {
  3.                 super.onCreate(savedInstanceState);
  4.                 setContentView(R.layout.intro);
  5.                
  6.                 final VideoView videoView = (VideoView) findViewById(R.id.videoview);
  7.                 videoView.setVideoURI(Uri.parse("android.resource://com.my.package/" + R.raw.intro));
  8.                 videoView.setOnCompletionListener(new OnCompletionListener() {
  9.                        
  10.                         @Override
  11.                         public void onCompletion(MediaPlayer mp) {
  12.                                 Intent mainMenuIntent = new Intent(SplashVideoActivity.this, MainMenuActivity.class);
  13.                                 startActivity(mainMenuIntent);
  14.                                 SplashVideoActivity.this.finish();
  15.                         }
  16.                 });
  17.                 videoView.setOnTouchListener(new OnTouchListener() {
  18.                        
  19.                         @Override
  20.                         public boolean onTouch(View v, MotionEvent event) {
  21.                                 videoView.seekTo(videoView.getDuration());
  22.                                 return true;
  23.                         }
  24.                 });
  25.                 videoView.start();
  26.         }
Parsed in 0.033 seconds, using GeSHi 1.0.8.4
Grafas
Junior Developer
Junior Developer
 
Posts: 12
Joined: Mon Jul 19, 2010 8:40 am

Top

Re: Error after 3gp video playback

Postby strider2023 » Fri Apr 01, 2011 8:11 am

Does it go to the next activity before displaying the error?
strider2023
Senior Developer
Senior Developer
 
Posts: 126
Joined: Tue Mar 02, 2010 6:34 am
Location: Chennai, India

Re: Error after 3gp video playback

Postby Grafas » Fri Apr 01, 2011 8:30 am

No, error is displayed at the end of the video, just before OnCompletionListener is called.
When touch event is captured and it seeks to the en of the video - no error is displayed.
Grafas
Junior Developer
Junior Developer
 
Posts: 12
Joined: Mon Jul 19, 2010 8:40 am

Re: Error after 3gp video playback

Postby Neo Design » Thu Jun 23, 2011 1:07 pm

I think it seems to be corrupted file of video. If its not then its question to display error after completion of video. I think it should be displayed after completion of video. Thanks.
Neo Design
Junior Developer
Junior Developer
 
Posts: 12
Joined: Tue Jun 07, 2011 10:27 am

Re: Error after 3gp video playback

Postby Grafas » Thu Jun 23, 2011 1:11 pm

Well, I know for sure, that video is not corrupted, so I just catch the error and ignore it... I figured it has something to do with codec as same video encoded differently plays without any problems, but then quality is very poor.
Grafas
Junior Developer
Junior Developer
 
Posts: 12
Joined: Mon Jul 19, 2010 8:40 am

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 10 guests