G GabrielM Member Licensed User Longtime User Mar 7, 2012 #1 Hi, ref:- Mjpeg Stream Viewing I am trying to get/view a Mjpeg video stream from a network camera similar to what you can get if you open the following link in a browser: "http://83.64.164.6/axis-cgi/mjpg/video.cgi?resolution=320x240" Found following interesting links where it seems that there are two classes in the package, MjpegInputStream.java and the MjpegView.java that would be needed, so I would like to ask for some help/advice on how to get them in a B4A library: Links: Android and MJPEG - Stack Overflow anddev.org • View topic - MJPEG on Android anyone? android-camera-axis - control axis's camera with your android phone - Google Project Hosting I have tried to get a library done via Eclipse and based on what I could understood from the examples on the forum ref libraries but it would not be that easy for a java noob . I have attached the Eclipse project here: and the xml+jar files produced and a B4A simple test. Obviously it fails and as I do not have any java experience at all, only what I have read on this great forum, I've got stuck. Thank you. Attachments MJPEG.zip MJPEG.zip 13.5 KB · Views: 1,124 Mjped_lib_Faulty.zip Mjped_lib_Faulty.zip 8.5 KB · Views: 928 MjpegView_B4A_test.zip MjpegView_B4A_test.zip 13.3 KB · Views: 1,032
Hi, ref:- Mjpeg Stream Viewing I am trying to get/view a Mjpeg video stream from a network camera similar to what you can get if you open the following link in a browser: "http://83.64.164.6/axis-cgi/mjpg/video.cgi?resolution=320x240" Found following interesting links where it seems that there are two classes in the package, MjpegInputStream.java and the MjpegView.java that would be needed, so I would like to ask for some help/advice on how to get them in a B4A library: Links: Android and MJPEG - Stack Overflow anddev.org • View topic - MJPEG on Android anyone? android-camera-axis - control axis's camera with your android phone - Google Project Hosting I have tried to get a library done via Eclipse and based on what I could understood from the examples on the forum ref libraries but it would not be that easy for a java noob . I have attached the Eclipse project here: and the xml+jar files produced and a B4A simple test. Obviously it fails and as I do not have any java experience at all, only what I have read on this great forum, I've got stuck. Thank you.
thedesolatesoul Expert Licensed User Longtime User Mar 7, 2012 #2 So it seems that it compiles and your created the jar and xml file with no issues. I will try to test it later. But what is not working? Do you get compilation or run-time errors? Upvote 0
So it seems that it compiles and your created the jar and xml file with no issues. I will try to test it later. But what is not working? Do you get compilation or run-time errors?
G GabrielM Member Licensed User Longtime User Mar 7, 2012 #3 It is the B4A Compilation error like in the attached image Attachments Clipboard01.jpg 27.9 KB · Views: 976 Upvote 0
thedesolatesoul Expert Licensed User Longtime User Mar 7, 2012 #4 Are you sure it compiled successfully in eclipse? Looks like your constructors declaration is not correct. Should this: Code: Copy public MjpegInputStream(InputStream in) { super(new BufferedInputStream(in, FRAME_MAX_LENGTH)); } be: Code: Copy public void MjpegInputStream(InputStream in) { super(new BufferedInputStream(in, FRAME_MAX_LENGTH)); } Upvote 0
Are you sure it compiled successfully in eclipse? Looks like your constructors declaration is not correct. Should this: Code: Copy public MjpegInputStream(InputStream in) { super(new BufferedInputStream(in, FRAME_MAX_LENGTH)); } be: Code: Copy public void MjpegInputStream(InputStream in) { super(new BufferedInputStream(in, FRAME_MAX_LENGTH)); }
G GabrielM Member Licensed User Longtime User Mar 7, 2012 #5 I see now the syntax error, you're right. No way to realise this myself and there was no warning on eclipse if I remember right. I will update and try again. Thank you. Upvote 0
I see now the syntax error, you're right. No way to realise this myself and there was no warning on eclipse if I remember right. I will update and try again. Thank you.
thedesolatesoul Expert Licensed User Longtime User Mar 7, 2012 #6 I'm not sure. Eclipse already indicates an error on each line with those red icons on the left side. If you click on them, it also tells you how to resolve them. Upvote 0
I'm not sure. Eclipse already indicates an error on each line with those red icons on the left side. If you click on them, it also tells you how to resolve them.
Erel B4X founder Staff member Licensed User Longtime User May 7, 2012 #7 VideoView supports streaming: Basic4android - Audio Have you tried it? Upvote 0
G GabrielM Member Licensed User Longtime User May 12, 2012 #8 Hi Erel missed your post...:signOops: Yes, thank you. I have tried it previously and I got : "Cannot play video Sorry, this video cannot be played." What I am trying to do is : - access the http location of the IP camera; - provide username and password required; - play the rtsp stream; I wish I could wrap the mjpeg viewer java codes as in the first post in this thread into a library. Gabi Upvote 0
Hi Erel missed your post...:signOops: Yes, thank you. I have tried it previously and I got : "Cannot play video Sorry, this video cannot be played." What I am trying to do is : - access the http location of the IP camera; - provide username and password required; - play the rtsp stream; I wish I could wrap the mjpeg viewer java codes as in the first post in this thread into a library. Gabi
Erel B4X founder Staff member Licensed User Longtime User May 12, 2012 #9 Please post a feature request in the wishlist forum. Also include the links that you posted in the first post. Upvote 0
Please post a feature request in the wishlist forum. Also include the links that you posted in the first post.