easycapdc60

hunglun
I use the linux driver easycapdc60 for FriendlyARM Tiny6410.
When used with mencoder, I do not get even a frame from the video capture
device. Any help will be appreciated. 

Below is the diagnostic message :


<7>easycap:: easycap_open: ==========OPEN=========
<7>easycap::0adjust_standard: selected standard: PAL_BGHIN
<7>easycap::0adjust_format: sought:   
640x480,UYVY(0x59565955),1=field,0x00=std mask
<7>easycap::0adjust_format: sought:    V4L2_FIELD_NONE
<7>easycap::0adjust_format: actioning: 640x480
PAL_BGHIN_AT_640x480_FMT_UYVY-n
<7>easycap::0adjust_brightness: adjusting brightness to  0x7F
<7>easycap::0adjust_contrast: adjusting contrast to  0x3F
<7>easycap::0adjust_saturation: adjusting saturation to  0x2F
<7>easycap::0adjust_hue: adjusting hue to  0x00
<7>easycap::0adjust_format: sought:   
640x480,UYVY(0x59565955),1=field,0x00=std mask
<7>easycap::0adjust_format: sought:    V4L2_FIELD_NONE
<7>easycap::0adjust_format: actioning: 640x480
PAL_BGHIN_AT_640x480_FMT_UYVY-n
<7>easycap::0adjust_format: sought:   
640x480,YV12(0x32315659),0=field,0x00=std mask
<7>easycap::0adjust_format: sought:    V4L2_FIELD_ANY 
<7>easycap::0adjust_format: prefer:    V4L2_FIELD_NONE=field, was
V4L2_FIELD_ANY
<7>easycap::0adjust_format: cannot do: 640x480 with standard mask 0x00
<7>easycap::0adjust_format: cannot do 640x... with standard mask 0x00
<7>easycap::0adjust_format: cannot do ...x480 with standard mask 0x00
<7>easycap::0adjust_format:            640x480 unmatched
<7>easycap::0easycap_ioctl: requested input already in effect
<7>easycap::0adjust_standard: selected standard: PAL_BGHIN
<7>easycap::0adjust_standard: requested standard already in effect
<7>easycap::0adjust_format: sought:   
60x40,UYVY(0x59565955),0=field,0x00=std mask
<7>easycap::0adjust_format: sought:    V4L2_FIELD_ANY 
<7>easycap::0adjust_format: prefer:    V4L2_FIELD_NONE=field, was
V4L2_FIELD_ANY
<7>easycap::0adjust_format: cannot do: 60x40 with standard mask 0x00
<7>easycap::0adjust_format: actioning: 320x240
PAL_BGHIN_AT_320x240_FMT_UYVY-n
<7>easycap::0adjust_format: sought:   
60x240,UYVY(0x59565955),1=field,0x00=std mask
<7>easycap::0adjust_format: sought:    V4L2_FIELD_NONE
<7>easycap::0adjust_format: cannot do: 60x240 with standard mask 0x00
<7>easycap::0adjust_format: actioning: 320x240
PAL_BGHIN_AT_320x240_FMT_UYVY-n
<7>easycap::0adjust_format: sought:   
320x40,UYVY(0x59565955),0=field,0x00=std mask
<7>easycap::0adjust_format: sought:    V4L2_FIELD_ANY 
<7>easycap::0adjust_format: prefer:    V4L2_FIELD_NONE=field, was
V4L2_FIELD_ANY
<7>easycap::0adjust_format: cannot do: 320x40 with standard mask 0x00
<7>easycap::0adjust_format: actioning: 320x240
PAL_BGHIN_AT_320x240_FMT_UYVY-n
<7>easycap::0adjust_mute: adjusting mute: 0=peasycap->audio_idle
<7>easycap::0adjust_brightness: unchanged brightness at  0x7F
<7>easycap::0adjust_hue: unchanged hue at  0x80
<7>easycap::0adjust_saturation: unchanged saturation at  0xAF
<7>easycap::0adjust_contrast: unchanged contrast at  0xBF
<7>easycap::0easycap_complete: easycap driver shutting down on condition
green
<7>easycap::0adjust_standard: selected standard: PAL_BGHIN
<7>easycap::0adjust_format: sought:   
320x240,UYVY(0x59565955),1=field,0x00=std mask
<7>easycap::0adjust_format: sought:    V4L2_FIELD_NONE
<7>easycap::0adjust_format: actioning: 320x240
PAL_BGHIN_AT_320x240_FMT_UYVY-n
<7>easycap::0adjust_brightness: adjusting brightness to  0x7F
<7>easycap::0adjust_contrast: adjusting contrast to  0x3F
<7>easycap::0adjust_saturation: adjusting saturation to  0x2F
<7>easycap::0adjust_hue: adjusting hue to  0x00
<7>easycap::0easycap_complete: easycap driver shutting down on condition
green
<7>easycap::0adjust_standard: selected standard: PAL_BGHIN
<7>easycap::0adjust_format: sought:   
320x240,UYVY(0x59565955),1=field,0x00=std mask
<7>easycap::0adjust_format: sought:    V4L2_FIELD_NONE
<7>easycap::0adjust_format: actioning: 320x240
PAL_BGHIN_AT_320x240_FMT_UYVY-n
<7>easycap::0adjust_brightness: adjusting brightness to  0x7F
<7>easycap::0adjust_contrast: adjusting contrast to  0x3F
<7>easycap::0adjust_saturation: adjusting saturation to  0x2F
<7>easycap::0adjust_hue: adjusting hue to  0x00


success: format: 9  data: 0x0 - 0x0easycap:: easycap_open:
==========OPEN=========

TV file format detected.
Selected driver: v4l2
 name: Video 4 Linux 2 input
 author: Martin Olschewski <olschewski@zpr.uni-koeln.de>
 comment: first try, more to come ;-)
easycap::0adjust_standard: selected standard: PAL_BGHIN
easycap::0adjust_format: sought:   
320x240,UYVY(0x59565955),1=field,0x00=std mask
easycap::0adjust_format: sought:    V4L2_FIELD_NONE
easycap::0adjust_format: actioning: 320x240 PAL_BGHIN_AT_320x240_FMT_UYVY-n
easycap::0adjust_brightness: adjusting brightness to  0x7F
easycap::0adjust_contrast: adjusting contrast to  0x3F
easycap::0adjust_saturation: adjusting saturation to  0x2F
easycap::0adjust_hue: adjusting hue to  0x00
Selected device: EasyCAP DC60
 Capabilities:  video capture  audio  read/write  streaming
 easycap::0adjust_format: sought:   
640x480,UYVY(0x59565955),1=field,0x00=std mask
easycap::0adjust_format: sought:    V4L2_FIELD_NONE
easycap::0adjust_format: actioning: 640x480 PAL_BGHIN_AT_640x480_FMT_UYVY-n
supported norms: 0 = PAL_BGHIN; 1 = NTSC_N_443; 2 = PAL_Nc; 3 = NTSC_N; 4 =
SECAM; 5 = NTSC_M; 6 = NTSC_M_JP; 7 = PAL_60; 8 = NTSC_443; 9 = PAL_M; 10 =
PAL_BGHIN_SLOW;;
 inputs: 0 = CVBS0; 1 = CVBS1; 2 = CVBS2; 3 = CVBS3; 4 = CVBS4; 5 =
S-VIDEO;
 Current input: 0
 Current format: UYVY
easycap::0adjust_format: sought:   
640x480,YV12(0x32315659),0=field,0x00=std mask
easycap::0adjust_format: sought:    V4L2_FIELD_ANY 
easycap::0adjust_format: prefer:    V4L2_FIELD_NONE=field, was
V4L2_FIELD_ANY
easycap::0adjust_format: cannot do: 640x480 with standard mask 0x00
easycap::0adjust_format: cannot do 640x... with standard mask 0x00
easycap::0adjust_format: cannot do ...x480 with standard mask 0x00
easycap::0adjust_format:            640x480 unmatched
one_wire_status: 2
easycap::0easycap_ioctl: requested input already in effect
easycap::0adjust_standard: selected standard: PAL_BGHIN
easycap::0adjust_standard: requested standard already in effect
easycap::0adjust_format: sought:    60x40,UYVY(0x59565955),0=field,0x00=std
mask
one_wire_status: 4
easycap::0adjust_format: sought:    V4L2_FIELD_ANY 
easycap::0adjust_format: prefer:    V4L2_FIELD_NONE=field, was
V4L2_FIELD_ANY
easycap::0adjust_format: cannot do: 60x40 with standard mask 0x00
one_wire_status: 4
easycap::0adjust_format: actioning: 320x240 PAL_BGHIN_AT_320x240_FMT_UYVY-n
tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
easycap::0adjust_format: sought:   
60x240,UYVY(0x59565955),1=field,0x00=std mask
easycap::0adjust_format: sought:    V4L2_FIELD_NONE
easycap::0adjust_format: cannot do: 60x240 with standard mask 0x00
easycap::0adjust_format: actioning: 320x240 PAL_BGHIN_AT_320x240_FMT_UYVY-n
easycap::0adjust_format: sought:   
320x40,UYVY(0x59565955),0=field,0x00=std mask
easycap::0adjust_format: sought:    V4L2_FIELD_ANY 
easycap::0adjust_format: prefer:    V4L2_FIELD_NONE=field, was
V4L2_FIELD_ANY
easycap::0adjust_format: cannot do: 320x40 with standard mask 0x00
easycap::0adjust_format: actioning: 320x240 PAL_BGHIN_AT_320x240_FMT_UYVY-n
one_wire_status: 2
Selected input hasn't got a tuner!easycap::0adjust_mute: adjusting mute:
0=peasycap->audio_idle
easycap::0adjust_brightness: unchanged brightness at  0x7F
easycap::0adjust_hue: unchanged hue at  0x80
easycap::0adjust_saturation: unchanged saturation at  0xAF
easycap::0adjust_contrast: unchanged contrast at  0xBF
one_wire_status: 4

[V] filefmt:9  fourcc:0x59565955  size:320x240  fps:60.000  ftime:=0.0167
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
Movie-Aspect is undefined - no prescaling applied.
[swscaler @ 0x8d35a8]using unscaled uyvy422 -> yuv420p special converter
videocodec: libavcodec (320x240 fourcc=47504a4d [MJPG])
Selected video codec: [rawuyvy] vfm: raw (RAW UYVY)
==========================================================================
Forcing audio preload to 0, max pts correction to 0.

Skipping frame!
Pos:   0.0s      1f ( 0%)  0.48fps Trem:   0min   0mb  A-V:0.000 [0:0]

Skipping frame!
Pos:   0.0s      2f ( 0%)  0.64fps Trem:   0min   0mb  A-V:0.000 [0:0]

Skipping frame!
Pos:   0.0s      3f ( 0%)  0.72fps Trem:   0min   0mb  A-V:0.000 [0:0]

Skipping frame!
Pos:   0.0s      4f ( 0%)  0.77fps Trem:   0min   0mb  A-V:0.000 [0:0]

Skipping frame!
^C^C^C 0.0s      5f ( 0%)  0.80fps Trem:   0min   0mb  A-V:0.000 [0:0]

Skipping frame!
Pos:   0.0s      6f ( 0%)  0.83fps Trem:   0min   0mb  A-V:0.000 [0:0]

Flushing video frames.
Writing index...
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing
vprp header.

Video stream:      nan kbit/s  (0 B/s)  size: 0 bytes    nan secs  6 frames
^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[Aeasycap::0easycap_complete:
easycap driver shutting down on condition green
easycap::0adjust_standard: selected standard: PAL_BGHIN
easycap::0adjust_format: sought:   
320x240,UYVY(0x59565955),1=field,0x00=std mask
easycap::0adjust_format: sought:    V4L2_FIELD...stripped-down

Pratik
What linux distribution have installed on your board?

Pratik
Can you tell what you have done till yet?

hunglun
Hi Pratik, thanks for your reply.

Installed on board is a linux distribution from FriendlyARM based on the
kernel linux-2.6.36. I have tested easycap hardware and the easycapdc60
drivers on my desktop Fedora14 with success. Hence any hardware fault is
ruled out. 

On Fedora14 desktop, I compile the easycap driver as VIDEODEV client, and
then later an independent module. Both way works for Fedora14. I did the
same for my board, but without success. On the board, the output from
mencoder and from log file are as described in the first post. 
In this way, I rule out fault due to dependency on VIDEODEV module.

I have already turned the DEBUG level in the install.sh script to LEVEL 9,
and based on the debug message, I have no clue how to proceed on.
At this point, I am running out of ideas where to look for faults.

Any advice will be appreciated.
Thanks.

hunglun
To be more concrete, 

Mencoder is used to capture video through easycapdc60. FriendlyARM tiny6410
is an ARM device. Easycap is installed as an independent module and appears
as /dev/easycap0. Any help will be appreciated. 

<Run>
./mencoder tv:// -tv
driver=v4l2:width=60:height=40:fps=25:device=/dev/easycap0 -nosound -ovc
lavc -lavcopts vcodec=mjpeg -o ~/easycap_video.avi 

<output from mencoder>
Output from mencoder : MEncoder SVN-r32819-snapshot-4.4.3 (C) 2000-2011
MPlayer Team success: format: 9 data: 0x0 - 0x0 TV file format detected.
Selected driver: v4l2 name: Video 4 Linux 2 input author: Martin Olschewski
<olschewski@zpr.uni-koeln.de> comment: first try, more to come ;-) Selected
device: EasyCAP DC60 Capabilities: video capture audio read/write streaming
supported norms: 0 = PAL_BGHIN; 1 = NTSC_N_443; 2 = PAL_Nc; 3 = NTSC_N; 4 =
SE; inputs: 0 = CVBS0; 1 = CVBS1; 2 = CVBS2; 3 = CVBS3; 4 = CVBS4; 5 =
S-VIDEO; Current input: 0 Current format: UYVY tv.c: norm_from_string(pal):
Bogus norm parameter, setting default. Selected input hasn't got a tuner!
[V] filefmt:9 fourcc:0x59565955 size:320x240 fps:25.000 ftime:=0.0400
Opening video filter: [expand osd=1] Expand: -1 x -1, -1 ; -1, osd: 1,
aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video Could not find matching
colorspace - retrying with -vf scale... Opening video filter: [scale]
Movie-Aspect is undefined - no prescaling applied. [swscaler @
0x8d35a8]using unscaled uyvy422 -> yuv420p special converter videocodec:
libavcodec (320x240 fourcc=47504a4d [MJPG]) Selected video codec: [rawuyvy]
vfm: raw (RAW UYVY)
==========================================================================
Forcing audio preload to 0, max pts correction to 0. Skipping frame! Pos:
0.0s 1f ( 0%) 0.48fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos:
0.0s 2f ( 0%) 0.64fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Pos:
0.0s 3f ( 0%) 0.72fps Trem: 0min 0mb A-V:0.000 [0:0] ^C Skipping frame!
Pos: 0.0s 4f ( 0%) 0.77fps Trem: 0min 0mb A-V:0.000 [0:0] Flushing video
frames. Writing index... Writing header... ODML: Aspect information not
(yet?) available or unspecified, not writing vprp . Video stream: nan
kbit/s (0 B/s) size: 0 bytes nan secs 4 frames v4l2: 1 frames successfully
processed, 0 frames dropped. 

<Output in message log> 

easycap:: easycap_open: ==========OPEN========= easycap::0adjust_standard:
selected standard: PAL_BGHIN easycap::0adjust_format: sought:
640x480,UYVY(0x59565955),1=field,0x00=std mk easycap::0adjust_format:
sought: V4L2_FIELD_NONE easycap::0adjust_format: actioning: 640x480
PAL_BGHIN_AT_640x480_FMT_UYVY-n easycap::0adjust_brightness: adjusting
brightness to 0x7F easycap::0adjust_contrast: adjusting contrast to 0x3F
easycap::0adjust_saturation: adjusting saturation to 0x2F
easycap::0adjust_hue: adjusting hue to 0x00 easycap::0adjust_format:
sought: 640x480,UYVY(0x59565955),1=field,0x00=std mk
easycap::0adjust_format: sought: V4L2_FIELD_NONE easycap::0adjust_format:
actioning: 640x480 PAL_BGHIN_AT_640x480_FMT_UYVY-n easycap::0adjust_format:
sought: 640x480,YV12(0x32315659),0=field,0x00=std mk
easycap::0adjust_format: sought: V4L2_FIELD_ANY easycap::0adjust_format:
prefer: V4L2_FIELD_NONE=field, was V4L2_FIELD_ANY easycap::0adjust_format:
cannot do: 640x480 with standard mask 0x00 easycap::0adjust_format: cannot
do 640x... with standard mask 0x00 easycap::0adjust_format: cannot do
...x480 with standard mask 0x00 easycap::0adjust_format: 640x480 unmatched
easycap::0easycap_ioctl: requested input already in effect
easycap::0adjust_standard: selected standard: PAL_BGHIN
easycap::0adjust_standard: requested standard already in effect
easycap::0adjust_format: sought: 60x40,UYVY(0x59565955),0=field,0x00=std
mask easycap::0adjust_format: sought: V4L2_FIELD_ANY
easycap::0adjust_format: prefer: V4L2_FIELD_NONE=field, was V4L2_FIELD_ANY
easycap::0adjust_format: cannot do: 60x40 with standard mask 0x00
easycap::0adjust_format: actioning: 320x240 PAL_BGHIN_AT_320x240_FMT_UYVY-n
easycap::0adjust_format: sought: 60x240,UYVY(0x59565955),1=field,0x00=std
mak easycap::0adjust_format: sought: V4L2_FIELD_NONE
easycap::0adjust_format: cannot do: 60x240 with standard mask 0x00
easycap::0adjust_format: actioning: 320x240 PAL_BGHIN_AT_320x240_FMT_UYVY-n
easycap::0adjust_format: sought: 320x40,UYVY(0x59565955),0=field,0x00=std
mak easycap::0adjust_format: sought: V4L2_FIELD_ANY
easycap::0adjust_format: prefer: V4L2_FIELD_NONE=field, was V4L2_FIELD_ANY
easycap::0adjust_format: cannot do: 320x40 with standard mask 0x00
easycap::0adjust_format: actioning: 320x240 PAL_BGHIN_AT_320x240_FMT_UYVY-n
easycap::0adjust_mute: adjusting mute: 0=peasycap->audio_idle
easycap::0adjust_brightness: unchanged brightness at 0x7F
easycap::0adjust_hue: unchanged hue at 0x80 easycap::0adjust_saturation:
unchanged saturation at 0xAF easycap::0adjust_contrast: unchanged contrast
at 0xBF easycap::0easycap_complete: easycap driver shutting down on
condition green easycap::0adjust_standard: selected standard: PAL_BGHIN
easycap::0adjust_format: sought: 320x240,UYVY(0x59565955),1=field,0x00=std
mk easycap::0adjust_format: sought: V4L2_FIELD_NONE
easycap::0adjust_format: actioning: 320x240 PAL_BGHIN_AT_320x240_FMT_UYVY-n
easycap::0adjust_brightness: adjusting brightness to 0x7F
easycap::0adjust_contrast: adjusting contrast to 0x3F
easycap::0adjust_saturation: adjusting saturation to 0x2F
easycap::0adjust_hue: adjusting hue to 0x00 easycap::0easycap_complete:
easycap driver shutting down on condition green easycap::0adjust_standard:
selected standard: PAL_BGHIN easycap::0adjust_format: sought:
320x240,UYVY(0x59565955),1=field,0x00=std mk easycap::0adjust_format:
sought: V4L2_FIELD_NONE easycap::0adjust_format: actioning: 320x240
PAL_BGHIN_AT_320x240_FMT_UYVY-n easycap::0adjust_brightness: adjusting
brightness to 0x7F easycap::0adjust_contrast: adjusting contrast to 0x3F
easycap::0adjust_saturation: adjusting saturation to 0x2F
easycap::0adjust_hue: adjusting hue to 0x00 easycap::0adjust_mute:
adjusting mute: 1=peasycap->audio_idle

hunglun
Hi Pratik, 
I have received a reply from the easycapdc60 driver author. He suggested
that I should check if my ARM board's USB host is 2.0, as easycap only
works with USB2.0.

It turns out that the USB host on TIny6410 board is USB1.1. >_<!
That explains why I can not get any valid USB data stream from the video
capture device~

Do you think if  there is any FriendlyARM product with USB2.0 host?

Pratik
Dear hunglun,
I am using Mini2440. I am also getting green frames only. I have tried with
mplayer. 
Do you get these two things after plugging EasyCapDC60?
1. /dev/easycap0 having link to /dev/video0
2. /proc/asound/EasyALSA0
If you dont get EasyALSA0 then you have to check the udev rules for
easycap. You might have downloaded driver source from sourceforge, you can
find in that see 

#-----------------------------------------------------------------------------
#  WRITE CONFIGURATION FILE(S) FOR udev
#--------------------------------------------------------------------------

section in install.sh

My another question, is your board able to play video files without any
problem? I'm trying these things since last month.

hunglun
Hi Pratik,

easycap module can be compiled as VIDEODEV client or as an independent
module. This option can be chosen in the install.sh :

CLIENT = 0

When insmod the VIDEODEV client version of easycap module, /dev/video2
appears on my system.
When I insmod the independent version of the module, it appears instead as
/dev/easycap0.

I did not pay attention to the sound part, as I just want to record video
without sound. 

As for playing video, I can actually play a sample video using the built-in
video player on Tiny6410. It is a mpeg video. Strangely, those video I made
myself on desktop in avi format can not be played on Tiny6410.

My problem lies  more with the hardware part; USB1.1 host seems to be too
slow for the minimum resolution that easycap offers.

Pratik
Dear hunglun,
I have tried with mplayer I got only green screen.
Then I tried with gstreamer it is working but not showing on display.
Do you have any idea how to add USB 2.0 ob board or Do we need to look for
other development board?

Thanks

hunglun
Hi Pratik,
as I am having problem with using easycapdc60 on my USB1.1 host, the
options I have seem to be:
1. get another A/V to USB converter that support USB1.1
2. get a board with USB2.0 host
3. develop/find for easycapdc60 another driver that support USB1.1

Option 3 is probably the most time consuming.
Option 2 is probably more expensive than option 1.
I intend to find out more about option 3; see if it is too difficult to get
another driver that support USB1.1

Regarding your problem getting mplayer to work with easycapdc60,
you have a few suggestions:
1. have you got mplayer and easycapdc60 to work on desktop linux? it is
always easier to get it work on desktop first, before cross-compiling it
for ARM architecture.
2. try to look at the debugging message output by easycapdc60. Use "dmesg".
You may find out more about the cause of the problem.

Good luck!

Pratik
Dear hunglun,
 I want to use Easycap DC60 as it is very cheap compared to others. And we
dont have another driver that supports USB1.1 host. So I am looking for
some other board which will give me necessary things.

I have tested EasyCap and Mplayer on my desktop. It works perfect. My dmesg
output is also fine, so no issues with driver but only that USB1.1
Thanks

Pratik
Dear hunglun,
I could find a same board having same things
http://www.quickembed.com/Tools/Shop/ARM/200908/43.html
have a look.

Prathamesh
hello hunglun/Pratik,

Can you please tell us how did you compile easycap for mini6410.  I tried
it without any success.

Thanks and regards,

Prathamesh.

Pratik
Prathamesh,
It requires USB2.0, It will not work on USB1.1 though you can compile it
successfully and insert Kernel module.
You can use following link:
http://www.farlock.org/sheevaplug/sheevaplug-non-standard-module-compiling/