Crash mjpeg stream from DLINK 930 L
I tried this library with 3 different stream and camera, works for 2 of them but the third crash :( It's a D-LINK 930 LB camera, stream works fine from web browser or there Android app but make MjpegSurfaceView crash.
Here is the full log:
MjpegViewDefault: encountered exception during render
java.io.IOException: Resetting to invalid mark
at java.io.BufferedInputStream.reset(BufferedInputStream.java:437)
at java.io.FilterInputStream.reset(FilterInputStream.java:226)
at com.github.niqdev.mjpeg.MjpegInputStreamDefault.readMjpegFrame(MjpegInputStreamDefault.java:76)
at com.github.niqdev.mjpeg.MjpegViewDefault$MjpegViewThread.run(MjpegViewDefault.java:129)
--------- beginning of crash
06-05 18:49:40.539 5917-5970/com.jaumard.lisa E/AndroidRuntime: FATAL EXCEPTION: Thread-5
Process: com.jaumard.lisa, PID: 5917
java.lang.IllegalArgumentException: Malformed \uxxxx encoding.
at java.util.Properties.loadConvert(Properties.java:569)
at java.util.Properties.load0(Properties.java:392)
at java.util.Properties.load(Properties.java:342)
at com.github.niqdev.mjpeg.MjpegInputStreamDefault.parseContentLength(MjpegInputStreamDefault.java:60)
at com.github.niqdev.mjpeg.MjpegInputStreamDefault.readMjpegFrame(MjpegInputStreamDefault.java:72)
at com.github.niqdev.mjpeg.MjpegViewDefault$MjpegViewThread.run(MjpegViewDefault.java:129)
Any idea ?
should be nice to at least catch this exception and show a "no compatible stream" or something
Hi, is the camera public? there is any way I can reproduce the error? Thanks
It's not public but I can open it for some time in order to be able to reproduce the crash. Can I have your email to send you the stream link ? To reproduce it's simple just try to read the stream, for me it crash directly without showing any images
I also met this problem during using a D-LINK DCS-5020L camera. So sad.
@jaumard Could you please share which ipcam can be used fine?
I test with a PS3 eye on a raspberry pi and a raspberry pi with the official cam module (with mjpg_streamer). I don't have ipcam except the D-LINK.
Hi, have a look at #35 and #32 and let me know if you have the same error, if it works would be nice to add/wrap another implementation
I test #32 no error but no stream lol only blank, I try this library with some public mjpeg stream and when it work it take 10 secondes before showing the first frame... For #35 how can I test this code without building the all library source ? is it possible ?
Good to know about #32, for #35 I haven't tried the code, but i think the only way for test it would be to download the project, add it to the source, try with the demo app and make a PR if it works.
Ip camera and mobile connect in same network?
Yes they are also try on another network too but same problem
Try on same network but it's showing error
Hi, I can use #32 to show public IPCAMs, except my DLINK camera. I don't know what the problem is. But I find DLINK camera view can be fine displayed on WebView. It's another method to show ipcam view.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
String myURL = "http://XXXXXXXXX";
WebView myBrowser=(WebView)findViewById(R.id.mybrowser);
WebSettings websettings = myBrowser.getSettings();
websettings.setSupportZoom(true);
websettings.setBuiltInZoomControls(true);
websettings.setJavaScriptEnabled(true);
myBrowser.setWebViewClient(new WebViewClient());
myBrowser.loadUrl(myURL);
}
Unfortunately ip cam demo has stopped how to solve this error
@vvarock your comments are not constructive, unrelated to the issues and not explanatory, you can't spam and add comments everywhere asking for help if you don't explain your problem, provide a sample of the code and a stacktrace
@zxc2694 Thanks for sharing, is the format of your stream MJPEG? cos this library supports only that format.
I think your solution could be a valid alternative to the unsupported format.
For example in issue #36 there was a similar problem and after spending time debugging the format was mpjpeg which is not supported
Yes, my ipcam is also MJPEG streaming, and I think #36 problem is the same as mine. I don't know how to fix this incompatible problem from this library, so I use another alternative solution.
Hi @zxc2694 , since @jcRuan had a similar issue, if you solve it, would you like to share what was your alternative solution? Thanks