Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-121832

Implement handling of video frame transformations upon encoding

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.5, 6.6, 6.7, 6.8
    • Multimedia

    Description

      QVideoFrame might be mirrored and rotated (QVideoFrame::rotation, QVideoFrame::mirrored).
      It's handled properly in frame rendering, see QVideoWindowPrivate::render.

      The ffmpeg encoder must consider them and record the frames properly.

      Use cases:

      • a user sets a custom transformation to video frames and sends them to the media recorder.
      • eglfs screen capture generates frames flipped + rotated 180.

      Notes:
      Write correct side_data to avframes and maybe to stream->codecpar.
      Note, that writing the side data to stream->codecpar might be challenging as we don't have the rotation data when we open the codec.

      First of all, try modifying frame->side_data with type AV_PKT_DATA_DISPLAYMATRIX.
      See our util func streamSideData(...), and ffmpeg funcs av_packet_side_data_add, av_display_rotation_set, av_display_matrix_flip.

      Attachments

        Activity

          People

            Unassigned Unassigned
            artemiy Artem Dyomin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: