Unrecognised content type 'text/html'

Forum for questions and support relating to the 1.27.x releases only.
samuel235
Posts: 13
Joined: Sun Oct 12, 2014 1:24 pm

Unrecognised content type 'text/html'

Post by samuel235 »

Hi guys, first time poster here, hope to be around here for a while too!

I've got my Zoneminder server setup, a Raspberry Pi running as a IP Camera using MJPEG Streamer and RPI Cam Web Interface.

I've got my Pi streaming to the point i can go to "192.168.0.15" and it will give me the live stream of the webcam. However, once i add it into zoneminder as a monitor, i can't seem to get it to show a stream. I've got the host name in ZM as "root:zoneminder@192.168.0.15", host port is "80" and host path is "/?action=stream". I'm assuming its connecting to the camera because the error i'm seeing is not to do with connection to the camera, i've highlighted below in the last 8 lines of the log on the ZM Server, please let me know if there is any other information you require.

2014-10-12 14:33:44.617180 zmdc 3588 ERR 'zmc -m 1' exited abnormally, exit status 255 zmdc.pl
2014-10-12 14:33:44.524451 zmc_m1 5079 ERR Failed to capture image from monitor 1 (0/1) zmc.cpp 263
2014-10-12 14:33:44.523982 zmc_m1 5079 ERR Unable to get response zm_remote_camera_http.cpp 1097
2014-10-12 14:33:44.523032 zmc_m1 5079 ERR Unrecognised content type 'text/html' zm_remote_camera_http.cpp 800
2014-10-12 14:33:44.513428 zmc_m1 5079 INF Starting Capture zmc.cpp 191
2014-10-12 14:33:44.063300 zmdc 5079 INF 'zmc -m 1' started at 14/10/12 14:33:44 zmdc.pl
2014-10-12 14:33:44.059940 zmdc 3588 INF 'zmc -m 1' starting at 14/10/12 14:33:44, pid = 5079 zmdc.pl
2014-10-12 14:33:44.043520 zmdc 3588 INF Starting pending process, zmc -m 1 zmdc.pl
Nerre
Posts: 100
Joined: Thu Sep 25, 2014 10:22 am

Re: Unrecognised content type 'text/html'

Post by Nerre »

I have never used mjpeg-streamer (yet, it's on my todo list:), but it seems as if you are getting a web page as response instead of a video stream. Something is probably wrong in the URL, it might be that you are getting an error page.

What happens if you in your web browser connects to
http://root:zoneminder@192.168.0.15:80/?action=stream
samuel235
Posts: 13
Joined: Sun Oct 12, 2014 1:24 pm

Re: Unrecognised content type 'text/html'

Post by samuel235 »

It takes me to the stream, i should have said that i had tried that. I personally think that the server is looking for a html/text page UNLESS stated otherwise, so because i'm doing /?action=stream, its assuming i mean "/?action=stream.html" or "/?action=stream.txt". However, I'm only guessing and I'm probably incorrect.
Nerre
Posts: 100
Joined: Thu Sep 25, 2014 10:22 am

Re: Unrecognised content type 'text/html'

Post by Nerre »

You get the stream, and not a web page with the stream embedded? (Try to "View page source" to make sure.)
samuel235
Posts: 13
Joined: Sun Oct 12, 2014 1:24 pm

Re: Unrecognised content type 'text/html'

Post by samuel235 »

I'm getting a webpage, which is where my issue is, clearly. I've tried for hours to figure out where to find the stream file but i'm having no luck at all. I think i may have an issue with my V4L....

MJPG Streamer Version: svn rev:
i: Using V4L2 device.: /dev/video0
i: Desired Resolution: 640 x 480
i: Frames Per Second.: 15
i: Format............: MJPEG
ERROR opening V4L interface: No such file or directory
Init v4L2 failed !! exit fatal
i: init_VideoIn failed
Nerre
Posts: 100
Joined: Thu Sep 25, 2014 10:22 am

Re: Unrecognised content type 'text/html'

Post by Nerre »

I just started to look at mjpg streamer yesterday but it seems there are several different forks and it's hard to know which version is working.

I'm not sure the RPI Cam is a v4l device (I'm using a regular USB webcam on my pi, but I haven't managed to get a picture yet).
samuel235
Posts: 13
Joined: Sun Oct 12, 2014 1:24 pm

Re: Unrecognised content type 'text/html'

Post by samuel235 »

Nerre wrote:I just started to look at mjpg streamer yesterday but it seems there are several different forks and it's hard to know which version is working.

I'm not sure the RPI Cam is a v4l device (I'm using a regular USB webcam on my pi, but I haven't managed to get a picture yet).
All of the guides ive seen floating around do use V4L i think. I may be incorrect though :D
Nerre
Posts: 100
Joined: Thu Sep 25, 2014 10:22 am

Re: Unrecognised content type 'text/html'

Post by Nerre »

This page mentions you should use the file method for the camera module.
http://jacobsalmela.com/raspberry-pi-we ... -internet/

This page too
http://blog.miguelgrinberg.com/post/how ... spberry-pi

And this one too
http://www.robertcudmore.org/blog/?p=273

Since I don't have the camera module I don't know if it works as a V4L device or not.
samuel235
Posts: 13
Joined: Sun Oct 12, 2014 1:24 pm

Re: Unrecognised content type 'text/html'

Post by samuel235 »

Right okay then, i'll have a look through that today when i get home. Why is it when i do the last command i got the V4L error when asking what version of MJPGstreamer? :s
samuel235
Posts: 13
Joined: Sun Oct 12, 2014 1:24 pm

Re: Unrecognised content type 'text/html'

Post by samuel235 »

Hmmm, I've clean installed Rasbian on my Pi and followed miguelgrinberg's guide, the second link that you provided (It won't let me post with another URL in, its "too spammy"). I'm now able to see a live picture on the zoneminder server however, i'm getting a poor 0.45 FPS, which lets just say is not a "Live stream", Its practically a time lapse stream. Now, i've altered the time lapse option in the following command from 100 to 300, i've also tried 800. Still the same FPS output.
raspistill --nopreview -w 640 -h 480 -q 5 -o /tmp/stream/pic.jpg -tl 100 -t 9999999 -th 0:0:0 &
Now i know that this isn't whats available from the Pi's resources so i'm still trying to get a better output. Whats your opinion on whats going on here? :s
Nerre
Posts: 100
Joined: Thu Sep 25, 2014 10:22 am

Re: Unrecognised content type 'text/html'

Post by Nerre »

I've never used raspistill (I don't have the camera module) so I have no idea.
samuel235
Posts: 13
Joined: Sun Oct 12, 2014 1:24 pm

Re: Unrecognised content type 'text/html'

Post by samuel235 »

Okay, well thank you for your help, i hope someone strolls across this thread and attempts to throw some light onto the situation :P

However, you should get the camera module, normal or NOIR, they are fantastic!
Nerre
Posts: 100
Joined: Thu Sep 25, 2014 10:22 am

Re: Unrecognised content type 'text/html'

Post by Nerre »

I've just started playing around with the Pi and my idea is to connect two cheap USB webcams to it instead of the camera module. But I don't even know if I'm gonna use it, seems a lot easier to use IP cameras (and old Android phones with the IP Webcam app).
samuel235
Posts: 13
Joined: Sun Oct 12, 2014 1:24 pm

Re: Unrecognised content type 'text/html'

Post by samuel235 »

Well, i chose this route simply because of running costs. I might end up going for the IP Camera route though. I'll leep trying with this for a while first though!
User avatar
iconnor
Posts: 2904
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Unrecognised content type 'text/html'

Post by iconnor »

I've got a pi with camera, and am slowly working on native zm support for it...

Also will play with mjpgstreamer... today... see if I can figure out your problem.
Locked