Results 1 to 4 of 4

Thread: Streaming Video

  1. #1
    Join Date
    May 2010
    Posts
    12
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Streaming Video

    Hello everyone!

    I recently started a task of trying to stream video from a webcam thats plugged into one of my usb ports into a Qt widget in Ubuntu linux. There are very few well documented examples of this within a recent time period. The webcam I am using is a Logitech 1.3 megapixel that is compatible with the Linux distribution I have.

    I saw on some post during my googling endeavors a person reading /dev/video0 as if it were a file and trying to get the video data read in this way. My question then, is twofold: Can video data be retrieved this way, using the /dev files? And how do you get the webcam's video data into a buffer to start decoding it? I have very little knowledge of working with video and don't know how to decode the data yet, but a step in the right direction would be very helpful.

    I don't have any relevant code to speak of, so any tips or code examples would be greatly appreciated. Thanks for your time!

    I forgot to mention that I am using Qt Creator 1.3.1 which is based on Qt 4.6.2 (32 bit).
    Last edited by wysota; 25th May 2010 at 20:39.

  2. #2
    Join Date
    May 2010
    Posts
    12
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Streaming Video

    Ok cool, I'll read through this stuff. Thanks for the info! Feel free to post whatever else you come across :P.

  3. #3
    Join Date
    May 2010
    Posts
    12
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Streaming Video

    Those documents have a LOT of information that I don't really understand. The authors are writing down structs and commands that I have never seen or heard of. I simply need to get the video data, decode it if necessary, and display it in a widget. If this information is being shown to me and I am just too ignorant to find it, I apologize. If there are some more clear examples with more fleshed out code you (muisei) or anyone are aware of, they would be greatly appreciated. Thanks again!

  4. #4
    Join Date
    May 2010
    Posts
    12
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Streaming Video

    Ok, so I found some code from the same project a few years ago. The person who wrote it is attemping to use UDP sockets to read in video data and then decode it with ffmpeg. I have been informed that the video I will be receiving and putting into my Qt program will be Mpeg4, but I don't know how it is supposed to be encapsulated. All of that is moot at this point anyway, because I am using VLC to stream video to the loopback address (127.0.0.1) and the Qt program is reading that in.

    When I use the MPEG4 Codec with certain encapsulations, it will throw the following errors at me.

    [mpeg4 @ 0x83ec350]looks like this file was encoded with (divx4/(old)xvid/opendivx) -> forcing low_delay flag

    [mpeg4 @ 0x83ec350]warning: first frame is no keyframe

    [mpeg4 @ 0x83ec350]ac-tex damaged at 18 3

    [mpeg4 @ 0x83ec350]Error at MB: 141

    [mpeg4 @ 0x83ec350]concealing 1116 DC, 1116 AC, 1116 MV errors.

    I have attached the .cpp file where the decoding of the video is "supposed" to happen. Thanks for your help!
    Attached Files Attached Files

Similar Threads

  1. Help in creating video streaming app
    By superutsav in forum Qt Programming
    Replies: 16
    Last Post: 21st April 2010, 15:55
  2. Streaming Web cam Video In Both Party
    By Peter_APIIT in forum Qt Programming
    Replies: 1
    Last Post: 8th December 2009, 06:12
  3. Video Streaming
    By stefandetter in forum Qt Programming
    Replies: 1
    Last Post: 4th June 2008, 09:59
  4. Video streaming with QT4
    By QiT in forum Qt Programming
    Replies: 1
    Last Post: 10th April 2008, 18:09
  5. Video streaming on QMainWindow
    By yagabey in forum Qt Programming
    Replies: 3
    Last Post: 13th January 2008, 17:15

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.