valbok/QtAVPlayer

Drag play window bug

samychen opened this issue · 6 comments

When drag and drop the window, duplicate frames will appear, appearing every time

The test video resolution is 1080P 59.94fps,Use QAVHWDevice_D3D11 display appearing every time,but cpu render do not appear this bug

valbok commented

Hi, thanks for contributing! What version of Qt is it?

valbok commented
  • Is it seen using ./qml_example ?

  • Could you please share the file?

  • btw it is worth to check rendering using QMediaPlayer

QMediaPlayer mp;
mp.setSource(QUrl::fromLocalFile(file));
mp.setAudioOutput(new QAudioOutput); 
mp.setVideoOutput(videoSurface);
mp.play();
valbok commented

Also as I remember, old Qt QML supports only NV12 format for rendering, means it requires 2 textures, otherwise the renderer will fallback to frame.map(), it will download data from GPU and convert to proper format.

valbok commented

Your idea looks correct https://github.com/valbok/QtAVPlayer/pull/453/files
but remember in some version of ffmpeg, AV_PIX_FMT_NV12 is returned for AV_HWDEVICE_TYPE_D3D11VA, maybe it is true for only some files ?

valbok commented

Could you confirm that your files are ok now? after 453. Thanks