public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] OT: In search of a hint/ides: Loop recording of a webcam
@ 2014-09-06 12:59 meino.cramer
  2014-09-06 14:48 ` Neil Bothwick
  2014-09-06 18:57 ` J. Roeleveld
  0 siblings, 2 replies; 7+ messages in thread
From: meino.cramer @ 2014-09-06 12:59 UTC (permalink / raw
  To: Gentoo

Hi,

may be the software I am looking for already exists of
can easily created by plugging together already existing pieces:

With a Logitech c920 webcam (Full HD) I plan to record birds on
my roof.
I need to record "everything": Starting from the birds landing
on the roof until the fligh away again.

Since the camera delivers Full HD video AND I need the "complete
movie" of the bird motion detection is not suitable here: Decoding
analyzing and reencoding in case of recording would take to much
horsepower...

But
Normally I will recogize the birds after the landed on the roof.

My idea is to do something like loop recoording:
The stream is cut into pieces of 5 minutes length.

If I dont hit "ENTER" (or something similar) the previously recorded
piece of video gets delted after the current one has been completly
recorded.

If I hit ENTER no deletion is performed until I hit ENTER again.

I already have a script hacked together with a gst-launch command,
which is able to fetch the Full HD hardware encoded stream from
the C920 and put it on the harddisk.

But I failed in creating a script which allows me to simultanously
watch the material which gets recorded just in the same moment.

Is there any software or script or <fill in something appropiate here>
which does this loop recording as described above AND is able to pull
the Full HD stream correctly from the C920?

Where can I proceed?

Thank you very much in advance for any help!
Best regards and have a nice weekend!
mcc




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] OT: In search of a hint/ides: Loop recording of a webcam
  2014-09-06 12:59 [gentoo-user] OT: In search of a hint/ides: Loop recording of a webcam meino.cramer
@ 2014-09-06 14:48 ` Neil Bothwick
  2014-09-06 15:56   ` meino.cramer
  2014-09-06 18:57 ` J. Roeleveld
  1 sibling, 1 reply; 7+ messages in thread
From: Neil Bothwick @ 2014-09-06 14:48 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1031 bytes --]

On Sat, 6 Sep 2014 14:59:34 +0200, meino.cramer@gmx.de wrote:

> I already have a script hacked together with a gst-launch command,
> which is able to fetch the Full HD hardware encoded stream from
> the C920 and put it on the harddisk.
> 
> But I failed in creating a script which allows me to simultanously
> watch the material which gets recorded just in the same moment.
> 
> Is there any software or script or <fill in something appropiate here>
> which does this loop recording as described above AND is able to pull
> the Full HD stream correctly from the C920?

Have your script send the video stream to stdout and pipe it through tee,
which will both send it to a file and back to stdout, where your video
player is listening.

Have you actually tried using motion detection software? I don't know how
powerful your system is, but I have motion processing three SD
streams simultaneously with no significant CPU usage.


-- 
Neil Bothwick

Always remember you're unique, just like everyone else.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] OT: In search of a hint/ides: Loop recording of a webcam
  2014-09-06 14:48 ` Neil Bothwick
@ 2014-09-06 15:56   ` meino.cramer
  2014-09-07  8:23     ` Neil Bothwick
  0 siblings, 1 reply; 7+ messages in thread
From: meino.cramer @ 2014-09-06 15:56 UTC (permalink / raw
  To: gentoo-user


Hi Neil,

Thanks for reply! :)

As mentioned motion detection software is not appropiate 
for this, since it detects motion ... that is: The bird/s
are already "in sight"...add the reaction time between "bird
is there" and "motion detection has recognized that there is a
bird" and all the false alarms if a bee is flying through the 
video or a distant bird flies through but does not land etc...

I will try the tee-trick (by the way I like tea... ;) and 
see, what happens.

Thanks again for your help! Have a nice weekend!
Best regards,
mcc




Neil Bothwick <neil@digimed.co.uk> [14-09-06 16:52]:
> On Sat, 6 Sep 2014 14:59:34 +0200, meino.cramer@gmx.de wrote:
> 
> > I already have a script hacked together with a gst-launch command,
> > which is able to fetch the Full HD hardware encoded stream from
> > the C920 and put it on the harddisk.
> > 
> > But I failed in creating a script which allows me to simultanously
> > watch the material which gets recorded just in the same moment.
> > 
> > Is there any software or script or <fill in something appropiate here>
> > which does this loop recording as described above AND is able to pull
> > the Full HD stream correctly from the C920?
> 
> Have your script send the video stream to stdout and pipe it through tee,
> which will both send it to a file and back to stdout, where your video
> player is listening.
> 
> Have you actually tried using motion detection software? I don't know how
> powerful your system is, but I have motion processing three SD
> streams simultaneously with no significant CPU usage.
> 
> 
> -- 
> Neil Bothwick
> 
> Always remember you're unique, just like everyone else.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] OT: In search of a hint/ides: Loop recording of a webcam
  2014-09-06 12:59 [gentoo-user] OT: In search of a hint/ides: Loop recording of a webcam meino.cramer
  2014-09-06 14:48 ` Neil Bothwick
@ 2014-09-06 18:57 ` J. Roeleveld
  1 sibling, 0 replies; 7+ messages in thread
From: J. Roeleveld @ 2014-09-06 18:57 UTC (permalink / raw
  To: gentoo-user

On 6 September 2014 14:59:34 CEST, meino.cramer@gmx.de wrote:
>Hi,
>
>may be the software I am looking for already exists of
>can easily created by plugging together already existing pieces:
>
>With a Logitech c920 webcam (Full HD) I plan to record birds on
>my roof.
>I need to record "everything": Starting from the birds landing
>on the roof until the fligh away again.
>
>Since the camera delivers Full HD video AND I need the "complete
>movie" of the bird motion detection is not suitable here: Decoding
>analyzing and reencoding in case of recording would take to much
>horsepower...
>
>But
>Normally I will recogize the birds after the landed on the roof.
>
>My idea is to do something like loop recoording:
>The stream is cut into pieces of 5 minutes length.
>
>If I dont hit "ENTER" (or something similar) the previously recorded
>piece of video gets delted after the current one has been completly
>recorded.
>
>If I hit ENTER no deletion is performed until I hit ENTER again.
>
>I already have a script hacked together with a gst-launch command,
>which is able to fetch the Full HD hardware encoded stream from
>the C920 and put it on the harddisk.
>
>But I failed in creating a script which allows me to simultanously
>watch the material which gets recorded just in the same moment.
>
>Is there any software or script or <fill in something appropiate here>
>which does this loop recording as described above AND is able to pull
>the Full HD stream correctly from the C920?
>
>Where can I proceed?
>
>Thank you very much in advance for any help!
>Best regards and have a nice weekend!
>mcc

A very long time ago (around 1999) I wrote a simple tool that allowed me to have 2 normal clients access the same stream.
It consisted of a simple V4L client tool that hooked I to /dev/video0 and copied all the data to /dev/video1 and /dev/video3.
I then had a kernel module taking the data from /dev/video1 and outputting it to /dev/video2 (and same for 3 and 4).

This did work back then. To allow motion to work on video2 and a streaming webcam on a public website on video4.

 Something similar might exist for V4L2.

--
Joost
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] OT: In search of a hint/ides: Loop recording of a webcam
  2014-09-06 15:56   ` meino.cramer
@ 2014-09-07  8:23     ` Neil Bothwick
  2014-09-07 16:22       ` meino.cramer
  0 siblings, 1 reply; 7+ messages in thread
From: Neil Bothwick @ 2014-09-07  8:23 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 998 bytes --]

On Sat, 6 Sep 2014 17:56:33 +0200, meino.cramer@gmx.de wrote:

> As mentioned motion detection software is not appropiate 
> for this, since it detects motion ... that is: The bird/s
> are already "in sight"...add the reaction time between "bird
> is there" and "motion detection has recognized that there is a
> bird" and all the false alarms if a bee is flying through the 
> video or a distant bird flies through but does not land etc...

Motion buffers the last few seconds of video and includes it with the
recording when it detects motion, the number of seconds is configurable.

There are also many options to tweak for the detection, such as only
looking at specific portions of the image. Some false alarms are
inevitable but you would spend less time looking through those than
watching a live stream.

Only you can decide what works best for you, but check the options
thoroughly before you dismiss motion detection.


-- 
Neil Bothwick

There's no place like ~

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] OT: In search of a hint/ides: Loop recording of a webcam
  2014-09-07  8:23     ` Neil Bothwick
@ 2014-09-07 16:22       ` meino.cramer
  2014-09-07 16:43         ` Neil Bothwick
  0 siblings, 1 reply; 7+ messages in thread
From: meino.cramer @ 2014-09-07 16:22 UTC (permalink / raw
  To: gentoo-user

Neil Bothwick <neil@digimed.co.uk> [14-09-07 10:28]:
> On Sat, 6 Sep 2014 17:56:33 +0200, meino.cramer@gmx.de wrote:
> 
> > As mentioned motion detection software is not appropiate 
> > for this, since it detects motion ... that is: The bird/s
> > are already "in sight"...add the reaction time between "bird
> > is there" and "motion detection has recognized that there is a
> > bird" and all the false alarms if a bee is flying through the 
> > video or a distant bird flies through but does not land etc...
> 
> Motion buffers the last few seconds of video and includes it with the
> recording when it detects motion, the number of seconds is configurable.
> 
> There are also many options to tweak for the detection, such as only
> looking at specific portions of the image. Some false alarms are
> inevitable but you would spend less time looking through those than
> watching a live stream.
> 
> Only you can decide what works best for you, but check the options
> thoroughly before you dismiss motion detection.
> 
> 
> -- 
> Neil Bothwick
> 
> There's no place like ~


Hi Neil,

I got motion "working"....
As it seems, it does not support h264 compressed streams. It switches
back the camera to YUVY, which increases the bandwidth on USB2. In
turn the frame rate of the recorded video dropps: The video looks
like awkward old-school "stop-motion" movies.
And audio is also missing.

Sorry for the bad news...

Best regards,
mcc





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] OT: In search of a hint/ides: Loop recording of a webcam
  2014-09-07 16:22       ` meino.cramer
@ 2014-09-07 16:43         ` Neil Bothwick
  0 siblings, 0 replies; 7+ messages in thread
From: Neil Bothwick @ 2014-09-07 16:43 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 514 bytes --]

On Sun, 7 Sep 2014 18:22:58 +0200, meino.cramer@gmx.de wrote:

> I got motion "working"....
> As it seems, it does not support h264 compressed streams. It switches
> back the camera to YUVY, which increases the bandwidth on USB2. In
> turn the frame rate of the recorded video dropps: The video looks
> like awkward old-school "stop-motion" movies.
> And audio is also missing.
> 
> Sorry for the bad news...

Ah well, it was worth a try.


-- 
Neil Bothwick

When the going gets tough, upgrade.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-09-07 16:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-06 12:59 [gentoo-user] OT: In search of a hint/ides: Loop recording of a webcam meino.cramer
2014-09-06 14:48 ` Neil Bothwick
2014-09-06 15:56   ` meino.cramer
2014-09-07  8:23     ` Neil Bothwick
2014-09-07 16:22       ` meino.cramer
2014-09-07 16:43         ` Neil Bothwick
2014-09-06 18:57 ` J. Roeleveld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox