Motion - Netcam First Header

NetcamFirstHeader

Introduction

I use motion-3.2.1 (only as streaming webserver) on an old Pentium with 2 cams. Then a second motion is running from my working desktop with 2 threads using netcam.

Sometimes at starting motion is see (not every start):

Not a JPEG file: starts with 0x33 0xeb

and motion exits frown, sad smile

I made a patch for skipping this jpeg and reading again up to MAX_HEADER_RETRIES (20) jpeg"s till return with error -1 in netcam_start.

now i see:

Not a JPEG file: starts with 0x33 0xeb
[2] netcam: jpeglib read header failed
Not a JPEG file: starts with 0x33 0xeb
[2] netcam: jpeglib read header failed
Not a JPEG file: starts with 0x00 0xd0
[2] netcam: jpeglib read header failed
Not a JPEG file: starts with 0x00 0xd0
[2] netcam: jpeglib read header failed

and motion is running smile

Description of Patch

If an error with jepg decomression occured at connecting to a mjpeg streaming webcam, this patch skips this jpeg and tries to decompress next jpeg up to MAX_HEADER_RETRIES (20).

Installation of Patch

patch <NetcamFirstHeader.diff

Change History of Patch

  • motion-3.2.1-netcamfirstheader-1 , 17 Jun 2005
    • Initial Release against motion-3.2.1 (with goto)

  • motion-3.2.1-netcamfirstheader-2 , 23 Jun 2005
    • netcam streaming connect - decompress next jpeg if current fails up to MAX_HEADER_RETRIES (20).

Discussion and Comments


Topic revision: r4 - 13 Aug 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.