[android-developers] Video streaming frm videoplayer
Hi all, Is it possible to live stream the video frm videoplayer (which plays recorded video ) in android? Thanks and Regards Deepa M -- 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 --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [android-developers] Video streaming plus UI control update thread
Piren, Thanks for taking the time to respond. I was able to figure out the problem…but I can confirm that Thread with sleep is bad. Handler is the right approach — I had something (not obvious) several layers deep in the call chain which was causing the problem. Thanks again for your help. Cheers, Brad On Nov 10, 2013, at 12:55 AM, Piren gpi...@gmail.com wrote: I've done it and have had no issues what so ever (using a surfaceview). Regarding your code, your first approach (thread with sleep) is horrible, don't ever do that for any reason :) The second approach is the correct one which i have used myself with no issues. Since i see no reason why it would affect your playback like so, i suggest you just profile your app and see exactly what calls cause the slowdown. On Saturday, November 9, 2013 5:03:07 AM UTC+2, Brad OHearne wrote: Wasn’t able to get a response on this after a few days, so perhaps I’ll try to frame it another way. If you: - Have created custom controls for a video player - Are familiar with the proper / conventional approach to updating UI controls every second / sub-second as in these kinds of apps: stopwatch, clock with second hand, video player with seek bar, music player, etc. - Have done any background threading with regular updates to UI controls I would love to hear from you on what worked for you, or even if you couldn’t get it working, what did not work for you. Any information at this point will help narrow down the problem — the use case is very simple — update the play time on a video player every second without killing the streaming video performance. I would love to hear from you. Thanks, Brad On Nov 4, 2013, at 2:56 PM, Bradley O'Hearne br...@bighillsoftware.com wrote: Hey there, I hope everyone’s week is off to a good start! I have a pretty simple use case: I am playing video streamed across the network in an app, and I need to update two SeekBars every second, one which tracks the video’s timecode while playing, and the other which tracks the device volume. Simple enough, gun up a background thread, and update both every second (given that to my knowledge, I can’t have the system call a listener specific to either of those functions. In a nutshell, the video streams just fine when this control-updating thread isn’t running, but when it is running, the video is so chunky and slow, and audio garbled, that it isn’t watchable. First, the video display is accomplished using a TextureView in combination with a MediaPlayer (the reason is that the TextureView allows scrolling / movement, SurfaceView does not). Second, I have tried a couple of different approaches for the background thread: a) I have tried a Runnable in a new Thread which updates the SeekBar controls inside of a runOnUIThread — this keeps a looping background thread and updates the controls on the UI thread, as such: new Thread(new ManagementRunnable()).start(); ... public class ManagementRunnable implements Runnable { public void run() { try { updateControlState(); Thread.sleep(1000); } catch (Exception ex) { ex.printStackTrace(); } } } ... public void updateControlState() { runOnUiThread(new Runnable() { public void run() { // update the timecode SeekBar ... // update the volume SeekBar ... } } } b) I have also tried using a Handler, where it runs on the UI thread, as such: new Handler().post(new ManagementRunnable()); ... public class ManagementRunnable implements Runnable { public void run() { try { updateControlState(); handler.postDelayed(this, 1000); } catch (Exception ex) { ex.printStackTrace(); } } } public void updateControlState() { // update the timecode SeekBar ... // update the volume SeekBar ... } The problem is, the result is the same regardless of which approach is taken — the video is unwatchable. I have tested this on a Samsung Galaxy S2 Skyrocket, and in the simulator. I’ve Googled this a fair amount, and it appears that the approaches above are generally the recommended approach. While video decoding and playing isn’t exactly a cheap operation, I’m a little surprised that accommodating a once-per-second update brought the app to its knees, given nothing else taking place in the app. If anyone has any insight, I would really appreciate
Re: [android-developers] Video streaming plus UI control update thread
I've done it and have had no issues what so ever (using a surfaceview). Regarding your code, your first approach (thread with sleep) is horrible, don't ever do that for any reason :) The second approach is the correct one which i have used myself with no issues. Since i see no reason why it would affect your playback like so, i suggest you just profile your app and see exactly what calls cause the slowdown. On Saturday, November 9, 2013 5:03:07 AM UTC+2, Brad OHearne wrote: Wasn’t able to get a response on this after a few days, so perhaps I’ll try to frame it another way. If you: - Have created custom controls for a video player - Are familiar with the proper / conventional approach to updating UI controls every second / sub-second as in these kinds of apps: stopwatch, clock with second hand, video player with seek bar, music player, etc. - Have done any background threading with regular updates to UI controls I would love to hear from you on what worked for you, or even if you couldn’t get it working, what did not work for you. Any information at this point will help narrow down the problem — the use case is very simple — update the play time on a video player every second without killing the streaming video performance. I would love to hear from you. Thanks, Brad On Nov 4, 2013, at 2:56 PM, Bradley O'Hearne br...@bighillsoftware.comjavascript: wrote: Hey there, I hope everyone’s week is off to a good start! I have a pretty simple use case: I am playing video streamed across the network in an app, and I need to update two SeekBars every second, one which tracks the video’s timecode while playing, and the other which tracks the device volume. Simple enough, gun up a background thread, and update both every second (given that to my knowledge, I can’t have the system call a listener specific to either of those functions. In a nutshell, the video streams just fine when this control-updating thread isn’t running, but when it is running, the video is so chunky and slow, and audio garbled, that it isn’t watchable. First, the video display is accomplished using a TextureView in combination with a MediaPlayer (the reason is that the TextureView allows scrolling / movement, SurfaceView does not). Second, I have tried a couple of different approaches for the background thread: a) I have tried a Runnable in a new Thread which updates the SeekBar controls inside of a runOnUIThread — this keeps a looping background thread and updates the controls on the UI thread, as such: new Thread(new ManagementRunnable()).start(); ... public class ManagementRunnable implements Runnable { public void run() { try { updateControlState(); Thread.sleep(1000); } catch (Exception ex) { ex.printStackTrace(); } } } ... public void updateControlState() { runOnUiThread(new Runnable() { public void run() { // update the timecode SeekBar ... // update the volume SeekBar ... } } } b) I have also tried using a Handler, where it runs on the UI thread, as such: new Handler().post(new ManagementRunnable()); ... public class ManagementRunnable implements Runnable { public void run() { try { updateControlState(); handler.postDelayed(this, 1000); } catch (Exception ex) { ex.printStackTrace(); } } } public void updateControlState() { // update the timecode SeekBar ... // update the volume SeekBar ... } The problem is, the result is the same regardless of which approach is taken — the video is unwatchable. I have tested this on a Samsung Galaxy S2 Skyrocket, and in the simulator. I’ve Googled this a fair amount, and it appears that the approaches above are generally the recommended approach. While video decoding and playing isn’t exactly a cheap operation, I’m a little surprised that accommodating a once-per-second update brought the app to its knees, given nothing else taking place in the app. If anyone has any insight, I would really appreciate it. Thanks, Brad -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@googlegroups.comjavascript: To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com javascript: For more options, visit this group at
Re: [android-developers] Video streaming plus UI control update thread
Wasn’t able to get a response on this after a few days, so perhaps I’ll try to frame it another way. If you: - Have created custom controls for a video player - Are familiar with the proper / conventional approach to updating UI controls every second / sub-second as in these kinds of apps: stopwatch, clock with second hand, video player with seek bar, music player, etc. - Have done any background threading with regular updates to UI controls I would love to hear from you on what worked for you, or even if you couldn’t get it working, what did not work for you. Any information at this point will help narrow down the problem — the use case is very simple — update the play time on a video player every second without killing the streaming video performance. I would love to hear from you. Thanks, Brad On Nov 4, 2013, at 2:56 PM, Bradley O'Hearne br...@bighillsoftware.com wrote: Hey there, I hope everyone’s week is off to a good start! I have a pretty simple use case: I am playing video streamed across the network in an app, and I need to update two SeekBars every second, one which tracks the video’s timecode while playing, and the other which tracks the device volume. Simple enough, gun up a background thread, and update both every second (given that to my knowledge, I can’t have the system call a listener specific to either of those functions. In a nutshell, the video streams just fine when this control-updating thread isn’t running, but when it is running, the video is so chunky and slow, and audio garbled, that it isn’t watchable. First, the video display is accomplished using a TextureView in combination with a MediaPlayer (the reason is that the TextureView allows scrolling / movement, SurfaceView does not). Second, I have tried a couple of different approaches for the background thread: a) I have tried a Runnable in a new Thread which updates the SeekBar controls inside of a runOnUIThread — this keeps a looping background thread and updates the controls on the UI thread, as such: new Thread(new ManagementRunnable()).start(); ... public class ManagementRunnable implements Runnable { public void run() { try { updateControlState(); Thread.sleep(1000); } catch (Exception ex) { ex.printStackTrace(); } } } ... public void updateControlState() { runOnUiThread(new Runnable() { public void run() { // update the timecode SeekBar ... // update the volume SeekBar ... } } } b) I have also tried using a Handler, where it runs on the UI thread, as such: new Handler().post(new ManagementRunnable()); ... public class ManagementRunnable implements Runnable { public void run() { try { updateControlState(); handler.postDelayed(this, 1000); } catch (Exception ex) { ex.printStackTrace(); } } } public void updateControlState() { // update the timecode SeekBar ... // update the volume SeekBar ... } The problem is, the result is the same regardless of which approach is taken — the video is unwatchable. I have tested this on a Samsung Galaxy S2 Skyrocket, and in the simulator. I’ve Googled this a fair amount, and it appears that the approaches above are generally the recommended approach. While video decoding and playing isn’t exactly a cheap operation, I’m a little surprised that accommodating a once-per-second update brought the app to its knees, given nothing else taking place in the app. If anyone has any insight, I would really appreciate it. Thanks, Brad -- 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 --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- 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
[android-developers] Video streaming plus UI control update thread
Hey there, I hope everyone’s week is off to a good start! I have a pretty simple use case: I am playing video streamed across the network in an app, and I need to update two SeekBars every second, one which tracks the video’s timecode while playing, and the other which tracks the device volume. Simple enough, gun up a background thread, and update both every second (given that to my knowledge, I can’t have the system call a listener specific to either of those functions. In a nutshell, the video streams just fine when this control-updating thread isn’t running, but when it is running, the video is so chunky and slow, and audio garbled, that it isn’t watchable. First, the video display is accomplished using a TextureView in combination with a MediaPlayer (the reason is that the TextureView allows scrolling / movement, SurfaceView does not). Second, I have tried a couple of different approaches for the background thread: a) I have tried a Runnable in a new Thread which updates the SeekBar controls inside of a runOnUIThread — this keeps a looping background thread and updates the controls on the UI thread, as such: new Thread(new ManagementRunnable()).start(); ... public class ManagementRunnable implements Runnable { public void run() { try { updateControlState(); Thread.sleep(1000); } catch (Exception ex) { ex.printStackTrace(); } } } ... public void updateControlState() { runOnUiThread(new Runnable() { public void run() { // update the timecode SeekBar ... // update the volume SeekBar ... } } } b) I have also tried using a Handler, where it runs on the UI thread, as such: new Handler().post(new ManagementRunnable()); ... public class ManagementRunnable implements Runnable { public void run() { try { updateControlState(); handler.postDelayed(this, 1000); } catch (Exception ex) { ex.printStackTrace(); } } } public void updateControlState() { // update the timecode SeekBar ... // update the volume SeekBar ... } The problem is, the result is the same regardless of which approach is taken — the video is unwatchable. I have tested this on a Samsung Galaxy S2 Skyrocket, and in the simulator. I’ve Googled this a fair amount, and it appears that the approaches above are generally the recommended approach. While video decoding and playing isn’t exactly a cheap operation, I’m a little surprised that accommodating a once-per-second update brought the app to its knees, given nothing else taking place in the app. If anyone has any insight, I would really appreciate it. Thanks, Brad -- 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 --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] video streaming from Android without saving on sdcard
I have code: private MediaRecorder recorder; String hostname = 192.168.1.125; int port = 1935; Socket socket; ParcelFileDescriptor pfd; public void start() { try { socket = new Socket(InetAddress.getByName(hostname), port); pfd = ParcelFileDescriptor.fromSocket(socket); } catch (UnknownHostException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } recorder.setOutputFile(pfd.getFileDescriptor()); // String filename = String.format(/sdcard/%d.mp4, System.currentTimeMillis()); // // recorder.setOutputFile(filename); try { recorder.prepare(); recorder.start(); } catch (IllegalStateException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } And Server side: import java.io.DataInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.net.ServerSocket; import java.net.Socket; public class Server { public static void main(String[] args) { try { System.out.println(create sock); ServerSocket svsock = new ServerSocket(1935); System.out.println(accept); Socket sock = svsock.accept(); System.out.println(buffer read); FileOutputStream outFile = null; String filename = String.format(%d.mp4, System.currentTimeMillis()); try { outFile = new FileOutputStream(filename); System.out.println(filename); } catch (IOException e1) { e1.printStackTrace(); } InputStream is = new DataInputStream(sock.getInputStream()); byte[] byteBuffer = new byte[1024]; int allsize = 0; while(sock.isConnected()) { int size = is.read(byteBuffer); if (size == -1){ break; } else { outFile.write(byteBuffer, 0, size); } allsize += size; } System.out.println(close size= + allsize); outFile.close(); sock.close(); } catch(Exception e) { e.printStackTrace(); } System.out.println(endmain); } } I test it on Android 2.2.2 (HTC quiet brilliant) and all works fine. When I press start button Server create file and record data from stream to file. After this file is normally play in VLC player and etc. But when I test it on Android 4.0.4 (Galaxy S2) Server create file and record data from stream to file but not play in VLC (and other players too) and give me error mp4 error: MP4 plugin discarded (no moov,foov,moof box) avcodec error: Could not open �codec demux error: Specified event object handle is invalid ps error: cannot peek main error: no suitable demux module for `file/:///C:/1345461283455.mp4' I also try to upload this file to youtube, but after upload youtube give me error like file format is unsupported. But Android 4.0.4 (Galaxy S2) succesfully create and then play file when I save it on phone memory (not stream to server) I think problem maybe on server side, or something changed on android 4.0.4. Please, help me. Thanks in advance. -- 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
[android-developers] video streaming from Android without saving on sdcard
I have code: private MediaRecorder recorder; String hostname = 192.168.1.125; int port = 1935; Socket socket; ParcelFileDescriptor pfd; public void start() { try { socket = new Socket(InetAddress.getByName(hostname), port); pfd = ParcelFileDescriptor.fromSocket(socket); } catch (UnknownHostException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } recorder.setOutputFile(pfd.getFileDescriptor()); // String filename = String.format(/sdcard/%d.mp4, System.currentTimeMillis()); // // recorder.setOutputFile(filename); try { recorder.prepare(); recorder.start(); } catch (IllegalStateException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } *and Server side:* import java.io.DataInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.net.ServerSocket; import java.net.Socket; public class Server { public static void main(String[] args) { try { System.out.println(create sock); ServerSocket svsock = new ServerSocket(1935); System.out.println(accept); Socket sock = svsock.accept(); System.out.println(buffer read); FileOutputStream outFile = null; String filename = String.format(%d.mp4, System.currentTimeMillis()); try { outFile = new FileOutputStream(filename); System.out.println(filename); } catch (IOException e1) { e1.printStackTrace(); } InputStream is = new DataInputStream(sock.getInputStream()); byte[] byteBuffer = new byte[1024]; int allsize = 0; while(sock.isConnected()) { int size = is.read(byteBuffer); if (size == -1){ break; } else { outFile.write(byteBuffer, 0, size); } allsize += size; } System.out.println(close size= + allsize); outFile.close(); sock.close(); } catch(Exception e) { e.printStackTrace(); } System.out.println(endmain); } } I test it on *Android 2.2.2 (HTC quiet brilliant) *and all works fine. When I press start button Server create file and record data from stream to file. After this file is normally play in VLC player and etc. But when I test it on *Android 4.0.4 Galaxy S2 *and *Android 4.0.4 HTC*(sorry, forget model), Server create file and record data from stream to file but not play in VLC (and other players too) and give me error mp4 error: MP4 plugin discarded (no moov,foov,moof box) avcodec error: Could not open �codec demux error: Specified event object handle is invalid ps error: cannot peek main error: no suitable demux module for `file/:///C:/1345461283455.mp4' I also try to upload this file to youtube, but after upload youtube give me error like file format is unsupported. But *Android 4.0.4 Galaxy S2 *and *Android 4.0.4 HTC* succesfully create and then play file when I save it on phone memory (not stream to server) I think problem maybe on server side, or something changed on android 4.0.4. Please, help me. Thanks in advance. -- 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] video streaming from Android without saving on sdcard
I have code: private MediaRecorder recorder; String hostname = 192.168.1.125; int port = 1935; Socket socket; ParcelFileDescriptor pfd; public void start() { try { socket = new Socket(InetAddress.getByName(hostname), port); pfd = ParcelFileDescriptor.fromSocket(socket); } catch (UnknownHostException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } recorder.setOutputFile(pfd.getFileDescriptor()); // String filename = String.format(/sdcard/%d.mp4, System.currentTimeMillis()); // // recorder.setOutputFile(filename); try { recorder.prepare(); recorder.start(); } catch (IllegalStateException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } And Server side: import java.io.DataInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.net.ServerSocket; import java.net.Socket; public class Server { public static void main(String[] args) { try { System.out.println(create sock); ServerSocket svsock = new ServerSocket(1935); System.out.println(accept); Socket sock = svsock.accept(); System.out.println(buffer read); FileOutputStream outFile = null; String filename = String.format(%d.mp4, System.currentTimeMillis()); try { outFile = new FileOutputStream(filename); System.out.println(filename); } catch (IOException e1) { e1.printStackTrace(); } InputStream is = new DataInputStream(sock.getInputStream()); byte[] byteBuffer = new byte[1024]; int allsize = 0; while(sock.isConnected()) { int size = is.read(byteBuffer); if (size == -1){ break; } else { outFile.write(byteBuffer, 0, size); } allsize += size; } System.out.println(close size= + allsize); outFile.close(); sock.close(); } catch(Exception e) { e.printStackTrace(); } System.out.println(endmain); } } I test it on Android 2.2.2 (HTC quiet brilliant) and all works fine. When I press start button Server create file and record data from stream to file. After this file is normally play in VLC player and etc. But when I test it on Android 4.0.4 (Galaxy S2) Server create file and record data from stream to file but not play in VLC (and other players too) and give me error mp4 error: MP4 plugin discarded (no moov,foov,moof box) avcodec error: Could not open �codec demux error: Specified event object handle is invalid ps error: cannot peek main error: no suitable demux module for `file/:///C:/1345461283455.mp4' I also try to upload this file to youtube, but after upload youtube give me error like file format is unsupported. But Android 4.0.4 (Galaxy S2) succesfully create and then play file when I save it on phone memory (not stream to server) I think problem maybe on server side, or something changed on android 4.0.4. Please, help me. Thanks in advance. -- 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] video streaming UDP to android
Hi, I have an application that makes video stream to an internal network (192 ...) and I need to broadcast to all connected devices in the network. Since the players have found to only get android http stream, so does anyone know if there is any player who receives the video stream in udp protocol? thankful! -- 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] Video streaming
Hello android developers.In my android application i need to capture the video instead of capturing picture.Please tell how to do so.Please tell me the solution.Thanks in advance. -- 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] video streaming from android(client) to pc(server)
hi, i am a student and i have a project on video streaming. capture a video from android camera and send it live to my server. and server save this video in a file. I am to much familiar with java but starting with android development. Please tell me which API's that i should use to capture a video from android camera and during capture a video it will transform it and send in the form of packets or any other way through GPRS to server. A server is in waiting state every time it collect these packet and combine it and save it in a file. please any one how have experienced with this type of project help me.please please please i really need it. Regards, -- 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] Video Streaming Using Darwin Streaming Server(DSS) through Ethernet LAN
I have my Blaze board running Gingerbread, Connected to my Desktop and i am able to ping from PC to Board. How do i connect DSS with android through Ethernet LAN? I tried the following code but its not working. Whats the problem with following code? try { for (EnumerationNetworkInterface en = NetworkInterface .getNetworkInterfaces(); en.hasMoreElements();) { NetworkInterface intf = en.nextElement(); if (intf.getName().startsWith(eth)) { try { mMediaPlayer = new MediaPlayer(); mMediaPlayer.setDataSource(rtsp://+DSS-IP +/+sample_50kbit.3gp); mMediaPlayer.setDisplay(holder); mMediaPlayer.prepare(); mMediaPlayer.setOnBufferingUpdateListener(this); mMediaPlayer.setOnCompletionListener(this); mMediaPlayer.setOnPreparedListener(this); mMediaPlayer.setOnVideoSizeChangedListener(this); mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); mMediaPlayer.setLooping(true); } catch (Exception e) { Log.e(TAG, error: + e.getMessage(), e); } } } } catch (SocketException ex) { } -- 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] Video Streaming Using Darwin Streaming Server(DSS) through Ethernet LAN
I have my Blaze board running Gingerbread, Connected to my Desktop and i am able to ping from PC to Board. Installed DSS on Desktop and i am successful in testing with VLC ( by playing rtsp://+DSS-IP +/+sample_50kbit.3gp). How do i connect DSS with android through Ethernet LAN? I tried the following code but its not working. Whats the problem with following code? try { for (EnumerationNetworkInterface en = NetworkInterface .getNetworkInterfaces(); en.hasMoreElements();) { NetworkInterface intf = en.nextElement(); if (intf.getName().startsWith(eth)) { try { mMediaPlayer = new MediaPlayer(); mMediaPlayer.setDataSource(rtsp://+DSS-IP +/+sample_50kbit.3gp); mMediaPlayer.setDisplay(holder); mMediaPlayer.prepare(); mMediaPlayer.setOnBufferingUpdateListener(this); mMediaPlayer.setOnCompletionListener(this); mMediaPlayer.setOnPreparedListener(this); mMediaPlayer.setOnVideoSizeChangedListener(this); mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); mMediaPlayer.setLooping(true); } catch (Exception e) { Log.e(TAG, error: + e.getMessage(), e); } } } } catch (SocketException ex) { } -- 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] Video streaming from android mobile phone to a remote computer
Hello everyone, The problem I have is in the implementation of a video streaming application. What I need to do is to stream live what I record with the androids' camera, to a remote computer. I managed to establish a connection between the mobile phone and the computer, but I do not know how to send the video. I searched through forums, and I found out that in order to send a streaming video you have you use the ParcelFileDescriptor. So I created an instance of MediaRecorder with encoding H263 and .mp4 file format, I created a Socket and then I created a new ParcelFileDescriptor connecting it with the socket. If that is correct then the android application that I created is functional. What I don't know now is what to do at the side of the computer in order to receive and view the streaming video. I tried using JMF, but it doesn't support .mp4 video files. What do you suggest me to do? Or where to look in order to find a solution? Thank you in advance, Christina -- 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] Video Streaming in Android Emulator Possible ?.
Hi All I am new to android, I have a simple question *Is Video Streaming possible in Android Emulator*,I am using the example in Android SDK but it give me message *Sorry Can't play this Video*.I am using Youtube Video to stream in android Emulator. Pls respond. -- Thanks and Regards Ajmer Singh -- 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
Re: [android-developers] Video Streaming in Android Emulator Possible ?.
It is possible...using Mediaplayer classs. see this code MediaPlayer video; setContentView(R.layout.main); VideoView video = (VideoView) findViewById(R.id.video); // Load and start the movie video.setVideoPath(/data/samplevideo.3gp ); video.start(); main layout file ?xml version=1.0 encoding=utf-8? FrameLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=fill_parent VideoView android:id=@+id/video android:layout_height=wrap_content android:layout_width=wrap_content android:layout_gravity=center / /FrameLayout On Tue, Sep 21, 2010 at 1:07 PM, Ajmer Singh ajmersing...@gmail.com wrote: Hi All I am new to android, I have a simple question *Is Video Streaming possible in Android Emulator*,I am using the example in Android SDK but it give me message *Sorry Can't play this Video*.I am using Youtube Video to stream in android Emulator. Pls respond. -- Thanks and Regards Ajmer Singh -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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
Re: [android-developers] Video Streaming in Android Emulator Possible ?.
I want to stream a video from Network Like From youtube.com. Is that possible in android emulator?. On Tue, Sep 21, 2010 at 1:34 PM, Ramaraju naga v.nagaramar...@gmail.comwrote: It is possible...using Mediaplayer classs. see this code MediaPlayer video; setContentView(R.layout.main); VideoView video = (VideoView) findViewById(R.id.video); // Load and start the movie video.setVideoPath(/data/samplevideo.3gp ); video.start(); main layout file ?xml version=1.0 encoding=utf-8? FrameLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=fill_parent VideoView android:id=@+id/video android:layout_height=wrap_content android:layout_width=wrap_content android:layout_gravity=center / /FrameLayout On Tue, Sep 21, 2010 at 1:07 PM, Ajmer Singh ajmersing...@gmail.comwrote: Hi All I am new to android, I have a simple question *Is Video Streaming possible in Android Emulator*,I am using the example in Android SDK but it give me message *Sorry Can't play this Video*.I am using Youtube Video to stream in android Emulator. Pls respond. -- Thanks and Regards Ajmer Singh -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- *Thanks and Regards Ajmer Singh* -- 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] Video streaming from Android
Hi everyone. I'm trying to do live-record streaming from an Android phone and got stuck in a problem quite difficult to tackle. After messing around with an hex editor, I've found that MediaRecorder class places the moov atom at the end of the MP4 file. As this atom is necessary to work with the MP4 file and I'm sending the stream while recording, I'm 'blind' at the server side until the transfer is completed. The idea is to start playing/coding/whatever the file in the server side in real time but the received file only contains mdat bytes at this moment. Has anyone faced a similar problem? Do you have any idea if this task can be accomplished? Thanks beforehand. -- 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] video streaming in android
The Android platform offers built-in encoding/decoding for specific media types. what if i want to encode video other than those. is it anyway to obtain raw stream of data that can be given to encoder? -- 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] Video streaming, omx problem
Hello, I want to stream video via sdp. The stream url is set to a MediaPlayer as described in the api sample. Most of the times it is working fine. Sometimes, however, i get a black or green screen and the log says: E/QCOmxcore( 51): OMX.qcom.video.decoder.avc Instance already exists, return OMX_ErrorInsufficientResources There isnt even an error callback to notify the user or initiate appropriate measures. I think the only way to fix this is to reboot the device, but i hope there is a more convenient ;) method .. Cheers, -- 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] Video Streaming using RSTP
hi , I am trying to play a video file using rtsp streaming. While running its giving error as 10-08 17:11:13.719: ERROR/PlayerDriver(542): Command PLAYER_INIT completed with an error or info PVMFFailure 10-08 17:11:13.729: ERROR/MediaPlayer(746): error (1, -1) 10-08 17:11:13.729: ERROR/MediaPlayer(746): Error (1,-1) I am using mMediaPlayer.setDataSource(rtsp://172.22.5.239:1220/ a.mp4); File a.mp4 is working fine with VLC player RTSP Network Streaming. Also the same code works fine for HTTP streaming. Can any one suggest what could be the problem. thanks --~--~-~--~~~---~--~~ 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] Video Streaming
Hi, I'm trying to stream a video from an HTTP server to my client. In order to play it I fire up an action_view intent by providing to it the uri of the media. The client opens up a new browser window, and then redirects to the youtube player as expected. However, after a couple of seconds it throws a 'Cannot play video' error. Has anyone come across this before? Thanks --~--~-~--~~~---~--~~ 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] Video Streaming
Hi to all... Can anyone tell me that which videos supported for streaming? I tried .mp4,.3gp videos. But none of the videos supported.? Thank You Nithin N V --~--~-~--~~~---~--~~ 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] Video streaming error in SDK 1.5
the moov and mdat atoms should already be there, (IIRC) they are required for a well-formed movie file. the moov atom provides metadata for the movie, and the mdat atom provides the actual content. however, if the file is being streamed, the client needs to know the metadata before the actual content arrives, therefore the moov atom must be ahead of the mdat atom. can't stream the stuff in the mdat if you don't know what format it is. there are some tools around to swap the atom order so that a file is streamable, but doing it yourself is reasonably straightforward. one way is to go through the file remembering the positions and sizes of the atoms, then reorder the list, and write out a new copy of the file with everything in the right place. check the Qt file format docs. i will have to do this too at some point but i don't know whether at some point is good enough for your schedule. hth j Hi Dave... I tried to add mdat atom using Hex editor...Bur When i play the video its give error... Please Can you tell me how can i do the video streaming... Thank You N N -- jason.software.particle --~--~-~--~~~---~--~~ 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] Video streaming error in SDK 1.5
Hi to all... I tried for video streaming in sdk 1.5... The video format .mp4... But it gives error like This video is not valid for streaming to this video. But in http://developer.android.com/sdk/android-1.5-highlights.html .mp4 is supported for streaming Thank You Nithin N V --~--~-~--~~~---~--~~ 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] Video streaming
Hi to all... Android mobile support the Live video streaming ? Thank You Nithin N V --~--~-~--~~~---~--~~ 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] Video streaming
Hi to all... Videoview can support quick time player Thank You NITHIN N V --~--~-~--~~~---~--~~ 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] Video streaming error
HI to all I tried video streaming But its not playing... I got the error as this video file cannot be played... The code is as bellow package mypack.mydemos; 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; import android.media.MediaPlayer; import android.media.MediaPlayer.OnCompletionListener; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; public class demo extends Activity { /** * TODO: Set the path variable to a streaming video URL or a local media * file path. */ private String path = rtsp://stream.zoovision.com/zootoones/ the_three_stooges_dinopoodi.3gp; private VideoView mVideoView; @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); mVideoView = (VideoView) findViewById(R.id.surface_view); if (path == ) { // Tell the user to provide a media file URL/path. Toast.makeText( demo.this, Please edit VideoViewDemo Activity, and set path + variable to your media file URL/path, Toast.LENGTH_LONG).show(); } else { mVideoView.setVideoURI(Uri.parse(path)); mVideoView.setMediaController(new MediaController(this)); mVideoView.requestFocus(); } } } --~--~-~--~~~---~--~~ 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] Video streaming
Hi to all Can anyone tell me how video streaming can done. Thank You NIthin N V --~--~-~--~~~---~--~~ 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] Video Streaming /MediaPlayerTest.zip / mp.prepare problem
Hi Megha, i checked ur MediaPlayerTest.zip example on android-sdk_m5- rc15_windows environment but for playing video from remote url.. i got null pointer when mp.prepare method is called even when i check mp.prepareAsync method.. it calls buffering listeners upto 100% but on screen there is nothing to see and no audio as well. so can u pls let me know on this. thanks, nekin --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Video Streaming /MediaPlayerTest.zip / mp.prepare problem
hi all, i was fighting with video streaming issue. do we have support of video streaming in android or not i test MediaPlayerTest.zip example from Megha and when i given it some http absolute url to my 3gp or mp4 video it is giving me error at the line of executing mp.prepare() method call i tried with mp.prepareAsync(); method as well in that...onBufferingUpdate is called till it completes to 100% but video is not coming on screen or not even i got audio output so anybody has gone thru that .. ? or any idea on developing such stuff ? plz help me . i am stuck on that thanks, nekin --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---