Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Using Wx::MediaCtrl to display a live videofeed (eg a webcam)

by Anonymous Monk
on Jul 20, 2010 at 12:44 UTC ( [id://850415]=note: print w/replies, xml ) Need Help??


in reply to Using Wx::MediaCtrl to display a live videofeed (eg a webcam)

Do you have a wxLogWindow? Some kind of error message should be reported... Can you run it with strace?
  • Comment on Re: Using Wx::MediaCtrl to display a live videofeed (eg a webcam)

Replies are listed 'Best First'.
Re^2: Using Wx::MediaCtrl to display a live videofeed (eg a webcam)
by Steve_BZ (Chaplain) on Jul 21, 2010 at 01:09 UTC

    Hi Anon,

    Thanks for this. I didn't have LogWindow installed, so I just did that and I get:

    21:56:14: Error: gst_error_callback Error Message:Invalid URI "/dev/video0". Debug:gstplaybasebin.c(1666): gen_source_element (): /GstPlayBin:play (error 0: Success) 21:56:14: Error: wxGStreamerMediaBackend::Load - Could not set initial + state to ready (error 0: Success)

    I guess it doesn't like the /dev/video0. Maybe it really expects a URL, but assuming it means a URI, then should I just put my computer name in front of it like this? steve-desktop/dev/video0 because that doesn't work either.

    Do you know what format is correct?

    Thanks and regards

    Steve.

    PS I tried the strace, but it gave me pages and pages of info. I'll have a go at filtering it down, and post it here.

      $ perl -MURI::file -le"die URI::file->new( shift )->canonical " /dev/v +ideo0 file:///dev/video0

        Hi Monks,

        Well, I've now rebuilt the hardware and everything is cookin' nicely.

        I tried $i_frame->{Ctl_Videos_Media}->LoadURI ('file:///dev/video0'); and I no longer get any errors in LogWindow but no picture in the media control.

        Update: Oookaaay, now my hardware is compliant with that age-old standard of plugging the webcam in, we have some progress! The progress bar on the application flickers (although not the image) and print $i_frame->{Ctl_Videos_Media}->LoadURI ('file:///dev/video0'); returns "1" but gives error Gtk-CRITICAL **: gtk_range_set_range: assertion `min < max' failed, so I guess it is accessing the URI, but maybe it is immediately hitting EOF, or something.

        Update 2: According to Similar wxPython problem it may be missing GStreamer packages. This sounds like a possibility, so I'm going to try to track this down. If you know what the correct list is, please share :)

        Regards

        Steve.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://850415]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-04-23 07:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found