Video loop glitch
-
Hi Guys
My code to loop a background video is below which works fine.
When it gets to the end of the video and restarts there is a brief black screen before it resumes.
Is there any way to avoid this?
I was looking at this thread and it appears it may be a bug.
https://stackoverflow.com/questions/33472761/windows-qt5-qmediaplayer-qmediaplaylist-tiny-duration-black-screen-when-thQMediaPlaylist *aos_dm = new QMediaPlaylist; QMediaPlaylist *aos_nm = new QMediaPlaylist; aos_nm->addMedia(QUrl::fromLocalFile(QDir::currentPath() + "\\Resources\\videos\\nm_animation_1.mp4")); aos_nm->setCurrentIndex(0); aos_nm->setPlaybackMode(aos_nm->Loop); aos_dm->addMedia(QUrl::fromLocalFile(QDir::currentPath() + "\\Resources\\videos\\dm_animation_1.mp4")); aos_dm->setCurrentIndex(0); aos_dm->setPlaybackMode(aos_dm->Loop); player->setPlaylist(aos_dm); videoWidget = new QVideoWidget(mstrWnd); player->setVideoOutput(videoWidget); videoWidget->setGeometry(getSettingI(MSTR_APP_X).toInt(), getSettingI(MSTR_APP_Y).toInt(), getSettingI(MSTR_APP_WIDTH).toInt(), getSettingI(MSTR_APP_HEIGHT).toInt()); videoWidget->show(); player->play();
-
Hi,
You should add:
- Qt version
- OS version
- Video file specification
-
@SGaist Oh my dev machine is :
Windows 10
QT 5.12.2
Visual Studio 2017
There are 2 video files, both of MP4 type. (I've tried AVI as well)
All codecs installed, videos play fine, it is just on the loop restart there is a black screen for 0.5 secondI've executed the deployed app on a Windows 7 machine with the same outcome.
-
@SGaist Oh my dev machine is :
Windows 10
QT 5.12.2
Visual Studio 2017
There are 2 video files, both of MP4 type. (I've tried AVI as well)
All codecs installed, videos play fine, it is just on the loop restart there is a black screen for 0.5 secondI've executed the deployed app on a Windows 7 machine with the same outcome.
-
Hello everyone,
I am actually experiencing the exact same issue, using Qt 5.15.2, on Win 10.
I have tried with *.webm and *.mp4 videos.
Tried using both :
QMediaPlaylist::Loop
QMediaPlaylist::CurrentItemInLoopBoth give the same "split second blackout" glitch.
Hope this helps.
Regards,