Results 1 to 5 of 5

Thread: Best way to stream and record a webcam

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Best way to stream and record a webcam

    Well, this is starting to become a monologue, maybe due to my impatience...

    But, in case anyone is interested I'm starting to get it working thanks to QtGStreamer which can be obtained from http://gitorious.org/qtgstreamer (more info in http://gkiagia.wordpress.com/) and makes it easy to work with GStreamer :-)

    I still have to test if QtGst will compile under windows, but in linux all works well :-)

    So many thanks to the QtGStreamer developers for making it so easy that a newbie can get it working in one day!

  2. #2
    Join Date
    Jun 2014
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Best way to stream and record a webcam

    hi,

    can you help me how you are streaming webcam using qt-gstreamer.
    I am using Qt-4.8.5.
    I am using linux.

  3. #3

    Default Re: Best way to stream and record a webcam

    this worked for me

    void gst_setup()
    {

    gst_init (NULL,NULL);

    bin = gst_pipeline_new ("pipeline");
    g_assert( bin);



    testSrc = gst_element_factory_make("v4l2src", "source");
    g_assert(testSrc);



    ffmpegcs = gst_element_factory_make ( "ffmpegcolorspace", "ffmpegcs" );


    encoder = gst_element_factory_make ( "jpegenc", "encoder" );
    g_assert(encoder);





    tcp = gst_element_factory_make ("tcpserversink", "tcp");
    g_assert(tcp);


    muxer = gst_element_factory_make ( "multipartmux", "muxer");


    g_object_set(tcp , "host", "192.168.5.77", NULL );
    g_object_set(tcp , "port", 5000 , NULL );
    g_object_set (testSrc, "capture-mode", 3 , NULL);


    videoOut = gst_element_factory_make("autovideosink", "video out");
    g_assert(videoOut);




    gst_bin_add_many(GST_BIN( bin), testSrc, ffmpegcs, encoder, muxer , tcp , NULL);


    gst_element_link_many( testSrc, ffmpegcs ,encoder, muxer, tcp, NULL);
    }
    if you have any questions let me know
    my Email : obalouchi1@gmail.com

Similar Threads

  1. Replies: 3
    Last Post: 26th March 2010, 04:32
  2. Control WebCam with Qt
    By lixo1 in forum Qt Programming
    Replies: 4
    Last Post: 22nd May 2009, 09:21
  3. Webcam USB under Windows with qt4
    By Wickinger in forum General Programming
    Replies: 3
    Last Post: 18th March 2008, 00:10
  4. Looking for a specific webcam...
    By hickscorp in forum General Discussion
    Replies: 0
    Last Post: 24th January 2008, 16:07
  5. use Webcam
    By sabeesh in forum Qt Programming
    Replies: 1
    Last Post: 21st August 2007, 07:52

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.