views:

29

answers:

1

Hi,

The company I work for is developing an Android App that plays a video file from a URL on web. The video URL is a parameter for a PHP script that encode it properly and redirects to the encoded video as shown below:

header('Content-Type: video/'.$format);
header('Location:'.$output_video);

Where $output_video is the URL to the encoded video (it works if we use this URL in the browser) and $format is the video format.

But when I try executing the MediaPlayerDemo_Video from the API Demos using the streaming mode, I get an error like this:

MediaPlayer Command PLAYER INIT completed with an error or info PVMFErrCorrupt
MediaPlayer error (1. -10)
MediaPlayer Error (1.-10)

If we hard-code the URL and format in the PHP script, it also does not work out, but with a different error:

MediaPlayer info/warning (1. 28)
MediaPlayer Info (1 .28)

Does anyone have an idea on how to workaround this?

Thanks in advance!

A: 

the response is what file are you tryin to stream in your MediaPlayer, your URL must be for example something like ::

rtsp://v1.cache5.c.youtube.com/CjYLENy73wIaLQkUvSkxA_7UKxMYESARFEIJbXYtZ29vZ2xlSARSBXdhdGNoYIPXxZHky7m5Rgw=/0/0/0/video.3gp

(try with this URL)

using the rtsp protocol and a .3gp video file with the correct codecs supported for android .

Jorgesys