1

I just want to know if I can see several videos at once from the network using rtsp? I'm trying to do an android app similar to video surveillance and I need to see several videos at the some time in the screen, I tried to use it with MediaPlayer and after that with VideoView, but in the both cases sometimes the videos appear, sometimes give me an error that can not play one or more videos...What can I do to put it to work well?

Lino
  • 295
  • 1
  • 5
  • 19
  • Just a couple things: First, if you're getting a Video cannot be played error, could it be possible the content you're trying to load isn't mobile-friendly? There are many videos online that aren't capable of being played on mobile devices. And secondly, as a side approach if you're unable to display multiple videos, you could have a webserver gather the data from multiple sources, mux it into a single file/stream, and then stream the data from there. – Cruceo Jun 25 '12 at 23:25
  • but the videos that I receive not always give me that error, sometimes it work, that's why I don't understand it. I can mux it into a single one, because I need to select them separately to do things with them. – Lino Jun 25 '12 at 23:40

1 Answers1

0

What Cruceo said is correct. It's better to mux (FFmpeg is really great) all streams in one stream with a incredible resolution with a low bitrate & framerate. Then create a program to display it and make zoom in when you select a viewpoint. A other option would be to change the video streams into jpg files. This way is allot easier because you can use your web browser to display it. With your web browser you can make use of JavaScript (ProcessingJS is very easy and good at this) to make a image viewer with allot of functionality.

Dippo
  • 184
  • 2
  • 11
  • I already search in the web to do what you said, to change the video stream to jpg files, but I don't find any answer to do it in android and I don't know how to do it, do you know where I find something about it? thanks – Lino Jun 26 '12 at 01:19
  • It's better to do the video to jpg conversion on the server. The server runs linux or windows in most cases, and ffmpeg can run on this. If you want to do the video conversion on Android, this : https://play.google.com/store/apps/details?id=roman10.media.converter&hl=en is FFmpeg on Android. Except, it can give a problem because the conversion itself uses allot of performance of your Android device and you also need a program to display the JPG (or movie) what also takes allot of performance. Leave a note, i can help with FFmpeg and (perhaps) with a image viewer i am currently busy with. – Dippo Jun 26 '12 at 11:20
  • I don't have a server, I have a real camera transmitting to the network and I catch that by the IP, so I just have the client part to do all of it – Lino Jun 26 '12 at 14:27
  • Maybe a silly question, can you configure the camera so that it transmit JPG files instead of a movie? – Dippo Jun 26 '12 at 14:37
  • Btw, i did make a simple image viewer in Processing (www.processing.org). It's also Java, but easier. It's runs on my smartphone with Android. – Dippo Jun 26 '12 at 14:43
  • Here is a preview of the code: http://code.google.com/p/onlineimageviewer/downloads/list Everything is written in Processing, so you need to get Processing and then get the Android engine working (download the SDK). – Dippo Jun 26 '12 at 20:07
  • user1478294 you said that you can help with FFmpeg, after some time in the web I found that I have to use the FFmpeg in my app, I found a lot of things related with android and FFmpeg, I just want to use the FFmpeg, but I can't create the libraries and also I don't know how I used them, I just want to receive the videos from a rtsp streaming and them somehow put them in a videoview or mediaplayer, I have the NDK already installed in my eclipse and I know how to use the CYGWIN. can you help me? sorry about my English and thanks – Lino Jul 02 '12 at 23:19