Motion - Support Question 2007x 01x 13x 195435

Unable to connect to TrendNet IP-301W camera

Question

I'm setting up Motion for the first time. I can access the camera via it's normal web interface. The camera is running in M-JPEG mode, not MPEG mode. I believe the url to use is: http://192.168.1.30/goform/video. Calling that from a browser gives a message saying it's an image/mpeg file. Saving it, and renaming it to .jpg, gives a displayable jpg image. However, Motion throws an "Error reading first header" message. It re-tries over and over again but no luck. The image at motion port8081 says it has lost contact with the camera. I tried /goform/video2 with similar results. Both these address will play in VLC although it has to do repeated calls to the url to get a series of still pictures. Many thanks for any help you can offer.

Running CENTOS(RHEL) 4.4 with Motion 3.2.7.

[0] Processing thread 0 - config file motion.conf
[0] Motion running in setup mode.
[0] Thread 1 is from motion.conf
[0] Thread 1 is device: http://192.168.1.30/goform/video input -1
[0] Waiting for threads to finish, pid: 15207
[1] Thread started
[1] Camera thread starting...
[0] motion-httpd/3.2.7 running, accepting connections
[0] motion-httpd: waiting for data on port TCP 8080
[1] Received first header
[1] Received first header
[1] Received first header
[1] Received first header
[1] Received first header
[1] Received first header
[1] Received first header
[1] Unrecognized content type
[1] Error reading first header - re-trying
[1] Received first header
[1] Received first header
....above 10 lines repeated several time until:
[1] Received first header
[1] Received first header
[1] Received first header
[1] Unrecognized content type
[1] Error reading first header - re-trying
[1] Failed to read first camera header - giving up for now
[1] Could not fetch initial image from network camera
[1] Motion continues using width and height from config file(s)
[1] Started stream webcam server in port 8081

Environment

Motion version: 3.2.7
ffmpeg version: CVS from Motion site
Libraries: ffmpeg, mysql
Server OS: CENTOS(RHEL) 4.4

-- JohnAnderson - 13 Jan 2007

Answer

Seems that your camera doesn't support jpeg/multipart-x-mixed , only M-JPEG and MPEG-4 as output formats.

-- AngelCarpintero - 14 Jan 2007

Followup

Thank you for the quick reply. I will return the camera and try to add a note to the 'supported devices' so that others will not make the same mistake. It appears that one has to use the xplugmpg4tw.jar java applet to read the stream. More and more of the network cameras are MPEG4 only, and of the remaining ones that support M-JPEG a special applet has to be used to read the stream. I will see if I can locate a low-light one that will work. Thanks again. ....John


Hi John ,

i'm working to add MJPEG ( Motion JPEG ) support to motion , so i think that once i got it working for V4L2 will be easy to add support for netcam. Anyway feel free to return your camera if you think it's not a good option for you.

If you decide you return your camera , could you try if firefox is able to play the MJPEG stream ? Also if you can capture a stream will help us to see the format of your camera.

-- AngelCarpintero - 15 Jan 2007
Topic revision: r4 - 15 Jan 2007, AngelCarpintero
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.