GNOME Bugzilla – Bug 575391
Cannot fetch a picture (stream) from an older Philips 646 webcam.
Last modified: 2012-02-18 17:30:45 UTC
Please describe the problem: Cannot fetch a picture (stream) from an older Philips 646 webcam. Under Camorama the webcam works good. I need the camera work under gstreamer, because the program I use (baboon; this is reverse-enginereed software to log in and publish video and scrolling text on it on a common Polish webcam chat, czateria.pl) uses GStreamer and v4l2. Steps to reproduce: 1. Plug the camera in, 2. run gstreamer-properties (select right device), 3. read the output. ;) Actual results: /me gets nervous and try to find out what's wrong on #gstreamer :) Expected results: I expect to see a video from a cam, like I can view under camorama. Does this happen every time? Yup, every time. Other information: Sure I have, several outputs. gstreamer-properties (when starts): http://www.nopaste.pl/a8r Now, when sets as input 'v4l' and 'Philips 646 webcam' it hangs a while, and outputs a graphic message window 'Video for Linux (v4l): Cannot synchronize a resource' and in console: 'Error running pipeline 'Video for Linux (v4l)': Nie udało się zsynchronizować zasobu. [v4lsrc_calls.c(486): gst_v4lsrc_try_capture (): /GstPipeline:pipeline0/GstV4lSrc:v4lsrc2: system error: Bad address]' Now, let's try with v4l2: There no picture window appears; there appears a little window with OK "press OK to stop a test" and a console produces: '(gstreamer-properties:11976): GStreamer-WARNING **: pad v4l2src4:src returned caps which are not a real subset of its template caps' and goes into infinite loop with message: 'libv4l2: error dequeuing buf: Bad address' - Pressing OK stops the messages loop. Here goes the v4l-info output: http://www.nopaste.pl/a8t Finally, the command: GST_DEBUG="*:2,v4l2*:5" gst-launch 2>debug.log v4l2src ! xvimagesink returns IN THE COMMANDLINE: http://www.nopaste.pl/a8v And now, the main, created above, "debug.log" file contents: http://freefilehosting.net/download/462fi Translation of few Polish commands there: Ustawianie potoku na PAUZOWANIE... - Setting stream to PAUSING Potok jest na żywo i nie wymaga PRZEWINIĘCIA... - The stream is live and does not have to be REWINDED (?) Ustawianie potoku na ODTWARZANIE... - Settting the stream to PLAYING Niepowodzenie po 50 próbach. Urządzenie /dev/video0. Błąd systemowy: Bad address - Failure after 50 tryouts. Device /dev/video0. System error: Zły adres ;) Ustawianie potoku na NULL... - Setting stream to NULL ZWALNIANIE potoku... - freeing (?) a stream
Hej, you can run stuff like LANG=C GST_DEBUG="*:2,v4l2*:5" gst-launch 2>debug.log v4l2src ! xvimagesink to avoid the polish translations .. Problem seems to be v4l2src v4l2src_calls.c:1051:gst_v4l2src_grab_frame:<v4l2src0> Grabbing frame got interrupted on /dev/video0. No expected reason. Need to investigate if this is related to recent async changes... Just to confirm, you are on Ubunto 8.10 and you are using the packages from the GStreamer-PPA that we suggested to you? I added some more log details and wonder if you could try installing gst-plugin-good from git (please ask on #irc if you run in troubles with that).
LANG=C - I'm not a programist, I just didn't know. :) I hope these few lines are not very intruding. Yes, Ubuntu 8.10 and added Ubuntu's repo from GStreamer's site. After a long discussion on irc I started to install all that stuff and finally building deps makes me to install 317 MB. I give up for today...
this driver seems buggy: 2src_calls.c:159:gst_v4l2_buffer_new: creating buffer 0, 0x8b5c800 in pool 0x8a19d40 2src_calls.c:171:gst_v4l2_buffer_new: index: 0 2src_calls.c:172:gst_v4l2_buffer_new: type: 1 2src_calls.c:173:gst_v4l2_buffer_new: bytesused: 152064 2src_calls.c:174:gst_v4l2_buffer_new: flags: 00000000 2src_calls.c:175:gst_v4l2_buffer_new: field: 1 2src_calls.c:176:gst_v4l2_buffer_new: memory: 1 2src_calls.c:178:gst_v4l2_buffer_new: MMAP offset: 2882400000 2src_calls.c:179:gst_v4l2_buffer_new: length: 16777216 2src_calls.c:180:gst_v4l2_buffer_new: input: 0 2src_calls.c:159:gst_v4l2_buffer_new: creating buffer 1, 0x8b5c898 in pool 0x8a19d40 2src_calls.c:171:gst_v4l2_buffer_new: index: 1 2src_calls.c:172:gst_v4l2_buffer_new: type: 1 2src_calls.c:173:gst_v4l2_buffer_new: bytesused: 152064 2src_calls.c:174:gst_v4l2_buffer_new: flags: 00000000 2src_calls.c:175:gst_v4l2_buffer_new: field: 1 2src_calls.c:176:gst_v4l2_buffer_new: memory: 1 2src_calls.c:178:gst_v4l2_buffer_new: MMAP offset: 2882400001 2src_calls.c:179:gst_v4l2_buffer_new: length: 16777216 2src_calls.c:180:gst_v4l2_buffer_new: input: 0 note how MMAP offset = 2882400000 (abcdef00 in hex!?) also note how length = 16777216 (1000000 in hex!?) the frame size of 152064 seems to be correct for this resolution and video format. Maybe this is caused by libv4l2?
After installing 317 MB of programs because of executing a comand: apt-get build-dep libgstreamer0.10-0 ...the command: LANG=C GST_DEBUG="*:2,v4l2*:5" gst-launch 2>debug.log v4l2src ! xvimagesink ...wrote back in console http://wklej.org/id/65611/?zawin=1 and the log is here: http://wklej.org/id/65617/?zawin=0
I was asking to do a git clone git://anongit.freedesktop.org/gstreamer/gst-plugins-good cd gst-plugins-good ./autogen.sh --prefix=/usr make cd sys/v4l2src sudo make install Then we would get some more details. But as wtay say the driver returns funny details.
Gooosh. :/ autogen failed... First, there was no dev version of liboil, so I easily installed it from a repository, but now... configure: No package 'gstreamer-0.10' found configure: error: no gstreamer-0.10 >= 0.10.22 (GStreamer) found configure failed WTF? I cannot see pure 'gstreamer-0.10' without '-something' in no repo, neither Ubuntu's one nor Yours one. I tried to install libgstreamer0.10-dev ... and that's it, and a few more... Hail to Unix package names. :/ BTW discovered, that I cannot update plugins-bad because of conflict with mpeg-demux and mpeg-mux plugin. Finally I installed almos all with contains 'gstreamer' in name, and... configure: Requested 'gstreamer-plugins-base-0.10 >= 0.10.22.1' but version of GStreamer Base Plugins Libraries is 0.10.22 configure: error: no gstreamer-plugins-base-0.10 >= 0.10.22.1 (GStreamer Base Plug-ins Library) found configure failed I've got libgstreamer-plugins-base0.10-dev in 0.10.22.3, so I don't understand this anymore. I cannot hop this, please help again.
You are getting configure: Requested 'gstreamer-plugins-base-0.10 >= 0.10.22.1' but version of GStreamer Base Plugins Libraries is 0.10.22 configure: error: no gstreamer-plugins-base-0.10 >= 0.10.22.1 (GStreamer Base Plug-ins Library) found configure failed when configuring gst-plugins-good? Could you please attach the file config.log from gst-plugins-good?
When running: ./autogen.sh --prefix=/usr ...as You wanted above, so - yes, when cofiguring it. Log is here: http://wklej.org/id/66022/?zawin=0 You may use the activator "zawijanie wierszy wyłączone możesz je włączyć" above the log on page, to collapse lines.
Drat, someone bumped the deps for base. Either * also clone and build -base * hack configure.ac - GSTPB_REQ=0.10.22.1 + GSTPB_REQ=0.10.22 * wait for next release (see schedule on wiki)
Well, i decided to "hack" and it finished successfully. Summary of configure: http://wklej.org/id/66289/ And a tail of make, that didn't reach the end: http://wklej.org/id/66293/ I got now no idea, what to do now. :( "Błąd" means "Error" above.
Stefan: that's an awful recommendation. If we bump the requirement there's a reason. Marsjanin : It fails because you *NEED* gst-plugins-base from git (when the last number is different from 0 it means git) to build -good from git. Either grab everything from git, or wait for the next release.
Marsjanin: as Edward said the bump is for a reason, after configure, you should not try to rebuild the whole package. Just build v4l2: cd sys/v4l2 make LANG=C GST_DEBUG="*:2,v4l2*:5" gst-launch 2>debug.log GST_PLUGIN_DIR=. gst-launch v4l2src ! xvimagesink So there is no need to even install it.
So here goes debug log of the above. http://freefilehosting.net/files/4678h
obviously the command would be (copy'n'paste error in comment #12) - please check the log before uploading that its not obviously wrong. LANG=C GST_DEBUG="*:2,v4l2*:5" GST_PLUGIN_DIR=. gst-launch 2>debug.log v4l2src ! xvimagesink
erm. and its GST_PLUGIN_PATH not GST_PLUGIN_DIR: LANG=C GST_DEBUG="*:2,v4l2*:5" GST_PLUGIN_PATH=$PWD gst-launch 2>debug.log v4l2src ! xvimagesink
Sorry for not checking the log carefully. I just executed cat debug.log and noticed a lots of warns at the end. Now I see the new log is differenting, got some debug and just log info. In console: http://wklej.org/id/68709/ A log: http://freefilehosting.net/download/4685m
this is what happens: v4l2src v4l2src_calls.c:1021:gst_v4l2src_grab_frame:<v4l2src0> problem grabbing frame 0 (ix=0), trials=50, pool-ct=3, buf.flags=0 v4l2src v4l2src_calls.c:1074:gst_v4l2src_grab_frame:<v4l2src0> Grabbing frame got interrupted on /dev/video0 unexpectedly. 14: Bad address. errno=14 is EFAULT and according http://v4l2spec.bytesex.org/spec/r12878.htm this is not among the expected errors. I'd say your driver does not really work with mmap. In v4l2src_calls.c::gst_v4l2src_capture_init() it activates use_mmap=TRUE. You you set this there to FALSE to test wheter the driver works with read. But anyway file a bug agaianst the driver.
Well. That's a pity You cannot fit it inside GS, but thanks a lot for trying. Anyway, You said driver... this must meand PWC. Although the Camorama works fine with PWC for me.
Marsjanin, there are two ways to capture from a v4l2-device: 1.) using memory mapped buffers (usualy faster) 2.) using read calls GStreamer supports both, but automatically uses 1.) if the driver says it is supported. What I was wondering if e.g. Camorama uses 2.) and only that works fine. Dunno if it would make sense to add a property to the element. Atleast if it is the case that read works, we coudl add the property, so that users who face the problem, can set this property.
What's up with this? Can we close it as NOTGNOME (driver issue)? Does it still happen with current drivers/gstreamer?
Now, after 3 years I changed the computer to laptop, OS to Linux Mint Debian. That camera probably lies somewhere in a cartoon, but this will be a waste of Your and mine time, trying to configure that once again. It's no need for me to do this anymore, thank You for reply.
Ok, sorry about that, sometimes bugs just fall through the cracks. Hope the camera in the new laptop works at least :)