Snowcrash, thanks for pointing this out! To elaborate on "reasonably" interleaved... What determines "reasonably" is dependent on many factors like network bandwidth, network latency, and buffer size. In general you want to have a chunk of audio for a certain unit of time followed by a corresponding chunk of video for the same amount of time, your video creation software should be formatting the stream that for you anyway.
The next question is how large a unit of playback time this should be. To repeat, the best answer to this question is dependent on network conditions, buffer size, and bitrate, factors which may change over time and be different from Android device to Android device. Having said all that, a good guideline is to packetize your stream into 0.5 second parts. Your results may vary and I encourage you to test for your actual applications, but this is a reasonable place to start experimenting. Regards, Justin Android Team @ Google On Aug 19, 1:03 pm, "Megha Joshi" <[EMAIL PROTECTED]> wrote: > Yes, you can use QuickTime Pro to create progressive streamable format: > Steps below: > > 1. Open the video file in Quick Time Pro. > > 2. Goto File > Export > > 3. Select type as 'Movie to 3G' > > 4. Click Options > > 5. Select file format as 3gpp > > 6. In the drop down menu below the file format, select 'Streaming' from the > list of available options (Audio, Video, Text, Streaming, Advanced) > > 7. Select the required maximum packet size and maximum packet duration > > 8. Click Save > > On Tue, Aug 19, 2008 at 6:44 AM, snowcrash <[EMAIL PROTECTED]> wrote: > > > Hi there, > > > your video filehttp://www.jsharkey.org/downloads/dailytest.3gp > > doesn't conform to the specifications stated in the source code: > > > "Mediaplayer can only play "progressive streamable contents" which > > basically means: > > 1. the movie atom has to precede all the media data atoms. > > 2. The clip has to be reasonably interleaved." > > > For your file, ' strings dailytest.3gp | grep -n "mdat\|moov" ' > > returns: > > > 4:k:mdat > > 2773:moov > > > which is a violation of (1.) where 'moov' has to precede any 'mdat'. > > But what 'reasonably interleaved' means is still mysterious. > > > Perhaps someone from Google reading here can shed some light on this. > > > Regards, > > 131071 > > > On 19 Aug., 07:07, Jeffrey Sharkey <[EMAIL PROTECTED]> wrote: > > > Also, just to follow-up on this more, I installed lighttpd locally on > > > the same computer as the emulator. I also made sure to add the 3GP > > > video mime-type. > > > > This way, I could try using "http://10.0.2.2/dailytest.3gp" as my test > > > URL from the emulator, which should bypass even the emulator's bridge > > > NAT. > > > > Still came back with the same errors. :( > > > > Interestingly, the player only made a HEAD request this time, and > > > didn't begin streaming the data with a GET request. Here is the HEAD > > > details from the lighttpd server, showing the correct mimetype: > > > > HTTP/1.1 200 OK > > > Content-Type: video/3gpp > > > Accept-Ranges: bytes > > > ETag: "60758872" > > > Last-Modified: Tue, 19 Aug 2008 04:55:39 GMT > > > Content-Length: 229635 > > > Date: Tue, 19 Aug 2008 05:06:40 GMT > > > Server: lighttpd/1.4.19 > > > > j > > > > On Aug 18, 10:51 pm, Jeffrey Sharkey <[EMAIL PROTECTED]> > > > wrote: > > > > > I'm using code almost verbatim out of the VideoViewDemo example. > > > > Below is the exact code to be sure, and I've tried with both > > > > setVideoPath() and setVideoURI(). > > > > > Looking at wireshark during this process, it seems that the both > > > > YouTube and my server are spewing back plenty of video data, but the > > > > VideoView somehow never gets it, or doesn't know what to do with it. > > > > With RTSP, it takes about 5-10 seconds before a "Cannot play video: > > > > Sorry, this video cannot be played." error message appears, but with > > > > the HTTP link it appears almost instantly. > > > > > For Internet traffic, I'm behind a NAT. However, for the HTTP > > > > example, I've also tried a local Apache server that doesn't go through > > > > a NAT. (Unless the emulator itself counts as another NAT.) > > > > > === VideoViewDemo.java === > > > > > import android.app.Activity; > > > > import android.graphics.PixelFormat; > > > > import android.net.Uri; > > > > import android.os.Bundle; > > > > import android.util.Log; > > > > import android.widget.MediaController; > > > > import android.widget.Toast; > > > > import android.widget.VideoView; > > > > > public class VideoViewDemo extends Activity { > > > > > private VideoView mVideoView; > > > > > private String path = "http://www.jsharkey.org/downloads/dailytest > > . > > > > 3gp"; > > > > //private String path = "rtsp://ehug.rtsp-youtube.l.google.com/ > > > > CkELENy73wIaOAnUq- > > > btqFy58BMYDSANFEIJbXYtZ29vZ2xlSARSB2RldGFpbHNaB2RldGFpbHNgz9u3rfm40Np6DA==/ > > > > 0/0/0/video.3gp"; > > > > > @Override > > > > public void onCreate(Bundle icicle) { > > > > super.onCreate(icicle); > > > > setContentView(R.layout.videoview); > > > > mVideoView = (VideoView) findViewById(R.id.surface_view); > > > > > //mVideoView.setVideoPath(path); > > > > mVideoView.setVideoURI(Uri.parse(path)); > > > > mVideoView.setMediaController(new MediaController(this)); > > > > mVideoView.requestFocus(); > > > > > } > > > > > } > > > > > === videoview.xml === > > > > > <?xml version="1.0" encoding="utf-8"?> > > > > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/ > > > > android" > > > > android:orientation="vertical" > > > > android:layout_width="fill_parent" > > > > android:layout_height="fill_parent" > > > > > <VideoView > > > > android:id="@+id/surface_view" > > > > android:layout_width="320px" > > > > android:layout_height="240px" > > > > /> > > > > > </LinearLayout> > > > > > === AndroidManifest.xml === > > > > > <?xml version="1.0" encoding="utf-8"?> > > > > <manifest xmlns:android="http://schemas.android.com/apk/res/android" > > > > package="org.jsharkey.videotest"> > > > > <application android:icon="@drawable/icon"> > > > > <activity android:name=".VideoViewDemo" android:label="@string/ > > > > app_name"> > > > > <intent-filter> > > > > <action android:name="android.intent.action.MAIN" /> > > > > <category > > > > android:name="android.intent.category.LAUNCHER" /> > > > > </intent-filter> > > > > </activity> > > > > </application> > > > > > <uses-permission android:name="android.permission.INTERNET" /> > > > > <uses-permission android:name="android.permission.WAKE_LOCK" /> > > > > </manifest> > > > > > On Aug 18, 10:31 pm, "Justin (Google Employee)" <[EMAIL PROTECTED]> > > > > wrote: > > > > > > Code for this would be helpful. Can you provide yours for setting up > > > > > the VideoView, loading, and playing the file? > > > > > > Cheers, > > > > > Justin > > > > > Android Team @ Google > > > > > > On Aug 18, 9:03 pm, Jeffrey Sharkey <[EMAIL PROTECTED]> > > wrote: > > > > > > > Hey there, I'm trying to play 3GP-encoded video using the > > > > > > VideoViewDemo example. > > > > > > > It will play local 3GP videos that have been adb push'ed to the > > > > > > device, specifically to: > > > > > > /data/data/[package]/files/dailytest.3gp > > > > > > > However, it refuses to play remote 3GP video from an Apache server, > > > > > > specifically with the error message: > > > > > > > 08-19 03:36:35.785: INFO/ActivityManager(56): Displayed activity > > > > > > [package]/.VideoActivity: 492 ms > > > > > > 08-19 03:36:50.965: ERROR/MediaPlayer(2000): Error (-1,0) > > > > > > 08-19 03:36:50.965: DEBUG/VideoView(2000): Error: -1,0 > > > > > > > In addition, it refuses to play back YouTube 3GP-encoded RTSP video > > > > > > URLs with the same error, sometimes with the following warning > > > > > > attached: > > > > > > > 08-19 03:51:19.055: WARN/PlayerDriver(859): > > > > > > PVMFInfoErrorHandlingComplete > > > > > > > These same errors occur whether using setVideoPath() or > > > > > > setVideoURI(). The Apache server records that VideoView tries to > > > > > > watch the video: > > > > > > > 192.168.254.240 - - [18/Aug/2008:21:36:25 -0600] "HEAD /dump/flv/ > > > > > > dailytest.3gp HTTP/1.0" 200 - "-" "PVCore/5.02.00.00" > > > > > > 192.168.254.240 - - [18/Aug/2008:21:36:40 -0600] "GET /dump/flv/ > > > > > > dailytest.3gp HTTP/1.0" 200 229635 "-" "PVCore/5.02.00.00" > > > > > > > And the HEAD response from the server looks okay: > > > > > > > HTTP/1.1 200 OK > > > > > > Date: Tue, 19 Aug 2008 03:57:54 GMT > > > > > > Server: Apache/2.2.3 (Debian) mod_python/3.2.10 Python/2.4.4 PHP/ > > > > > > 5.2.0-8+etch11 > > > > > > Last-Modified: Thu, 17 Jul 2008 01:56:49 GMT > > > > > > ETag: "3a4c02f-38103-8ddeba40" > > > > > > Accept-Ranges: bytes > > > > > > Content-Length: 229635 > > > > > > Content-Type: video/3gpp > > > > > > > Is there something I'm missing? > > > > > > > In the Release Notes, it mentions thatMediaPlayercan't play from > > > > > > memory (InputStream). Does this extend to the online video > > streams? > > > > > > > Is this related to the Release Note that describes thatMediaPlayer > > > > > > might > > > > > > > Unfortunately, the ability to play audio streams from memory (such > > as > > > > > > via an InputStream or Reader) will not be possible in Android 1.0. > > > > > > Streaming seems like a big deal--if this is the case are there any > > > > > > recommended workarounds? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

