Потоковая передача Android MediaPlayer из PHP Redirect не работает!

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!

5
задан Guilherme 25 August 2010 в 21:35
поделиться