[android-developers] SSHFS on Android

2010-12-13 Thread Dana L
I'm trying to run sshfs on Android. This is essentially a Proof of
Concept for something else I'm trying to do (essentially a FUSE mount
backed by an SSL connection to a remote server), but I figured that
getting the binary working would be a decent POC (my eventual goal is
to build an Android service that does this).

Using the OpenMoko Toolchain (since the ndk toolchain doesn't have all
the required headers), I got the Fuse library and the (static) sshfs
binary to build. I pushed it to a development handset, and tried
running it (via an ADB root prompt). When using an SSHFS command that
worked on a ubuntu box (both are connecting to a Mac on the same local
network), I get the following error:

read: Connection reset by peer

Looking into this error, it appears to have something to do with the
ssh layer not being setup correctly (sometimes it happens due to
issues with known_hosts). Since the root user on Android doesn't have
a standard account setup, I'm guessing that this is causing it to not
work.

I'm also having trouble getting a command-line ssh client to work (and
I believe it's for similar reasons). When I download ConnectBot, it
connects just fine, although that isn't using a full command-line
client (it's just a library that is invoked using JNI).

Any hints or suggestions on getting this to work?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: SSHFS on Android

2010-12-13 Thread Dana L
On Dec 13, 12:22 pm, Chris Stratton cs07...@gmail.com wrote:
 On Dec 13, 2:12 pm, Dana L dana11...@gmail.com wrote:

  I'm trying to run sshfs on Android.

 Does your kernel have the necessary support?
I haven't built support into the kernel yet, although this appears to
be an SSH error rather than a FUSE error. I think I'm going to take a
step back and build a simpler FUSE-based program to get FUSE support
working.


  I get the following error:

  read: Connection reset by peer

 Can you instrument the code to better undestand the nature of the
 failure?

  I'm also having trouble getting a command-line ssh client to work (and
  I believe it's for similar reasons).

 You might want to attack that problem first, again perhaps by
 instrumenting the code (or even check for a verbose option on the
 command line?)
Thanks for the suggestions. Just seeing whether anyone has prior
experience with this.


 Also, it might be worth the quick check of using netcat instead of ssh
 to do a crude telnet connection - if even that won't work, I'd look at
 network problems.
I can ping the server successfully (using ping). So it isn't a
connectivity issue.


 As for the suggestion to move to android-ndk, that may not be wholly
 on topic either - the long range project probably belongs on kernel or
 platform.
Doesn't seem like an ndk issue (at least for now). I'm not actually
using the ndk, because the ndk toolchain lacks the fuse header files.
Although, after I get the POC working, I might see whether I can
actually add some files to the ndk toolchain to get this working, and
build using the NDK build system.

Thanks for the suggestions.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: SSHFS on Android

2010-12-13 Thread Dana L
Just providing an update.

I added FUSE support into my kernel (by building and loading a
module), and I was able to use httpfs (http://httpfs.sourceforge.net/)
to mount an http file via FUSE.

However, I still get the same error with sshfs. So I've pretty much
isolated this to an error with the ssh layer.

I have successfully validated what I was looking for (basic FUSE
functionality on Android), and don't need this to work from a straight
command-line console app (since this is going to be part of an android
service), but I would like to figure out why this isn't working, and
see whether I can fix it. If anyone has thoughts on how this can be
fixed, please let me know.

On Dec 13, 2:11 pm, Dana L dana11...@gmail.com wrote:
 On Dec 13, 12:22 pm, Chris Stratton cs07...@gmail.com wrote: On Dec 13, 
 2:12 pm, Dana L dana11...@gmail.com wrote:

   I'm trying to run sshfs on Android.

  Does your kernel have the necessary support?

 I haven't built support into the kernel yet, although this appears to
 be an SSH error rather than a FUSE error. I think I'm going to take a
 step back and build a simpler FUSE-based program to get FUSE support
 working.



   I get the following error:

   read: Connection reset by peer

  Can you instrument the code to better undestand the nature of the
  failure?

   I'm also having trouble getting a command-line ssh client to work (and
   I believe it's for similar reasons).

  You might want to attack that problem first, again perhaps by
  instrumenting the code (or even check for a verbose option on the
  command line?)

 Thanks for the suggestions. Just seeing whether anyone has prior
 experience with this.



  Also, it might be worth the quick check of using netcat instead of ssh
  to do a crude telnet connection - if even that won't work, I'd look at
  network problems.

 I can ping the server successfully (using ping). So it isn't a
 connectivity issue.



  As for the suggestion to move to android-ndk, that may not be wholly
  on topic either - the long range project probably belongs on kernel or
  platform.

 Doesn't seem like an ndk issue (at least for now). I'm not actually
 using the ndk, because the ndk toolchain lacks the fuse header files.
 Although, after I get the POC working, I might see whether I can
 actually add some files to the ndk toolchain to get this working, and
 build using the NDK build system.

 Thanks for the suggestions.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Segmented video streaming on Android

2010-10-29 Thread Dana L
I couldn't find any good documentation on StageFright, and I didn't
get much by looking through the code. Supposedly StageFright is pretty
buggy, so it makes sense to use OpenCore for the time being (maybe
Gingerbread will address some of the problems).

I'm sort of surprised that Android doesn't support this stuff out of
the box. Maybe they will add support for HTTP Live Streaming or at the
very least invent their own live streaming protocol.

On Oct 28, 3:11 pm, Kristian kristian.even...@gmail.com wrote:
 Hi,

 Thanks, I am working on some possible solutions now. One idea I have
 is to skip MediaPlayer altogheter and write some native-code that will
 communicate directly with Stagefright/OpenCore. However, after a quick
 look through their source, they seem to not allow me the freedom I
 want either. A possible solution would be to feed the raw h264
 bytestream to the media-framework (if possible) and send the frames
 back up to the GUI through JNI.

 Btw, do you have any or know of any examples of how to use Stagefright/
 Opencore?

 -Kristian

 On Oct 27, 9:01 pm, Dana L dana11...@gmail.com wrote:







  There have been a couple of threads on this topic over the past few
  weeks. I've been trying to get this working as well, and no matter
  what I do, there is always a brief pause between segments. I have seen
  a bunch of other suggested approaches on here that also don't work.

  I've managed to do POCs of video streaming to Android with both Flash
  and via RTSP. Unfortunately, performance isn't as good as MP4
  playback, even using the same video codec (h264).

  It seems like the only option that would actually work is to write a
  custom media player in native code.
  The following company has a working solution (they implement Apple's
  HTTP Live Streaming Protocol in a custom player). Performance isn't
  superb (you aren't going to get 720p playback), but it works at a
  reasonable resolution.http://www.nextreaming.com/

  If you manage to get this working, please let me know.

    - Dana

  On Oct 27, 8:32 am, Kristian kristian.even...@gmail.com wrote:

   Hello,

   I am working on an porting an application supporting segmented video
   streaming to Android. For those who are not familiar with segmented
   streaming, it is when a complete video is divided into multiple
   segments. Each segment can then, for example, be encoded at different
   qualities to support different clients.

   Anyway, my problem is that I am not able to get a smooth transition
   between segments. Currently, the only way I have gotten segmented
   streaming working, is to write the segments into independent,
   temporary files, and then load each file into the MediaPlayer once the
   previous has finished. This causes an interruption in playback between
   each segment, probably due to the I/O involved.

   I have looked around for different solutions, among others, playlists
   and storing the videos directly in memory. However, none seem to work
   or be supported by Android. Also, I tried creating two MediaPlayer-
   objects and do something similar to double-buffering by preparing the
   next segment well ahead of the previous, but it only made the
   application unstable.

   My question is therefore: Does anyone have any hints, tips or examples
   for how to do smooth transition between video segments? The segments I
   am working with are independent, so there is no dependency and they
   can be viewed as X number of independent video files.

   -Kristian

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Segmented video streaming on Android

2010-10-27 Thread Dana L
There have been a couple of threads on this topic over the past few
weeks. I've been trying to get this working as well, and no matter
what I do, there is always a brief pause between segments. I have seen
a bunch of other suggested approaches on here that also don't work.

I've managed to do POCs of video streaming to Android with both Flash
and via RTSP. Unfortunately, performance isn't as good as MP4
playback, even using the same video codec (h264).

It seems like the only option that would actually work is to write a
custom media player in native code.
The following company has a working solution (they implement Apple's
HTTP Live Streaming Protocol in a custom player). Performance isn't
superb (you aren't going to get 720p playback), but it works at a
reasonable resolution.
http://www.nextreaming.com/

If you manage to get this working, please let me know.

  - Dana

On Oct 27, 8:32 am, Kristian kristian.even...@gmail.com wrote:
 Hello,

 I am working on an porting an application supporting segmented video
 streaming to Android. For those who are not familiar with segmented
 streaming, it is when a complete video is divided into multiple
 segments. Each segment can then, for example, be encoded at different
 qualities to support different clients.

 Anyway, my problem is that I am not able to get a smooth transition
 between segments. Currently, the only way I have gotten segmented
 streaming working, is to write the segments into independent,
 temporary files, and then load each file into the MediaPlayer once the
 previous has finished. This causes an interruption in playback between
 each segment, probably due to the I/O involved.

 I have looked around for different solutions, among others, playlists
 and storing the videos directly in memory. However, none seem to work
 or be supported by Android. Also, I tried creating two MediaPlayer-
 objects and do something similar to double-buffering by preparing the
 next segment well ahead of the previous, but it only made the
 application unstable.

 My question is therefore: Does anyone have any hints, tips or examples
 for how to do smooth transition between video segments? The segments I
 am working with are independent, so there is no dependency and they
 can be viewed as X number of independent video files.

 -Kristian

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] RTSP Video Performance

2010-10-26 Thread Dana L
I'm streaming video via RTSP to Android, using an RTP container, x264
video, and mp4a audio. I've been using 96kbps audio, 384 kbps video,
and 480x270 resolution. I'm playing the video back in a standard
VideoView (I'm pointing the player at the rtsp sdp).

On my test system (a Droid 2), I find that the video is somewhat
jerky? Is there a better way to be doing this? It seems like the video
playback should be hardware accelerated, considering that I'm using
standard video and audio formats. Is there some sort of problem with
the performance of RTP streams?

Thanks for any help or suggestions.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How to get Android Source code?

2010-10-07 Thread Dana L
You can get GIT for Windows. There are at least two options:

MSYSGit
http://code.google.com/p/msysgit/

Cygwin GIT
http://cygwin.com/packages/git/

On Oct 7, 2:38 am, Indu isadas...@gmail.com wrote:
 I am having trouble with one of the phones. It is using Version 2.1 -
 update 1. I would like to download the source code to check that.
 However, I am on Windows platform, so I cannot use GIT. Is there any
 other way to download/browse the code for this particular release? I
 could not find this version under android.git.kernel.org. Any
 pointers?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Gapless Video Playback?

2010-10-06 Thread Dana L
I'm trying to build a live streaming player by downloading video
segments (which are generated in real-time) and then playing them back
in sequence. While I can get the segments to play, I need to get it so
that there isn't a pause between playback of successive segments. I've
tried using both MediaPlayer (with an appropriate SurfaceView) and
VideoView, but there's always a small gap between segments.

If I try to load a new video into a MediaPlayer when the first segment
finishes playing, it seems to take half a second or so before the next
segment is loaded and starts playing. I have also tried having
multiple SurfaceViews within a single ContentView (with only the
active one being visible), but it seems like you can't prepare a video
until the associated SurfaceView is visible. I also tried having
multiple ContentViews that I switch between, but again, this has
similar issues.

Any ideas or suggestions? Is it possible to somehow get the next
segment to begin decoding as soon as the first one is decoded (which
could be before it finishes playing)?

Am I going to need to build a custom video player in order to do this?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en