Motion - Bug Report 2005x 01x 16x 030209

BUG: The streaming netcam feature doesn't appear to work with the Panasonic KX-HCM280.

The streaming netcam feature used with a Panasonic KX-HCM280 produces errors and terminates motion.

Security is enabled on the camera.

netcam_userpass motion:debug

As a sanity check, I entered the URL (http://xxx.xxx.xxx.xxx:xxxxx/nphMotionJpeg?Resolution=320x240&Quality=Clarity) into my browser (IE); it produces a 'save file' dialog box and starts a never ending download of the stream as expected.

Test case

Here are the relevant output files:

motion output:
--------------
$ ../motion/bin/motion
Processing thread 0 - config file motion.conf
Processing thread 1 - config file /usr/config/camera1.properties
Webcam port for thread 1 is 0
Thread1 device: http://192.168.254.51:10051/nphMotionJpeg?Resolution=320x240&Quality=Clarity input: -1
Netcam: thread 1: starting...
[HTTP/1.0 200 OK]
Netcam: mjpeg stream
Netcam: netcam->boundary_string [--myboundary]
Netcam: thread 1: thread PID: 5117
Corrupt JPEG data: premature end of data segment
Not a JPEG file: starts with 0xff 0xd9
.
.
.
[98 more of these messages]
.
.
.

Not a JPEG file: starts with 0xff 0xd9
Thread exiting
--------------

/var/log/messages:
------------------
Jan 15 18:39:31 cpe1 motion: Processing thread 0 - config file motion.conf
Jan 15 18:39:31 cpe1 motion: Unknown config option: "adjust_rate"
Jan 15 18:39:31 cpe1 motion: Unknown config option: "jpg_cleanup"
Jan 15 18:39:31 cpe1 motion: Unknown config option: "mpeg_encode"
Jan 15 18:39:31 cpe1 motion: Unknown config option: "output_all_on"
Jan 15 18:39:31 cpe1 motion: Unknown config option: "sql_log_timelapse"
Jan 15 18:39:31 cpe1 motion: Processing thread 1 - config file /usr/config/camera1.properties
Jan 15 18:39:31 cpe1 motion: Netcam: thread 1: starting...
Jan 15 18:39:32 cpe1 motion: Somebody stole the video device, lets hope we got his picture
Jan 15 18:39:33 cpe1 motion: motion terminating
-------------

(Note: I still have some extraneous motion parameters)

The following Panasonic API guide PDF document provides detailed info for the stream contents on page 7:

http://panasonic.co.jp/pcc/products/en/netwkcam/download/us/document/cgi_interface_v2.pdf

Environment

Motion version: 3.1.18-snap10
ffmpeg version: 0.4.8
Shared libraries: curl, xmlrpc, ffmpeg, mysql, postgresql
Server OS: RH Linux 2.4.21-20.EL

-- BruceDurham - 16 Jan 2005

Follow up

I've been looking at panasonic documentation , it doesn't support content-length field and the format of the stream seems a bit strange.

* There's not \r\n between content-type and start of image data either end of image and boundary string.

If you can provide me the ip of the camera i can debug remotely.

-- AngelCarpintero - 16 Jan 2005

Please try last snapshot MotionRelease3x1x18snap11

-- AngelCarpintero - 23 Jan 2005

Here is the camera external access info that you've requested:

http://67.169.147.117:10051 (username/password=motion/debug).

I've tried snap11, however the following messages are still appearing with the nphMotionJpeg URL and then motion quits:

$ ../motion/bin/motion
Processing thread 0 - config file motion.conf
Processing thread 1 - config file /usr/config/camera1.properties
Webcam port for thread 1 is 0
Thread1 device: http://192.168.254.51:10051/nphMotionJpeg?Resolution=320x240&Quality=Standard input: -1
Netcam: thread 1: starting...
[HTTP/1.0 200 OK]
Netcam: mjpeg stream
Netcam: netcam->boundary_string [--myboundary]
Netcam: thread 1: thread PID: 26806
Not a JPEG file: starts with 0x0a 0x0c
.
.
.
(99 more of these)
.
.
.
$

/var/log/messages shows:

Jan 24 01:14:15 cpe1 motion: Netcam: thread 1: starting...
Jan 24 01:14:20 cpe1 motion: Capture error Success

-- BruceDurham - 24 Jan 2005

I've tried it uses a weird mjpeg format that even mozilla/firefox is not able to understand . Anyway i'll try to know how to integrate ... but i don't promise anything.

-- AngelCarpintero - 25 Jan 2005

I've a patch that fix your problem , i'll release as soon as i verify there's not race condictions with others cameras.

-- AngelCarpintero - 06 Feb 2005

Fix record

Fixed with post-3 patch , reopen if errors remains.

-- AngelCarpintero - 08 Feb 2005


Bugfix released in 3.1.19

There is a newer related bug reported http://www.lavrsen.dk/twiki/bin/view/Motion/BugReport2005x03x06x023010 which is still open at the time this bug is closed.

-- KennethLavrsen - 10 Mar 2005

BugReportForm edit

TopicTitle The streaming netcam feature doesn't appear to work with the Panasonic KX-HCM280.
BugStatus Released
AssignedBugTo AngelCarpintero
SubmittedBy BruceDurham
Topic revision: r9 - 10 Mar 2005, KennethLavrsen
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.