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

Qt Multimedia : FFMPEG no vout on 4K vp9 video while ffplay works fine

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P1: Critical
    • None
    • 6.6.1
    • Multimedia
    • None
    • macOS

    Description

      import QtQuick 6.2
      import QtMultimediaItem {
        anchors.fill: parent
        MediaPlayer {
            id: videoPlayer
            videoOutput: videoOutput
            source: "file:///path/to/bunny.webm"
            onErrorOccurred: {
              console.log("error", videoPlayer.errorString)
            }
            audioOutput: AudioOutput {}
        }  VideoOutput {
            id: videoOutput
            anchors.fill: parent
        }
        Component.onCompleted: {
            videoPlayer.play();
        }
      }
       

      just have a mediaplayer play the attached bunny.webm video file

      Qt logs

      "FFmpeg log: Format yuv420p chosen by get_format()."
      "FFmpeg log: All info found"
      "FFmpeg log: After avformat_find_stream_info() pos: 3229 bytes read:32768 seeks:0 frames:1"
      qt.multimedia.ffmpeg.mediadataholder: AVStream duration -9223372036854775808 is invalid. Taking it from the metadata
      "FFmpeg log: detected 12 logical cores"
      "FFmpeg log: Format videotoolbox_vld chosen by get_format()."
      "FFmpeg log: Format videotoolbox_vld requires hwaccel initialisation."

      FFplay logs

      [vp9 @ 0x7fda8391ea80] Format yuv420p chosen by get_format().
      [matroska,webm @ 0x7fda8390a280] All info found
      [matroska,webm @ 0x7fda8390a280] After avformat_find_stream_info() pos: 3229 bytes read:32768 seeks:0 frames:1
      Input #0, matroska,webm, from '/Users/kevinbarreau/QtProjects/playbackBug1/server/bunny.webm':
        Metadata:
          encoder         : google/video-file
        Duration: 00:10:34.57, start: 0.000000, bitrate: 19257 kb/s
        Stream #0:0(eng), 1, 1/1000: Video: vp9 (Profile 0), 1 reference frame, yuv420p(tv, bt709), 3840x2160, 0/1, SAR 1:1 DAR 16:9, 60 fps, 60 tbr, 1k tbn (default)
      detected 12 logical cores
      [vp9 @ 0x7fda83815540] Format yuv420p chosen by get_format().

      There is a mismatch in chosen format videotoolbox vs yuv420 possibly causing the error?

      Here is how I get the video, it's simple node.js app using express and ytdl-core ... if you wan to skip this just DL the video I uploaded it here https://file.io/Qix5bMhH5h6G

      const ytdl = require('ytdl-core');
      const express = require('express');
      const fs = require('fs');// const ytVideo = `https://www.youtube.com/watch?v=XITHbsUUlYI`;
      const ytVideo = `https://www.youtube.com/watch?v=aqz-KE-bpKQ`;const app = express()const filters = ['videoonly', 'videoandaudio', 'audioonly']app.get("/", (req, res) => {
        let stream = ytdl(ytVideo, {
          quality: 'highestvideo',
          filter: filters[0],
        });
        stream.on('info', (info, format) => {
          console.log(JSON.stringify(format, null, 2));
        });
        stream.on('error', err => {
          console.log("/ error stream", err);
          res.status(500).end();
        }).pipe(res);
      });app.get("/download", (req, res) => {
        let stream = ytdl(ytVideo, {
          quality: 'highestvideo',
          filter: filters[0],
        });
        stream.on('error', err => {
          console.log("/ error stream", err);
          res.status(500).end();
        }).pipe(fs.createWriteStream('video.webm'));
      });app.listen(3000);
       

      Assumptions : Qt multimedia 's ffmpeg and ffplay should have the same capabilities / behaviour ?

      On macbook pro 2019 Intel, Sonoma

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            tpochep Timur Pocheptsov
            audifaxdev Kevin Barreau
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes