Getting Slow Motion Video while using QML Media Player

Viewed 83

I have been trying to use QML MediaPlayer. So, I start testing the built-in example in Qt Creator (Media Player Example).

After doing some more tests with videos having fps more than 60 (e.g. 120 or 240 fps) I found a weird bug with the media player. The playing video becomes slow-motion! It looks like the fps is always considered 60 or maybe FPSs higher than 120 are not considered!

Note: I have tested with a built-in QML example that is using QML Media Player. Also I have tested with Qt6.3.4-Msvc2019-64Bit.

Any experience with this issue or any help will be appreciated.

2 Answers

Are You sure you have not set any playbackRate?

I have tried the to disable the vsync and it's better but not perfect.

QSurfaceFormat format;
    format.setProfile ( QSurfaceFormat::CoreProfile );
    format.setRenderableType ( QSurfaceFormat::OpenGLES );
    format.setSwapInterval ( 0 );
    format.setVersion ( 3, 0 );  
    QSurfaceFormat::setDefaultFormat ( format );

UPDATE: I found the reason is the performance of the underlying media service. It seems Qt uses windows native player (e.g. DirectShow). So one solution is to use custome gstreamer pipeline powered by nvidia decoder. So I'm gonna try that and integrate that in qml.

Related