Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. from QCamera or QVideoWidget get video bytes
Forum Updated to NodeBB v4.3 + New Features

from QCamera or QVideoWidget get video bytes

Scheduled Pinned Locked Moved Solved General and Desktop
22 Posts 5 Posters 3.0k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Bonnie

    @zabitqt Oh, you can't convert it to QImage like this, as your debug info shows, the frame data you get from the camera is in YUV format, which QImage doesn't support.
    If you want to get a QImage, just call frame.image(), you don't even need to clone, map and unmap...

    Z Offline
    Z Offline
    zabitqt
    wrote on last edited by
    #21

    @Bonnie said in from QCamera or QVideoWidget get video bytes:

    frame.image()

    It doesn't exist method frame.image(). OK I have understand that the problem is QImage that not support Format_YUYV. I search a solution in google. Thank you so much!

    B 1 Reply Last reply
    0
    • Z zabitqt

      @Bonnie said in from QCamera or QVideoWidget get video bytes:

      frame.image()

      It doesn't exist method frame.image(). OK I have understand that the problem is QImage that not support Format_YUYV. I search a solution in google. Thank you so much!

      B Offline
      B Offline
      Bonnie
      wrote on last edited by Bonnie
      #22

      @zabitqt This function exists since qt5.15 :), in which Qt has done the YUV to RGB conversion internally.
      (Also have checked that in Qt6 it should be toImage() )

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved