[sip-comm-dev] Question about Linux video capture


#1

Hello,

I use Debian Squeeze and saw talk about native capture on all platforms. But my webcam is still shown as civil:/dev/video0:0 not v4l: or v4l2: on build 275x.
Is this how it is supposed to be?

Regards,

Kertesz Laszlo

-- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

···

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#2

Hi,

Some of V4L2 format are still missing (for example MJPEG).

Please send the output of v4l-info (part of v4l-conf package) so that we can see which format your webcam has.

Regards,

···

--
Seb

Le 18/06/2010 17:41, Kertesz Laszlo a écrit :

Hello,

I use Debian Squeeze and saw talk about native capture on all platforms. But my webcam is still shown as civil:/dev/video0:0 not v4l: or v4l2: on build 275x.
Is this how it is supposed to be?

Regards,

Kertesz Laszlo

-- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#3

My webcam is a cheapo webcam - in most programs (Skype, Pidgin etc) works only with the
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so prefix.
I attached the v4l-info output. As far as i know it sends motion jpeg stream.
But it works fine with Sip Communicator as is.

What are the benefits of the native platform-specific capture in Sip Communicator?

Regards,

Kertesz Laszlo

v4l-info.txt (2.81 KB)

···

On Fri, 18 Jun 2010 18:46:45 +0300, Sebastien Vincent <seb@sip-communicator.org> wrote:

Hi,

Some of V4L2 format are still missing (for example MJPEG).

Please send the output of v4l-info (part of v4l-conf package) so that we can see which format your webcam has.

Regards,
--
Seb

Le 18/06/2010 17:41, Kertesz Laszlo a écrit :

Hello,

I use Debian Squeeze and saw talk about native capture on all platforms. But my webcam is still shown as civil:/dev/video0:0 not v4l: or v4l2: on build 275x.
Is this how it is supposed to be?

Regards,

Kertesz Laszlo

-- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

-- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/


#4

Hi,

My webcam is a cheapo webcam - in most programs (Skype, Pidgin etc) works only with the
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so prefix.
I attached the v4l-info output. As far as i know it sends motion jpeg stream.
But it works fine with Sip Communicator as is.

Thanks. Your v4l-info output means your webcam use JPEG (different from MJPEG). I have already some code in my sandbox to support MJPEG (and JPEG with some minor addition) but it is not ready yet.

What are the benefits of the native platform-specific capture in Sip Communicator?

The main benefit is to use directly FFmpeg format conversion with the native webcam output. Lti-civil based devices always convert captured data format to RGB first, in most cases this conversion is useless (if we can do directly YUV422 to YUV420 with ffmpeg, why do YUV422 -> RGB24 -> YUV420) and thus we can save system resources (CPU, memory).

Regards,

···

Le 19/06/2010 07:16, Kertesz Laszlo a écrit :
--
Seb

Regards,

Kertesz Laszlo

On Fri, 18 Jun 2010 18:46:45 +0300, Sebastien Vincent > <seb@sip-communicator.org> wrote:

Hi,

Some of V4L2 format are still missing (for example MJPEG).

Please send the output of v4l-info (part of v4l-conf package) so that we can see which format your webcam has.

Regards,
--
Seb

Le 18/06/2010 17:41, Kertesz Laszlo a écrit :

Hello,

I use Debian Squeeze and saw talk about native capture on all platforms. But my webcam is still shown as civil:/dev/video0:0 not v4l: or v4l2: on build 275x.
Is this how it is supposed to be?

Regards,

Kertesz Laszlo

-- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

-- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#5

Hi,

JPEG and MJPEG support for V4L2 devices has been integrated in revision 7297. Please give it a try and tell me if it works for you.

Regards,

···

--
Seb

Le 19/06/2010 07:16, Kertesz Laszlo a écrit :

My webcam is a cheapo webcam - in most programs (Skype, Pidgin etc) works only with the
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so prefix.
I attached the v4l-info output. As far as i know it sends motion jpeg stream.
But it works fine with Sip Communicator as is.

What are the benefits of the native platform-specific capture in Sip Communicator?

Regards,

Kertesz Laszlo

On Fri, 18 Jun 2010 18:46:45 +0300, Sebastien Vincent > <seb@sip-communicator.org> wrote:

Hi,

Some of V4L2 format are still missing (for example MJPEG).

Please send the output of v4l-info (part of v4l-conf package) so that we can see which format your webcam has.

Regards,
--
Seb

Le 18/06/2010 17:41, Kertesz Laszlo a écrit :

Hello,

I use Debian Squeeze and saw talk about native capture on all platforms. But my webcam is still shown as civil:/dev/video0:0 not v4l: or v4l2: on build 275x.
Is this how it is supposed to be?

Regards,

Kertesz Laszlo

-- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

-- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#6

It is working all right - it has half the CPU usage as the civil device - ~23(native) vs ~48-50(civil) on core2duo@2.33 GHz.

Keep up the good work!

···

On Tue, 22 Jun 2010 18:28:21 +0300, Sebastien Vincent <seb@sip-communicator.org> wrote:

Hi,

JPEG and MJPEG support for V4L2 devices has been integrated in revision
7297. Please give it a try and tell me if it works for you.

Regards,
--
Seb

Le 19/06/2010 07:16, Kertesz Laszlo a écrit :

My webcam is a cheapo webcam - in most programs (Skype, Pidgin etc)
works only with the
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so prefix.
I attached the v4l-info output. As far as i know it sends motion jpeg
stream.
But it works fine with Sip Communicator as is.

What are the benefits of the native platform-specific capture in Sip
Communicator?

Regards,

Kertesz Laszlo

On Fri, 18 Jun 2010 18:46:45 +0300, Sebastien Vincent >> <seb@sip-communicator.org> wrote:

Hi,

Some of V4L2 format are still missing (for example MJPEG).

Please send the output of v4l-info (part of v4l-conf package) so that
we can see which format your webcam has.

Regards,
--
Seb

Le 18/06/2010 17:41, Kertesz Laszlo a écrit :

Hello,

I use Debian Squeeze and saw talk about native capture on all
platforms. But my webcam is still shown as civil:/dev/video0:0 not
v4l: or v4l2: on build 275x.
Is this how it is supposed to be?

Regards,

Kertesz Laszlo

-- Using Opera's revolutionary e-mail client:
http://www.opera.com/mail/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

-- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#7

Could I please ask you to try 'mplayer tv:// tv=driver:v4l2' and tell
us whether it works and, if it does, what CPU usage it has? The result
should tell us whether FFmpeg supports the format of your webcam and
whether we can expect an improvement in terms of CPU usage.

···

On Tue, Jun 22, 2010 at 8:51 PM, Kertesz Laszlo <laszlo.kertesz@gmail.com> wrote:

It is working all right - it has half the CPU usage as the civil device -
~23(native) vs ~48-50(civil) on core2duo@2.33 GHz.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#8

The terminal output:

Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG)

···

==========================================================================
Audio: no sound
Starting playback...
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
Movie-Aspect is undefined - no prescaling applied.
[swscaler @ 0x8ab03c0]using unscaled yuv422p -> yuyv422 special converter
VO: [vdpau] 640x480 => 640x480 Packed YUY2

It plays ok. Around 1.5-3% CPU on Athlon3200+ single core ( i am on my home computer now, i have the same model webcam as the one at work).
Now the webcam has reduced frame rate because it is a bit darker now in front of the computer, so the CPU usage might be affected by the lower FPS.

On Tue, 22 Jun 2010 21:43:22 +0300, Lubomir Marinov <lubo@sip-communicator.org> wrote:

On Tue, Jun 22, 2010 at 8:51 PM, Kertesz Laszlo > <laszlo.kertesz@gmail.com> wrote:

It is working all right - it has half the CPU usage as the civil device -
~23(native) vs ~48-50(civil) on core2duo@2.33 GHz.

Could I please ask you to try 'mplayer tv:// tv=driver:v4l2' and tell
us whether it works and, if it does, what CPU usage it has? The result
should tell us whether FFmpeg supports the format of your webcam and
whether we can expect an improvement in terms of CPU usage.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

-- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net