24 messages in com.googlegroups.android-beginnersRe: Basic Video Example| From | Sent On | Attachments |
|---|---|---|
| GoneFishing | 27 Feb 2008 14:12 | |
| Zach Hobbs | 27 Feb 2008 21:09 | |
| GoneFishing | 02 Mar 2008 06:14 | |
| Cezar Augustus Signori | 03 Mar 2008 02:45 | |
| jml307 | 04 Mar 2008 19:06 | |
| Cezar Augustus Signori | 05 Mar 2008 07:48 | |
| jml307 | 05 Mar 2008 19:58 | |
| GoneFishing | 10 Mar 2008 17:24 | |
| Muthu Ramadoss | 11 Mar 2008 05:42 | |
| GoneFishing | 12 Mar 2008 13:02 | |
| Megha Joshi | 12 Mar 2008 16:38 | |
| GoneFishing | 12 Mar 2008 19:01 | |
| Megha Joshi | 12 Mar 2008 19:05 | |
| GoneFishing | 12 Mar 2008 19:29 | |
| Megha Joshi | 13 Mar 2008 12:14 | |
| GoneFishing | 13 Mar 2008 12:38 | |
| GoneFishing | 13 Mar 2008 12:41 | |
| Megha Joshi | 13 Mar 2008 13:36 | |
| GoneFishing | 13 Mar 2008 15:34 | |
| Megha Joshi | 13 Mar 2008 16:35 | |
| GoneFishing | 15 Mar 2008 12:44 | |
| Megha Joshi | 15 Mar 2008 15:42 | |
| GoneFishing | 16 Mar 2008 17:39 | |
| GoneFishing | 17 Mar 2008 09:45 |
| Subject: | Re: Basic Video Example![]() |
|---|---|
| From: | GoneFishing (Linu...@gmail.com) |
| Date: | 03/13/2008 12:38:35 PM |
| List: | com.googlegroups.android-beginners |
try: http://www.freewebs.com/videoexample/test.mpeg I believe this is what you mean by 'http' streaming.
On Mar 13, 3:15 pm, "Megha Joshi" <mjo...@google.com> wrote:
Hi Gary,
The URL that you are using is forwarded to an embedded page in which the real stream video path is rtsp://ia300130.us.archive.org:554/1/items/GaryKild/GaryKild_64kb.mp4<http://www.archive.org/stream/GaryKild/GaryKild_64kb.mp4>
The mediaPlayer does not support this kind of embedding, you need the real streaming path. The rtsp:// is not supported on Android, only http:// streaming of mp4 files is supported.
I will try to post a sample code as soon as I can get hold of a public streaming media server, to use a test link. Meanwhile, if you have such a streaming http mp4 link, you can forward it to make it easier for me :)
Thanks, Megha
On Wed, Mar 12, 2008 at 7:30 PM, GoneFishing <Linu...@gmail.com> wrote:
Oh. Yes, it is this web address: http://www.archive.org/stream/GaryKild/GaryKild_64kb.mp4 for an example, of course.
On Mar 12, 10:06 pm, "Megha Joshi" <mjo...@google.com> wrote:
Hi,
I was referring to this url in your code:
private String url = "random mpg";
Is this a web url?
Thanks, Megha
On Wed, Mar 12, 2008 at 7:01 PM, GoneFishing <Linu...@gmail.com>
wrote:
I don't understand. My MPG/MP4 is on the web only. No copy of it exists/can exist on the physical Android disk.(For my apps purpose) What would I put in <path to your .mpg>? Isn't the URL the web address to my MPG?
On Mar 12, 7:39 pm, "Megha Joshi" <mjo...@google.com> wrote:
Hi,
One of the issues is that you did not specify the path to you .mpg correctly. This line:
vv.setVideoURI(Uri.parse(url));
needs to be updated as follows:
vv.setVideoURI(Uri.parse("file:///sdcard/<path to your .mpg>" +
url));
Try correcting that and see if it works.
Thanks, Megha
On Wed, Mar 12, 2008 at 1:03 PM, GoneFishing <Linu...@gmail.com
wrote:
Your code is interesting, but I'd perfer to stick to the basic VideoView. I can't figure out what is wrong with my code... On Mar 11, 8:42 am, Muthu Ramadoss <muth...@gmail.com>
wrote:
You can do this, also highly inefficient.
// open the raw resource, get the stream InputStream stream =
getResources().openRawResource(R.raw.v747); // create a temp file from stream and set path vv.setVideoPath
(createFileFromStream(stream));
// method to create a temp file from InputStream private String createFileFromStream(InputStream stream) throws IOException { if (stream == null) { throw new IOException("stream is null"); } File temp = File.createTempFile("mediaplayertmp", "dat"); String tempPath = temp.getAbsolutePath(); FileOutputStream out = new FileOutputStream(temp); byte buf[] = new byte[128]; do { int numread = stream.read(buf); if (numread <= 0) { break; } out.write(buf, 0, numread); } while (true); try { stream.close(); } catch (IOException ex) { Log.e("MyAwardWinningAndroidActivity", "error: " + ex.getMessage(), ex); } return tempPath; }
-- Thanks.
Muthu
Ramadosshttp://intellibitz.comhttp://groups.google.com/group/android-chennaih...
+91 44 22476750
We develop innovative solutions for mobile handsets, using




