aMSN Forums
May 21, 2013, 06:30:16 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: New forum for aMSN !!
 
   Home   Help Search Login Register  
Pages: [1] 2 3
  Print  
Author Topic: Black Webcam in aMSN Wizard (test.tcl works!)  (Read 17092 times)
trv
Super Power User
**
Offline Offline

Posts: 154


View Profile WWW
« on: December 06, 2007, 03:52:50 pm »

Hello,

First things first: I have already seen the other simiral thread about black webcam, and have searched in the forums, but this is not the same problem with these.

Now:

I have a very strange problem with a webcam i just got.
I am using Ubuntu Gutsy.
I have compiled aMSN from source (with debugging enabled) 9107 cvs version.

It is a Creative Vista Live IM that works on linux.

The webcam works in every software, even in xawtv ( using xawtv -nodga)

The really strange probmem:

running the /utils/linux/capture/test.tcl the webcam WORKS perfectly, it is well configured, the resolutions change nice.

BUT, inside aMSN audio/webcam wizard, the webcam window is just BLANK !!

using "set Capture::Debug 1"  i have found that the output of test.tcl and aMSN inside the wizard is exactly the same. That is:

test.tcl
Quote
vid-probe: trying: v4l2...
ioctl VIDIOC_QUERYCAP: Invalid argument
open(/dev/video1): No such file or directory
open(/dev/video2): No such file or directory
open(/dev/video3): No such file or directory
vid-probe: trying: v4l...
open(/dev/video1): No such file or directory
open(/dev/video2): No such file or directory
open(/dev/video3): No such file or directory
Found OV519 USB Camera at /dev/video0
//------------------------------------------------------------------------//Pressing Choose Device and choosing the webcam Device from the Chooser window produces this:
vid-open: trying: v4l2...
v4l2: open
vid-open: failed: v4l2
vid-open: trying: v4l...
v4l: open
  mbuf: size=1843216 frames=2
  v4l: using mapped buffers for capture
v4l: init: /dev/video0 (OV519 USB Camera)
  capabilities:  capture
  size    : 64x48 => 640x480
  channels: 1
    Camera: 0  camera
  audios  : 0
 PAL NTSC SECAM AUTO
  fbuffer : base=0x(nil) size=0x0 depth=0 bpl=0
  picture : brightness=32768 hue=36352 colour=0 contrast=32768
  picture : whiteness=26880 depth=12 palette=yuv420
v4l: close
vid-open: ok: v4l
vid-open: flags: 2
v4l: close
//------------------------------------------------------------------------------- Now choosing the "Channel" from Chooser produces this:
vid-open: trying: v4l2...
v4l2: open
vid-open: failed: v4l2
vid-open: trying: v4l...
v4l: open
  mbuf: size=1843216 frames=2
  v4l: using mapped buffers for capture
v4l: init: /dev/video0 (OV519 USB Camera)
  capabilities:  capture
  size    : 64x48 => 640x480
  channels: 1
    Camera: 0  camera
  audios  : 0
 PAL NTSC SECAM AUTO
  fbuffer : base=0x(nil) size=0x0 depth=0 bpl=0
  picture : brightness=32768 hue=31232 colour=0 contrast=32768
  picture : whiteness=26880 depth=12 palette=yuv420
v4l: close
vid-open: ok: v4l
vid-open: flags: 2
v4l: close
vid-open: trying: v4l2...
v4l2: open
vid-open: failed: v4l2
vid-open: trying: v4l...
v4l: open
  mbuf: size=1843216 frames=2
  v4l: using mapped buffers for capture
v4l: init: /dev/video0 (OV519 USB Camera)
  capabilities:  capture
  size    : 64x48 => 640x480
  channels: 1
    Camera: 0  camera
  audios  : 0
 PAL NTSC SECAM AUTO
  fbuffer : base=0x(nil) size=0x0 depth=0 bpl=0
  picture : brightness=32768 hue=33280 colour=0 contrast=32768
  picture : whiteness=26880 depth=12 palette=yuv420
v4l: close
vid-open: ok: v4l
vid-open: flags: 2
v4l: open
  mbuf: size=1843216 frames=2
  v4l: using mapped buffers for capture
ng_dev_open: opened OV519 USB Camera [refcount 1]
v4l: setformat
v4l: capture probe 24 bit TrueColor (BE: rgb)...        failed
v4l: setformat
v4l: capture probe 24 bit TrueColor (LE: bgr)...        ok
v4l: startvideo
//---------------------------------------------------------------At this point the webcam video appears correctly inside the chooser, everything works fine (and with minimum cpu usage by the cam)


Here is the debug output of amsn when starting the audio/webcam wizard and pressing next:

Quote
vid-probe: trying: v4l2...
ioctl VIDIOC_QUERYCAP: Invalid argument
open(/dev/video1): No such file or directory
open(/dev/video2): No such file or directory
open(/dev/video3): No such file or directory
vid-probe: trying: v4l...
open(/dev/video1): No such file or directory
open(/dev/video2): No such file or directory
open(/dev/video3): No such file or directory
Found OV519 USB Camera at /dev/video0
vid-probe: trying: v4l2...
ioctl VIDIOC_QUERYCAP: Invalid argument
open(/dev/video1): No such file or directory
open(/dev/video2): No such file or directory
open(/dev/video3): No such file or directory
vid-probe: trying: v4l...
open(/dev/video1): No such file or directory
open(/dev/video2): No such file or directory
open(/dev/video3): No such file or directory
Found OV519 USB Camera at /dev/video0
vid-probe: trying: v4l2...
ioctl VIDIOC_QUERYCAP: Invalid argument
open(/dev/video1): No such file or directory
open(/dev/video2): No such file or directory
open(/dev/video3): No such file or directory
vid-probe: trying: v4l...
open(/dev/video1): No such file or directory
open(/dev/video2): No such file or directory
open(/dev/video3): No such file or directory
Found OV519 USB Camera at /dev/video0
vid-open: trying: v4l2...
v4l2: open
vid-open: failed: v4l2
vid-open: trying: v4l...
v4l: open
  mbuf: size=1843216 frames=2
  v4l: using mapped buffers for capture
v4l: init: /dev/video0 (OV519 USB Camera)
  capabilities:  capture
  size    : 64x48 => 640x480
  channels: 1
    Camera: 0  camera
  audios  : 0
 PAL NTSC SECAM AUTO
  fbuffer : base=0x(nil) size=0x0 depth=0 bpl=0
  picture : brightness=32768 hue=32768 colour=0 contrast=32768
  picture : whiteness=26880 depth=12 palette=yuv420
v4l: close
vid-open: ok: v4l
vid-open: flags: 2
v4l: close
vid-open: trying: v4l2...
v4l2: open
vid-open: failed: v4l2
vid-open: trying: v4l...
v4l: open
  mbuf: size=1843216 frames=2
  v4l: using mapped buffers for capture
v4l: init: /dev/video0 (OV519 USB Camera)
  capabilities:  capture
  size    : 64x48 => 640x480
  channels: 1
    Camera: 0  camera
  audios  : 0
 PAL NTSC SECAM AUTO
  fbuffer : base=0x(nil) size=0x0 depth=0 bpl=0
  picture : brightness=32768 hue=23552 colour=0 contrast=32768
  picture : whiteness=26880 depth=12 palette=yuv420
v4l: close
vid-open: ok: v4l
vid-open: flags: 2
v4l: open
  mbuf: size=1843216 frames=2
  v4l: using mapped buffers for capture
ng_dev_open: opened OV519 USB Camera [refcount 1]
v4l: setformat
v4l: capture probe 24 bit TrueColor (BE: rgb)...        failed
v4l: setformat
v4l: capture probe 24 bit TrueColor (LE: bgr)...        ok
v4l: startvideo
//---------------------------------------------------------------------------At this point the webcam window is just black!!


I have also tryed with every pallete i could load in the driver, with the same results. Whenever the pallete worked in test.tls, the msn window was just black.


What i forgot to mention is that i am using the ov51x-jpeg
dmesg produced this output when connecting:
Quote
[10361.248000] /home/trv/projects/camera/ov51x-jpeg/trunk/ov51x-jpeg-core.c: USB OV519 video device found
[10361.600000] /home/trv/projects/camera/ov51x-jpeg/trunk/ov51x-jpeg-core.c: Sensor is an OV7670
[10362.240000] /home/trv/projects/camera/ov51x-jpeg/trunk/ov51x-jpeg-core.c: Device at usb-0000:00:1d.1-2 registered to minor 0

lsusb is this:
Quote
$lsusb
Bus 002 Device 005: ID 041e:4052 Creative Technology, Ltd


and v4l-info:
Quote
$ v4l-info

### video4linux device info [/dev/video0] ###
general info
    VIDIOCGCAP
        name                    : "OV519 USB Camera"
        type                    : 0x201 [CAPTURE,SUBCAPTURE]
        channels                : 1
        audios                  : 0
        maxwidth                : 640
        maxheight               : 480
        minwidth                : 64
        minheight               : 48

channels
    VIDIOCGCHAN(0)
        channel                 : 0
        name                    : "Camera"
        tuners                  : 0
        flags                   : 0x0 []
        type                    : CAMERA
        norm                    : 0

tuner
ioctl VIDIOCGTUNER: Invalid argument

audio
ioctl VIDIOCGAUDIO: Invalid argument

picture
    VIDIOCGPICT
        brightness              : 32768
        hue                     : 26624
        colour                  : 0
        contrast                : 32768
        whiteness               : 26880
        depth                   : 12
        palette                 : YUV420

buffer
    VIDIOCGFBUF
        base                    : (nil)
        height                  : 0
        width                   : 0
        depth                   : 0
        bytesperline            : 0

window
    VIDIOCGWIN
        x                       : 0
        y                       : 0
        width                   : 640
        height                  : 480
        chromakey               : 0
        flags                   : 30


What could be wrong?

One thing I have also noticed is this:

Before upgrading to the cvs version, i was using some the amsn deb files from the Trevino's Repository, that were made with cvs snapsots of some date back in September.
The webcam was working in the amsn wizard with these deb files!

Unfortunately i dont have the necessary knowledge to see if (and what) changed since that version and what are the differences between the test.tcl which works, and the actual wizard.


By the way, the "test.tcl" file is not much of a test if it works but amsn does not  :lol:
Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #1 on: December 06, 2007, 09:55:46 pm »

Hi,
first, thanks a lot for all the details and you searching before posting, it does help.
the test.tcl is a veeeeery old file, hehe, it was used a long time ago to test the webcam before it even got into amsn, then we copy/pasted all the code from test.tcl into amsn's core... I guess things changed in between, but I wonder what!
I would have answered you 'sorry, I have no idea', but since you're saying that an old svn version worked, then we've got a chance on fixing this! you just need to do a binary search on the svn revision that introduced the problem... it doesn't take long, for 2000 svn revisions, you only need to test 11 versions. here's how you can do it :
Code:
svn update -r7000

if it works, then :
Code:
svn update -r8000

if it doesn't work then :
Code:
svn update -r7500

if it works, then :
Code:
svn update -r7750

if it doesn't work, then..
Code:
svn update -r7625

etc... I think you get the idea... this way, you can pinpoint the exact revision in which this problem started appearing, and we'll have a very small diff to look at, and figure out what changed in there that would have caused this issue for you, then we'll hopefully be able to fix it.

I'll wait for your results..
god luck!
Logged

KaKaRoTo
trv
Super Power User
**
Offline Offline

Posts: 154


View Profile WWW
« Reply #2 on: December 10, 2007, 12:34:21 pm »

OK, i have done some testing.

Revision 8209 works fine, (at least at the preferences inside amsn). I have not tested an actual webcam chat in none of these cases!!

Revision 8210 does NOT work (in the preferences again).


From what i understand looking at the code, at revision 8210 the "assistant.tcl" was added in the preferences. This is the audio / video wizard that is still used now.

Untill 8209 the "webcam wizard" was used that worked fine (obviouly this wizard was the same as test.tcl, then it changed).



To sum it up, what is not working is the "Audio and Video Wizard", from the very beggining since it was added in the preferences.

I really have not tested if an actual webcam conversation works.

Here is a question: Does aMSN use the "assistant.tcl" code to get the image from a webcam when in webcam chat, or it uses the "webcam wizard (or test.tcl) code" ?

In other words, is the code inside "assistant.tcl" (that does not work) used in any other cases appart configuring the webcam in preferences?


I'm looking forward to your help Smiley
Logged
trv
Super Power User
**
Offline Offline

Posts: 154


View Profile WWW
« Reply #3 on: December 10, 2007, 12:59:31 pm »

I think I have made a major breakthrough in debugging the problem Smiley

The actual webcam CHAT with another contact, works in EVERY case, from the oldest to the latest svn revision Smiley))

The exact and only think that does NOT work, is the Assistant and only the assistant. For some reason it doesn't "output" the webcam image inside the assistant window, it just stays black.

So the only minor problem is that i cannot configure the gamma/brightness etc of the webcam since the assistance does not work.

And of course another problem is that the average user will say that it just 'doesn't work' since the assistance doesn't work, although that is not the case.


I am sorry I had not tested an actual chat before doing all these posts, but how could i image that?

So, what can be done with the assistance? Smiley
Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #4 on: December 10, 2007, 01:34:49 pm »

Hi,
thanks for all this information. We'll need your help to fix this issue since you're the only one with a webcam having this issue. The assistant (new code) should be the same as the wizard (old code), but just refactorized into a nicer/beautiful assistant window.
The code should be the same one used everywhere, I don't know why it wouldn't work, that's really weird, especially since it works for everyone else so it means the algorithm, the logic, should work... (basically what we do is set a timer, every x milliseconds, we capture a new image and we display it in that frame)...
I'm in exam period right now, so I can't take care of this, but maybe next week, I'll look into it (unless billiob jumps in), I'll probably need vnc access to your pc in order to fix this quickly, otherwise, it will be a huge task to try 100 different things and ask you to patch and test... tell me if it will be possible.

p.s.: To answer your question, as I said, they should all do the same thing, wizard, assistant, video chat... for some reason assistant doesn't work, but at least you know that the video chat works...
Logged

KaKaRoTo
billiob
Administrator
Super Power User
*****
Offline Offline

Posts: 1352


View Profile
« Reply #5 on: December 10, 2007, 11:42:11 pm »

I no longer have a webcam to do some checkings on my side Sad (i can use mplayer + vloopback but i don't have enought time to set it up)

in the assistant, there may be an error message written in red. Do you have one ?
if you click on next, do you have the step where you can adjust hue/brightness and so on ?

I've diffed your 2 debug logs, and there is nothing special :s

Can you log at the status_log (ctrl+s on the contact list) while running the assistant if there is smthg interesting written there ?

Thursday evening, i'll be exam-free Cheesy
Logged
trv
Super Power User
**
Offline Offline

Posts: 154


View Profile WWW
« Reply #6 on: December 13, 2007, 03:42:40 pm »

Quote from: "kakaroto"
I'm in exam period right now, so I can't take care of this, but maybe next week, I'll look into it (unless billiob jumps in), I'll probably need vnc access to your pc in order to fix this quickly, otherwise, it will be a huge task to try 100 different things and ask you to patch and test... tell me if it will be possible.


vnc access would be next to impossible, since i use the cam on my laptop (and moving around a lot), and it's my gf's cam and she wants it back Smiley
But i would be happy to help in every way i can from here.

Quote from: "billiob"
in the assistant, there may be an error message written in red. Do you have one ?
if you click on next, do you have the step where you can adjust hue/brightness and so on ?


I think the images bellow will speak for me Smiley

Snapshot1: First screen of the wizard:


Snapshot2: Next screen of the wizard: ( the logs says Ok! at this point, meaning that the webcam image should appear instead of the blank screen)


Snapshot3: Next screen of the wizard with the controls: Everything seems to be working OK, but no video.. just a black frame.


Pressing next after this gets to the snack configuration an so on.
Logged
Montblanc
Super Power User
**
Offline Offline

Posts: 173



View Profile WWW
« Reply #7 on: February 20, 2008, 01:24:41 am »

He's not the only one! I'm having the same identical issue here! I'm running Gutsy, too, and everything is as explained by trv.
Logged
Ferrat
Newbie

Offline Offline

Posts: 9


View Profile
« Reply #8 on: February 21, 2008, 07:04:31 am »

I have the exact same problem, from what I've gathered it's somewhat due to nvidia drivers not being able to use dga?

EDIT:
Messed around a bit in v4l-conf and now I get a picture Smiley
Not at the first page at the assistant but at the next one =)
Logged
Montblanc
Super Power User
**
Offline Offline

Posts: 173



View Profile WWW
« Reply #9 on: February 24, 2008, 01:42:51 am »

Good for you, half of the problem is solved, at least! But if it's a video driver problem, fglrx drivers give me a black screen, but if I take a snapshot from my webcam to put it as a display picture or send/receive video, everything's ok. I only see it black into the wizard window.
Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #10 on: February 24, 2008, 07:28:16 pm »

doesn't seem to be a webcam problem, more like a Tk problem (maybe)... the snapshot thing actually just takes the image shon and saves it, so if we didn't capture and write it in the image correctly, then the snapshot wouldn't have worked...
Logged

KaKaRoTo
ppcfoliveira
Guest
« Reply #11 on: May 17, 2008, 02:15:40 pm »

"We'll need your help to fix this issue since you're the only one with a webcam having this issue."

I have the same problem and while searching for the answer here couldn't find it. Has this issue been solved already?
Logged
vivia
Administrator
Super Power User
*****
Offline Offline

Posts: 2464


View Profile
« Reply #12 on: October 27, 2008, 08:34:39 pm »

Can you check latest SVN?
Logged
trv
Super Power User
**
Offline Offline

Posts: 154


View Profile WWW
« Reply #13 on: October 28, 2008, 01:00:46 pm »

i don't know if it's because of new drivers, os updates, or anything else, but it works in my case now Smiley
Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #14 on: October 28, 2008, 05:23:19 pm »

yeay! maybe it's because billiob tried to fix it yesterday with a patch.... Smiley
Logged

KaKaRoTo
Pages: [1] 2 3
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!