video play error

All your problems with Audio, Video and Images.

video play error

Postby nithin11 » Sun May 17, 2009 7:39 am

HI to all

i am recorded a video with .mp4 format... and try to play on
emulator through
sdcard as well as streaming... But i will give error like cannot play
the video.... I am
using sdk 1.5... Can anyone help me what is wrong with my code...

sdcard:-
setContentView(R.layout.main);
myVideo=(VideoView)findViewById(R.id.video);
myVideo.setVideoPath("/sdcard/video.mp4");
mc=new MediaController(this);
myVideo.start();
mc.setMediaPlayer(myVideo);
myVideo.setMediaController(mc);
myVideo.requestFocus();

video streaming:-

private String path = "http://192.168.14.6:8080/qvisdvr/
control/video.mp4";
private VideoView mVideoView;

@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.videoview);
mVideoView = (VideoView) findViewById(R.id.surface_view);

if (path == "") {
// Tell the user to provide a media file URL/path.
Toast.makeText(
demo.this,
"Please edit VideoViewDemo Activity, and set path"
+ " variable to your media file URL/path",
Toast.LENGTH_LONG).show();

}
else
{
mVideoView.setVideoURI(Uri.parse(path));
// mVideoView.start();
mVideoView.setMediaController(new MediaController(this));
mVideoView.requestFocus();
}

Thank You
Nithin N V
Nithin
nithin11
Developer
Developer
 
Posts: 36
Joined: Mon Mar 09, 2009 5:14 am
Location: India

Top

Postby arnouf » Fri May 22, 2009 11:48 am

Could you tell us the error message that you have? trace logs
arnouf
Developer
Developer
 
Posts: 28
Joined: Mon Jan 21, 2008 9:07 pm

video play error

Postby nithin11 » Fri May 22, 2009 12:02 pm

Thanks for reply

In both cases like in sdcard and as well as while streaming its shows error message as
"Cannot Play the video".... How can i resolve....?
Nithin
nithin11
Developer
Developer
 
Posts: 36
Joined: Mon Mar 09, 2009 5:14 am
Location: India

Postby arnouf » Fri May 22, 2009 12:25 pm

Can you give us traces from LogCat please...
arnouf
Developer
Developer
 
Posts: 28
Joined: Mon Jan 21, 2008 9:07 pm

video play error

Postby nithin11 » Fri May 22, 2009 4:31 pm

HI...

In logcat shows as follows

05-22 13:48:12.804: WARN/KeyCharacterMap(205): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
05-22 13:48:13.805: DEBUG/dalvikvm(92): GC freed 97 objects / 5088 bytes in 76ms
05-22 13:48:13.924: DEBUG/dalvikvm(92): GC freed 3 objects / 72 bytes in 68ms
05-22 13:48:18.195: DEBUG/dalvikvm(205): GC freed 928 objects / 57056 bytes in 82ms
05-22 13:48:19.605: INFO/ActivityManager(51): Starting activity: Intent { action=android.intent.action.MAIN categories={android.intent.category.LAUNCHER} flags=0x10200000 comp={mypack.mydemos/mypack.mydemos.demo} }
05-22 13:48:19.995: INFO/MediaPlayer-JNI(205): prepareAsync: surface=0x1d2060 (id=1)
05-22 13:48:20.224: INFO/ActivityManager(51): Displayed activity mypack.mydemos/.demo: 615 ms
05-22 13:48:20.314: INFO/ARMAssembler(51): generated scanline__00000077:03545404_00000A04_00000000 [ 29 ipp] (51 ins) at [0x26f458:0x26f524] in 5107901 ns
05-22 13:48:20.524: ERROR/MediaPlayer(205): Error (-1,0)
05-22 13:48:20.524: DEBUG/VideoView(205): Error: -1,0
05-22 13:48:20.674: WARN/PlayerDriver(25): PVMFInfoErrorHandlingComplete
05-22 13:48:25.864: DEBUG/dalvikvm(92): GC freed 145 objects / 6048 bytes in 80ms
Nithin
nithin11
Developer
Developer
 
Posts: 36
Joined: Mon Mar 09, 2009 5:14 am
Location: India

Postby arnouf » Fri May 22, 2009 4:36 pm

Check if you don't need to call prepare() method after set the data source (like MediaPlayer)...below my source code
mp = new MediaPlayer();
mp.setDisplay(vv.getHolder());
mp.setDataSource("/sdcard/tmpVid.3gp");
mp.prepare();
mp.start();

vv is my VideoView.
arnouf
Developer
Developer
 
Posts: 28
Joined: Mon Jan 21, 2008 9:07 pm

Top

play video error

Postby nithin11 » Fri May 22, 2009 4:43 pm

HI..

3gp works fine... I want play .mp4 file....
Nithin
nithin11
Developer
Developer
 
Posts: 36
Joined: Mon Mar 09, 2009 5:14 am
Location: India

Postby Luki » Mon Jul 27, 2009 11:54 am

Hi
Is this topic solved or still a problem? I also have problems with different movie clips to play (3gp and mp4) and cannot find a filetype that works reliable. Some files play, some files give errors.
Is there anybody who has a reliable way to encode video-files for Android?

Cheers
Luki
Developer
Developer
 
Posts: 32
Joined: Fri Jul 24, 2009 12:59 pm

Postby nithin11 » Wed Jul 29, 2009 5:21 am

Hi...

The latest sdk that is 1.5 supports some videos... Just i got the information that
the .3gp file which contains header .3gp5 atom will supported for streaming... and all
.m4v videos are supported.. But .mp4 files are not supported for video streaming.. But
plays through sdcard... May coming sdk may support this videos... and also i tried in only
sdk not in real mobile...

Thank You
Nithin
nithin11
Developer
Developer
 
Posts: 36
Joined: Mon Mar 09, 2009 5:14 am
Location: India

Postby husky » Thu Jul 30, 2009 10:43 am

Could anyone play streaming on emulator?

i can only play streaming on real android device
husky
Once Poster
Once Poster
 
Posts: 1
Joined: Thu Jul 30, 2009 9:39 am

Postby nithin11 » Fri Jul 31, 2009 7:37 am

Hi...

I tried video streaming.....
Nithin
nithin11
Developer
Developer
 
Posts: 36
Joined: Mon Mar 09, 2009 5:14 am
Location: India

Postby Luki » Fri Jul 31, 2009 11:32 am

I am not able to play stream on the emulator, but on a real device (G1 with Android 1.5) it works. Not with all streams, but with certain servers it works. Well, unfortunately it does not work to stream from my own Computer with VLC to the Android device. Does anybody made it work streaming from his own computer?

This are rstp-URL's were I can stream from with the G1 (note: some adresses are sometimes down):

rtsp://media-us-1.soundreach.net/slcnlive.sdp
rtsp://digitalbroadcast.streamguys.net/live-studio.sdp


You can use this adresses for testing purposes.

Cheers
Luki
Developer
Developer
 
Posts: 32
Joined: Fri Jul 24, 2009 12:59 pm

Postby Beros_ » Fri Jan 29, 2010 5:00 pm

Does anybody knows how to set video playback speed, so that video could play faster or slower or backwards. For example 120% of speed, 200%,20%, -30%.. ?
Beros_
Freshman
Freshman
 
Posts: 7
Joined: Fri Jan 29, 2010 4:29 pm
Location: Croatia

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: Exabot [Bot] and 26 guests