MJPEG on Android anyone?

All your problems with Audio, Video and Images.

Re:

Postby digitalmischief » Mon Aug 09, 2010 4:37 pm

Where did you download it from - the version I have from this post (earlier in the thread) :

padde wrote:Have you added the internet permission to your manifest?

--- Edit ---
Added the hole eclipse project.. new cam url.. more to see 24/7 :)



has

Code: Select all
public MjpegView(Context context) { super(context); init(context); }   
    public void surfaceCreated(SurfaceHolder holder) { surfaceDone = true; }
    public void showFps(boolean b) { showFps = b; }
    public void setSource(MjpegInputStream source) { mIn = source; startPlayback();}
    public void setOverlayPaint(Paint p) { overlayPaint = p; }
    public void setOverlayTextColor(int c) { overlayTextColor = c; }
    public void setOverlayBackgroundColor(int c) { overlayBackgroundColor = c; }
    public void setOverlayPosition(int p) { ovlPos = p; }
    public void setDisplayMode(int s) { displayMode = s; }


at the bottom - which you can see is different!!

cheers
digitalmischief
Freshman
Freshman
 
Posts: 9
Joined: Wed Jul 28, 2010 4:48 pm

Top

Re: MJPEG on Android anyone?

Postby FilipeFreitas » Mon Aug 09, 2010 4:53 pm

hmmmmm, maybe i did change that code after all..
i got the code from the same source, but trying to solve your problem (as it was mine too..) i played around with the code, but i don't remember changing that part, but i probably did.

my suggestion is to remain with the code you got. the key to solve the problem is:

mv.surfaceCreated(null);

try it and let me know if it works for you
if it doesn't work, i'll share my code (i'm reluctant to share because i did a lot of modifications for my needs and tryin to solve the problem which could confuse you..)
FilipeFreitas
Junior Developer
Junior Developer
 
Posts: 14
Joined: Fri Aug 06, 2010 5:50 pm

Re: MJPEG on Android anyone?

Postby Ressor » Mon Aug 09, 2010 6:03 pm

I'm curious if either of you are seeing the latency/buffering issues that I and others saw with this code. Although I believe that is is a general mjpeg steaming issue to deal with, it was a major problem for me the last time I worked with this code.

Are you working with the same basic code as posted in this thread or have you made changes to resolve the issue I mentioned?
Ressor
Developer
Developer
 
Posts: 28
Joined: Wed Oct 14, 2009 11:43 pm
Location: Boston MA USA

Re: MJPEG on Android anyone?

Postby FilipeFreitas » Tue Aug 10, 2010 11:32 am

i've been getting near real-time streaming which is damn good enough for me, but i have seen some flickering but i attribute it to some device performance or network congestion issue at that time
FilipeFreitas
Junior Developer
Junior Developer
 
Posts: 14
Joined: Fri Aug 06, 2010 5:50 pm

Re: MJPEG on Android anyone?

Postby Ressor » Tue Aug 10, 2010 2:14 pm

So you are using the stock code here? What type of camera are you grabbing the mjpeg stream from?

Thanks!
Ressor
Developer
Developer
 
Posts: 28
Joined: Wed Oct 14, 2009 11:43 pm
Location: Boston MA USA

Re: MJPEG on Android anyone?

Postby FilipeFreitas » Tue Aug 10, 2010 4:10 pm

FilipeFreitas
Junior Developer
Junior Developer
 
Posts: 14
Joined: Fri Aug 06, 2010 5:50 pm

Top

Re: MJPEG on Android anyone?

Postby digitalmischief » Wed Aug 11, 2010 10:54 am

@Ressor

On mine it seems to be delayed by maximum of 1-2 seconds, although I've only tested on one camera so far (a YCAM Black) I also have a Panasonic BL-C160 so Ill see on that one.

@FilipeFreitas

Do you think you could share your modified code just so I can have a quick look at what you've done in relation to the surface creation.

thanks!
digitalmischief
Freshman
Freshman
 
Posts: 9
Joined: Wed Jul 28, 2010 4:48 pm

Re: MJPEG on Android anyone?

Postby FilipeFreitas » Tue Aug 17, 2010 10:51 am

Here's my code.
Sorry about taking a week to share my code, as I've been working on controlling the cameras by touching the surface. It's really cool, just add a touchlistener/gesturelistener on the surface, and implement the camera's movement http api.
Attachments
MjpegInputStream.java
(7.33 KiB) Downloaded 588 times
MjpegView.java
(9.45 KiB) Downloaded 570 times
FilipeFreitas
Junior Developer
Junior Developer
 
Posts: 14
Joined: Fri Aug 06, 2010 5:50 pm

Re: MJPEG on Android anyone?

Postby digitalmischief » Tue Aug 17, 2010 11:49 am

cool thanks mate, shame I haven't got any PTZ cameras, but sounds like a good idea.

cheers
digitalmischief
Freshman
Freshman
 
Posts: 9
Joined: Wed Jul 28, 2010 4:48 pm

Re: MJPEG on Android anyone?

Postby digitalmischief » Fri Aug 20, 2010 9:59 am

Thanks for that Filipe, all working well now.

cheers!
digitalmischief
Freshman
Freshman
 
Posts: 9
Joined: Wed Jul 28, 2010 4:48 pm

Re: MJPEG on Android anyone?

Postby tmar89 » Thu Oct 07, 2010 8:33 pm

I tried downloading the more recent java files, but the namespace has changed with some new references. Are these files available?

package com.ptin.iad.remoteview.mjpeg;
...
import com.ptin.iad.remoteview.control.util.HandledException;
import com.ptin.iad.remoteview.mjpeg.MjpegInputStream.MjpegInputStreamErrorListener;
tmar89
Once Poster
Once Poster
 
Posts: 1
Joined: Thu Oct 07, 2010 8:31 pm

Re: MJPEG on Android anyone?

Postby saklos » Mon Dec 20, 2010 5:34 pm

Hello, in my project I must recover the flow of IP camera and manipulate the camera from my keyboard.
Can someone help me move the camera left and right from the keyboard of phone.
saklos
Freshman
Freshman
 
Posts: 2
Joined: Fri Dec 17, 2010 9:08 pm

Re: MJPEG on Android anyone?

Postby kuwamebrown » Fri Dec 24, 2010 7:45 am

Can someone help me out!, I've been strugling for a days trying to figure out how to make a button which able the user to download a file such as mp3 or text, I tried to search in everywhere but failed to succeed, some of the code that I used just let me open a new browser, I want the user to open to be able to download the file inside of my own app. PLease if you have an easy way to do it would you be kind to show me! I would I appreciate your kindness thanks.
kuwamebrown
Junior Developer
Junior Developer
 
Posts: 11
Joined: Fri Dec 24, 2010 7:28 am

Re: MJPEG on Android anyone?

Postby FilipeFreitas » Mon Jan 10, 2011 6:09 pm

tmar89 wrote:I tried downloading the more recent java files, but the namespace has changed with some new references. Are these files available?

package com.ptin.iad.remoteview.mjpeg;
...
import com.ptin.iad.remoteview.control.util.HandledException;
import com.ptin.iad.remoteview.mjpeg.MjpegInputStream.MjpegInputStreamErrorListener;


just remove them, as i said, i modified a lot of things to suit my needs
FilipeFreitas
Junior Developer
Junior Developer
 
Posts: 14
Joined: Fri Aug 06, 2010 5:50 pm

Re: MJPEG on Android anyone?

Postby FilipeFreitas » Mon Jan 10, 2011 6:10 pm

saklos wrote:Hello, in my project I must recover the flow of IP camera and manipulate the camera from my keyboard.
Can someone help me move the camera left and right from the keyboard of phone.


depends on the type of remote camera
to make a camera turn, you must send the corresponding http request (for axis cameras, search on google axis http api)
FilipeFreitas
Junior Developer
Junior Developer
 
Posts: 14
Joined: Fri Aug 06, 2010 5:50 pm

Top
PreviousNext

Return to Multimedia Problems

Who is online

Users browsing this forum: Google [Bot] and 11 guests