i'm trying following code playing video.
public class VidplayerActivity extends Activity {
private MediaController mc;
String LINK = "http://***/test.3gp"; // 5 mb
@Override
public void onCreate(Bundle savedInstanceState) {
try {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
VideoView vd = (VideoView) findViewById(R.id.delta);
Uri uri = Uri.parse(LINK);
mc = new MediaController(this);
vd.setMediaController(mc);
vd.setVideoURI(uri);
vd.start();
}
catch(Exception e) {
System.out.println(e.getStackTrace());
}
}
}
it shows "Sorry,this video is not valid for streaming to this device" in android 1.5 and 1.6. And the video details is below
EDIT:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/cvbcvb/Desktop/test.3gp':
Metadata:
major_brand : 3gp4 minor_version : 512 compatible_brands: isomiso23gp4
Duration: 00:03:00.04, start: 0.000000, bitrate: 150 kb/s
Stream #0.0(und): Video: h263, yuv420p, 176x144 [PAR 12:11 DAR
4:3], 138 kb/s, 25 fps, 25 tbr, 25 tbn, 29.97 tbc
Stream #0.1(und): Audio: amrnb, 8000 Hz, 1 channels, flt, 8 kb/s
[STREAM]
index=0
codec_name=h263
codec_long_name=H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2
codec_type=video
codec_time_base=1001/30000
codec_tag_string=s263
codec_tag=0x33363273
width=176
height=144
has_b_frames=0
sample_aspect_ratio=12:11
display_aspect_ratio=4:3
pix_fmt=yuv420p
r_frame_rate=25/1
avg_frame_rate=25/1
time_base=1/25
language=und
start_time=0.000000
duration=180.040000
nb_frames=4501
TAG:language=und
[/STREAM]
[STREAM]
index=1
codec_name=amrnb
codec_long_name=Adaptive Multi-Rate NarrowBand
codec_type=audio
codec_time_base=0/1
codec_tag_string=samr
codec_tag=0x726d6173
sample_rate=8000.000000
channels=1
bits_per_sample=0
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/8000
language=und
start_time=0.000000
duration=180.000000
nb_frames=9000
TAG:language=und
[/STREAM]