Send Motion-user mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/motion-user
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Motion-user digest..."
Today's Topics:
1. Re: Corrupt/incomplete JPG images (Rich Bloch)
2. Re: Thanks! (Scott Holmes)
----------------------------------------------------------------------
Message: 1
Date: Sun, 20 Mar 2016 15:50:26 +0000
From: Rich Bloch <[email protected]>
Subject: Re: [Motion-user] Corrupt/incomplete JPG images
To: Motion discussion list <[email protected]>
Message-ID:
<CAHdt+so261yn9tfecv52c6=2jrYzgPHghkWXHRaK=mumqgz...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
@tosiara,
Thanks for the clarification.
I understand the corruption issue, but what I'm really interested in is how
to flag this in Motion so I can decide what to do with a corrupt image.
For example, it might make sense to test for image corruption within Motion
if Motion doesn't currently know about a corrupted image. In my particular
use case, I can ignore a corrupted image entirely, so Motion doesn't
generate a motion event.
Thanks again.
On Sun, Mar 20, 2016 at 7:16 AM tosiara <[email protected]> wrote:
> FFmpeg is not involved in any way here. Network mjpeg stream is downloaded
> using socket read and decoded using libjpeg. If it complains about bad jpeg
> - it is bad then.
> If you want you can hook wireshark on the same box where motion runs and
> extract raw frames. If you try to feed raw frames to imagemagic it will
> also give you the same warning
> On Mar 20, 2016 05:34, "Rich Bloch" <[email protected]> wrote:
>
>> @tosiara,
>>
>> Yes, I think you're correct that the issue may be related to FFMPEG. At
>> minimum, I can say that the "Corrupt JPEG data" error message is not from
>> Motion.
>>
>> Here's a segment of motion.log that captures the corrupt JPG encoding.
>> These corruption messages correlate well with bad JPG images generated in
>> Motion (gray boxes in an incomplete image: the example I had originally
>> posted):
>>
>> [1] [DBG] [VID] [Mar 18 17:19:50] v4l2_next: 2) vid_source->pframe 1
>>> [1] [DBG] [VID] [Mar 18 17:19:50] v4l2_next: 3) vid_source->pframe 2
>>> vid_source->buf.index 2
>>> [1] [DBG] [VID] [Mar 18 17:19:50] v4l2_next: vid_source->buf.bytesused
>>> 614400
>>> [1] [DBG] [VID] [Mar 18 17:19:50] v4l2_next: the_buffer index 2 Address
>>> (d5fb4000)
>>> [1] [DBG] [VID] [Mar 18 17:19:50] v4l2_next: 1) vid_source->pframe 2
>>> [4] [DBG] [NET] [Mar 18 17:19:50] netcam_read_html_jpeg: Calculated
>>> frame time 2891344.500000
>>> [4] [INF] [NET] [Mar 18 17:19:50] netcam_check_content_type:
>>> Content-type image/jpeg
>>> [4] [INF] [NET] [Mar 18 17:19:50] netcam_init_jpeg: ***new pic delay
>>> successful***
>>> [4] [INF] [NET] [Mar 18 17:19:50] netcam_check_content_length:
>>> Content-Length -1
>>> [4] [INF] [NET] [Mar 18 17:19:50] netcam_check_content_length:
>>> Content-Length 31585
>>> [4] [INF] [NET] [Mar 18 17:19:50] netcam_read_next_header: Found image
>>> header record
>>> [4] [INF] [NET] [Mar 18 17:19:50] netcam_init_jpeg: jpeg_error 0
>>> [4] [INF] [NET] [Mar 18 17:19:50] netcam_image_conv: jpeg_error 0
>>> [5] [INF] [NET] [Mar 18 17:19:50] netcam_check_content_type:
>>> Content-type image/jpeg
>>> [5] [INF] [NET] [Mar 18 17:19:50] netcam_check_content_length:
>>> Content-Length -1
>>> [5] [INF] [NET] [Mar 18 17:19:50] netcam_check_content_length:
>>> Content-Length 33952
>>> [5] [INF] [NET] [Mar 18 17:19:50] netcam_read_next_header: Found image
>>> header record
>>> [4] [INF] [NET] [Mar 18 17:19:50] netcam_proc_jpeg: processing jpeg
>>> image - content length 31372
>>> [3] [INF] [NET] [Mar 18 17:19:50] netcam_check_content_type:
>>> Content-type image/jpeg
>>> [3] [INF] [NET] [Mar 18 17:19:50] netcam_check_content_length:
>>> Content-Length -1
>>> [3] [INF] [NET] [Mar 18 17:19:50] netcam_check_content_length:
>>> Content-Length 28648
>>> [3] [INF] [NET] [Mar 18 17:19:50] netcam_read_next_header: Found image
>>> header record
>>> [2] [DBG] [NET] [Mar 18 17:19:50] netcam_read_html_jpeg: Calculated
>>> frame time 154269.718750
>>> [2] [INF] [NET] [Mar 18 17:19:50] netcam_init_jpeg: ***new pic delay
>>> successful***
>>> [2] [INF] [NET] [Mar 18 17:19:50] netcam_init_jpeg: jpeg_error 0
>>>
>>> *[2] [DBG] [NET] [Mar 18 17:19:50] netcam_output_message: Corrupt JPEG
>>> data: 1 extraneous bytes before marker 0xd9*[2] [INF] [NET] [Mar 18
>>> 17:19:50] netcam_image_conv: jpeg_error 0
>>> [2] [INF] [NET] [Mar 18 17:19:50] netcam_proc_jpeg: processing jpeg
>>> image - content length 46140
>>
>>
>> I've looked through Motion sources--jpeg_utils.c and video_common.c--and
>> from the short time walking through the code, decode_jpeg_raw() is getting
>> called and should return 1 if image corruption is detected. However, it
>> does not appear to be doing this. Rather, the image corruption is happening
>> in the FFMPEG lib internally, and that state is does not appear to be
>> getting passed back into Motion.
>>
>> I'm currently running Motion 3.2.12 on Ubuntu 15.04. FFMPEG on this box
>> is v2.5.10, while the current release of FFMPEG just revved to v3.0.0. So,
>> I may need to rev this lib to see if the issue is still reproducible in the
>> current (or a prior) release of FFMPEG.
>>
>> Just to put this into some context, the only time I seem to run into
>> these corrupt images is with my IP cams with poor (read: variable) WIFI
>> reception.
>>
>> This suggests that there is an edge case (likely in FFMPEG) that may not
>> be fully exercised. That is, if there's a delay during the encoding of a
>> data stream because of intermittent wireless reception, the encoder may
>> time-out and fail rather than wait a longer period of time, or retry
>> encoding. This is all pure speculation at this point, of course.
>>
>> Going forward, to verify these assumptions, I'll likely need to sit on
>> the Motion sources, and walk through a debug session. Revving the FFMPEG
>> lib seems a quicker path to resolution at the moment :).
>>
>> Thoughts?
>>
>> BTW, it appears that this issue has a very long history in Motion
>> (causing me to speculate that the issue perhaps has less to do with FFMPEG
>> unless this specific issue has been latent in the FFMPEG lib for ~10
>> years). Unfortunately, in my backtracking through bug reports, there
>> appears to be no documented resolution :/.
>>
>> Thanks
>>
>> Rich
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Transform Data into Opportunity.
>> Accelerate data analysis in your applications with
>> Intel Data Analytics Acceleration Library.
>> Click to learn more.
>>
> http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
>
>
>> _______________________________________________
>> Motion-user mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/motion-user
>> http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome
>>
>>
> ------------------------------------------------------------------------------
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
> _______________________________________________
> Motion-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/motion-user
> http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome
>
-------------- next part --------------
An HTML attachment was scrubbed...
------------------------------
Message: 2
Date: Wed, 23 Mar 2016 04:33:34 +0000 (UTC)
From: Scott Holmes <[email protected]>
Subject: Re: [Motion-user] Thanks!
To: Motion discussion list <[email protected]>
Message-ID:
<[email protected]>
Content-Type: text/plain; charset="utf-8"
This reminds me of "The Blender Defender".? Same sort of thing, but using a
kitchen blender for noise + movement and a strobe light to add to the "shock
and awe" factor
http://www.plasma2002.com/blenderdefender/
From: tosiara <[email protected]>
To: Frank W. Samuelson <[email protected]>; Motion discussion list
<[email protected]>
Sent: Friday, 18 March 2016, 20:20
Subject: Re: [Motion-user] Thanks!
Amazing! :D
For sure, you can go ahead and update Motion's wiki page and provide your
project details there. I'd vote this is best project ever
http://www.lavrsen.dk/foswiki/bin/view/Motion/LinksToMotionWebcams
On Fri, Mar 18, 2016 at 1:02 AM, Frank W. Samuelson
<[email protected]> wrote:
I just wanted to say thanks to those who work on and support
motion, and made the following web page possible:
http://www.merrill-samuelson.com/permanent_display/BadCat/BadCat.html
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
_______________________________________________
Motion-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/motion-user
http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
_______________________________________________
Motion-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/motion-user
http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome
-------------- next part --------------
An HTML attachment was scrubbed...
------------------------------
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
------------------------------
_______________________________________________
Motion-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/motion-user
End of Motion-user Digest, Vol 118, Issue 9
*******************************************