linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Replacement for vloopback?
@ 2013-02-06 13:57 Neuer User
  2013-02-06 14:31 ` Rémi Denis-Courmont
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Neuer User @ 2013-02-06 13:57 UTC (permalink / raw)
  To: linux-media

Hello

I need to have access to my webcam from two applications (one is
"motion", the other a video sip phone).

I have googled a lot, but only found vloopback as a method to access a
video device from two applications. However, vloopback seems to rely on
V4L1 which is mostly no longer compiled into the kernel by most distros.
Additionally, it does not seem to compile against newer kernels.

So, my question ist: Is vloopback the right way to go for this
requirement? If yes, how to get it working?

If not, what can I use to have two apps accessing the video stream from
the webcam?

Thanks a lot for any help

Michael


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

* Re: Replacement for vloopback?
  2013-02-06 13:57 Replacement for vloopback? Neuer User
@ 2013-02-06 14:31 ` Rémi Denis-Courmont
  2013-02-06 14:42 ` Neuer User
  2013-02-06 15:14 ` Neuer User
  2 siblings, 0 replies; 6+ messages in thread
From: Rémi Denis-Courmont @ 2013-02-06 14:31 UTC (permalink / raw)
  To: Neuer User; +Cc: linux-media

On Wed, 06 Feb 2013 14:57:43 +0100, Neuer User <auslands-kv@gmx.de> wrote:

> So, my question ist: Is vloopback the right way to go for this

> requirement? If yes, how to get it working?



No. Video loopback is just a way for an application to expose a virtual

camera, for another application to use. It is not a way to share a camera

within two applications.



Sharing a camera is fundamentally impossible due to the limitation of the

hardware, which cannot capture in two different formats and sets of buffers

simultaneously. Live with it.



-- 

Rémi Denis-Courmont

Sent from my collocated server

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

* Re: Replacement for vloopback?
  2013-02-06 13:57 Replacement for vloopback? Neuer User
  2013-02-06 14:31 ` Rémi Denis-Courmont
@ 2013-02-06 14:42 ` Neuer User
  2013-02-06 14:51   ` Devin Heitmueller
  2013-02-06 15:14 ` Neuer User
  2 siblings, 1 reply; 6+ messages in thread
From: Neuer User @ 2013-02-06 14:42 UTC (permalink / raw)
  To: linux-media

Thanks for answering.

The vloopback description seems to imply that it is possible to share a
camera stream:

"How to use multiple webcam applications with vloopback

[...]
Do "modprobe vloopback pipes=2". Then "resize /dev/video0 /dev/video1
640x480 640x480 & resize /dev/video2 /dev/video3 640x480 320x240".
(Assuming that you have only one real video device at /dev/video0. You
can check with dmesg).

Now, you can watch your webcam with camstream at 640x480 (choose the
device called vloopback0 output in camstream's menu, which is
/dev/video2), at the sime time you can record a video of your webcam
stream at 320x240 by doing "ffmpeg -vd /dev/video4 -s 320x240
picture.mpeg", you can at the same time run a webcam http server by
running "camsource" (after editting camsource.conf to choose /dev/video2
or /dev/video4 as v4l_input source)."

If it is not possible to have two applications access the same video
stream, that is pretty detrimentical to quite a lot of use cases, e.g.:

a.) Use motion to detect motion and record video. At the same time view
the camera output on the screen.

b.) Stream a webcam output over the net and at the same time view it on
the screen.


Actually, for me it would be no problem, if the stream needs to be the
same format etc.

So, really no way? :-(

Thanks

Michael



> On Wed, 06 Feb 2013 14:57:43 +0100, Neuer User <auslands-kv@gmx.de> wrote:
>> So, my question ist: Is vloopback the right way to go for this
>> requirement? If yes, how to get it working?
> 
> No. Video loopback is just a way for an application to expose a virtual
> camera, for another application to use. It is not a way to share a camera
> within two applications.
> 
> Sharing a camera is fundamentally impossible due to the limitation of the
> hardware, which cannot capture in two different formats and sets of buffers
> simultaneously. Live with it.
> 
> -- Rémi Denis-Courmont Sent from my collocated server 




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

* Re: Replacement for vloopback?
  2013-02-06 14:42 ` Neuer User
@ 2013-02-06 14:51   ` Devin Heitmueller
  2013-02-06 14:57     ` Neuer User
  0 siblings, 1 reply; 6+ messages in thread
From: Devin Heitmueller @ 2013-02-06 14:51 UTC (permalink / raw)
  To: Neuer User; +Cc: linux-media

On Wed, Feb 6, 2013 at 9:42 AM, Neuer User <auslands-kv@gmx.de> wrote:
> If it is not possible to have two applications access the same video
> stream, that is pretty detrimentical to quite a lot of use cases, e.g.:
>
> a.) Use motion to detect motion and record video. At the same time view
> the camera output on the screen.
>
> b.) Stream a webcam output over the net and at the same time view it on
> the screen.

FWIW:  usually when people ask for this sort of functionality
(performing multiple functions on the same stream), they will
typically use frameworks like gstreamer, which allow for creation of
pipelines to perform the sorts of use cases you have described.

Devin

-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com

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

* Re: Replacement for vloopback?
  2013-02-06 14:51   ` Devin Heitmueller
@ 2013-02-06 14:57     ` Neuer User
  0 siblings, 0 replies; 6+ messages in thread
From: Neuer User @ 2013-02-06 14:57 UTC (permalink / raw)
  To: linux-media

Well, I have a (what I think) pretty simple use case here, but without
any gstreamer involved:

I have a software video sip phone (based on pjsip). I would like to
automatically initiate a video call when there is a certain amount of
motion detected.

Both software packages access a v4l device. I have no idea how to change
that to a gstreamer pipe. Ma guess is that it will probably be very
difficult :-(

Michael

Am 06.02.2013 15:51, schrieb Devin Heitmueller:
> On Wed, Feb 6, 2013 at 9:42 AM, Neuer User <auslands-kv@gmx.de> wrote:
>> If it is not possible to have two applications access the same video
>> stream, that is pretty detrimentical to quite a lot of use cases, e.g.:
>>
>> a.) Use motion to detect motion and record video. At the same time view
>> the camera output on the screen.
>>
>> b.) Stream a webcam output over the net and at the same time view it on
>> the screen.
> 
> FWIW:  usually when people ask for this sort of functionality
> (performing multiple functions on the same stream), they will
> typically use frameworks like gstreamer, which allow for creation of
> pipelines to perform the sorts of use cases you have described.
> 
> Devin
> 



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

* Re: Replacement for vloopback?
  2013-02-06 13:57 Replacement for vloopback? Neuer User
  2013-02-06 14:31 ` Rémi Denis-Courmont
  2013-02-06 14:42 ` Neuer User
@ 2013-02-06 15:14 ` Neuer User
  2 siblings, 0 replies; 6+ messages in thread
From: Neuer User @ 2013-02-06 15:14 UTC (permalink / raw)
  To: linux-media

Thanks everybody so far.

I just found v4l2loopback and also some examples with gestreamer.

I will do some testing and see if I can get my use case done with that.

Kind regards

Michael

Am 06.02.2013 14:57, schrieb Neuer User:
> Hello
> 
> I need to have access to my webcam from two applications (one is
> "motion", the other a video sip phone).
> 
> I have googled a lot, but only found vloopback as a method to access a
> video device from two applications. However, vloopback seems to rely on
> V4L1 which is mostly no longer compiled into the kernel by most distros.
> Additionally, it does not seem to compile against newer kernels.
> 
> So, my question ist: Is vloopback the right way to go for this
> requirement? If yes, how to get it working?
> 
> If not, what can I use to have two apps accessing the video stream from
> the webcam?
> 
> Thanks a lot for any help
> 
> Michael
> 



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

end of thread, other threads:[~2013-02-06 15:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-06 13:57 Replacement for vloopback? Neuer User
2013-02-06 14:31 ` Rémi Denis-Courmont
2013-02-06 14:42 ` Neuer User
2013-02-06 14:51   ` Devin Heitmueller
2013-02-06 14:57     ` Neuer User
2013-02-06 15:14 ` Neuer User

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).