Hi People,

I have been developing a wxPerl application for about a year now, one of my outstanding issues is how to get a live video feed to display. So far I have been using Wx::MediaCtrl and all my testing has been done on stored videos. However, I feel the time has come to bite the bullet and get the live feed to work. I am developing on Linux (Kubuntu) and Wx::MediaCtrl uses GStreamer as the back end. I had hoped that I could simply use:

$success_status = $i_frame->{Ctl_Videos_Media}->LoadURI ('/dev/video0');

but it doesn't work, it doesn't give me an error message, and it doen't even return a success status (but if I do a GetStatus on it I get '0').

My second thought was:

*However*, there is hope, if I run the following command at a command prompt: gst-launch-0.10 v4l2src ! tee name=videoout ! queue ! videorate ! video/x-raw-yuv,fps=15 ! queue ! theoraenc quality=60 ! queue ! muxout. oggmux name=muxout ! filesink location=lulz.ogg videoout. ! queue ! ffmpegcolorspace ! ximagesink, I get a stored file which I can seek through and a live feed being displayed through a window with about a half-second latency. If only that window was a MediaCtrl window it would be perfect. As gst-launch is a GStreamer application and Wx::MediaCtrl uses Wx::GStreamerMediaBackend, I assume that I can somehow splice these programs together, but here I get lost.

As usual, your wisdom and thoughts would be very welcome.

Regards

Steve


In reply to Using Wx::MediaCtrl to display a live videofeed (eg a webcam) by Steve_BZ

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.