after camera messoa 640X480 Error the Malformed \uxxxx encoding
crgg opened this issue · 11 comments
java.lang.IllegalArgumentException: Malformed \uxxxx encoding.
at java.util.Properties.loadConvert(Properties.java:569)
at java.util.Properties.load0(Properties.java:391)
at java.util.Properties.load(Properties.java:342)
at CameraMJPeg.MjpegInputStreamDefault.parseContentLength(MjpegInputStreamDefault.java:59)
at CameraMJPeg.MjpegInputStreamDefault.readMjpegFrame(MjpegInputStreamDefault.java:71)
at CameraMJPeg.MjpegViewDefault$MjpegViewThread.run(MjpegViewDefault.java:141)
Show the image perfect after couple sec release this error
private int parseContentLength(byte[] headerBytes) throws IOException, NumberFormatException {
ByteArrayInputStream headerIn = new ByteArrayInputStream(headerBytes);
Properties props = new Properties();
props.load(headerIn); // here the error
return Integer.parseInt(props.getProperty(CONTENT_LENGTH));
}
Hi, thanks for reporting the issue, is the url public or private? Is hard to test it without a proper example.
Are you sure that the format is MJPEG? Several user in the past reported similar issue but the stream format wasn't correct
yes, I'm using another desktop application that only accepts MJEG and works well.
is url internal network
url is private working well for couple minutes
this url public http://71.201.238.186/ipcam/mjpegcif.cgi
ONLY in this resolution working well (352x240)
Are you happy with the lower resolution? Would that make the difference on your mobile app? It looks like is a very specific edge case, not sure how can i help on this
Yes, this the problem must be 640x480. the lower is 352x240. camera are running in 640x480 I can change this.
yes you can help , how to I'm can change via code this resolution.
You can't change the resolution via code, usually you should be able to pass it as parameter to your url. But you need to look at the docs of your camera, for example set the url to something like
http://71.201.238.186/ipcam/mjpegcif.cgi?size=XXX
hi, sorry me again but this option
public class MjpegViewDefault extends AbstractMjpegView {
@OverRide
public void setResolution(int width, int height) {
throw new UnsupportedOperationException("not implemented");
}
}
Hi, can you please provide more details?