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. QVideoSink doesn't handle alpha channel

QVideoSink doesn't handle alpha channel

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 153 Views
  • 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.
  • T Offline
    T Offline
    TheEnigmist
    wrote on last edited by TheEnigmist
    #1

    I've a WebM (VP9) video with alpha channel on it. I can open correctly the video on OBS and it shows as intended, but if I try to use it in QVideoSink using videoFrameChanged to show video frame by frame it shows a black background instead of transparent.

    Here ffmpeg file info :
    00bd09c1-be28-4da9-afa3-a8333973c833-image.png

    PixelFormat of each QVideoFrame is Format_BGRA8888 , when converted to QImage becomes Format_ARGB32_Premultiplied , all of them has an alpha channel so why my video show transparency as a black pixel?

    EDIT: If I check alpha channel with hasAlpha() on frame.image() is true, QPixmap::fromImage(frame.image) returns false!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Please don't post the same question in multiple sub forums. One is enough.

      Duplicates

      Closing this one

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1

      • Login

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