You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just started building with oF a few months ago, but already made some great progress in my project thanks to the amazing framework and communtiy - so thank you all very much!
My goal is to build an app for Windows that loads multiple videos and plays them back on external triggers. I found to get the best performance when loading each video in a separate ofVideoPlayer instance. Everytime a trigger is detected the corresponding videoplayer starts playback. On a stop trigger the playback is paused and the videoPlayer is reset using firstFrame(). This basically works but I noticed that when I trigger a video for the second time it displays the frame it was at when it was stopped for a splitsecond. This happens despite the fact that firstFrame was called.
In order to troubleshoot the issue I boiled the project down to the most basic setup and also tried using the lastest version of_v20240901 and different video formats.
Expectation:
Video starts playback on keypress
Video playback is paused on keyrelease
Video resets to the first frame on keyrelease which is then drawn
Triggering playback for the second time starts with the first frame
Problem:
After calling firstFrame() the currentFrame is 0 when printing vp.getCurrentFrame() but the first frame is not drawn. Triggering playback for the second time shows the last drawn frame of the previous playback sequence before jumping to the first frame of the video.
Environment:
Windows 10 Pro 22H2
openFrameworks 0.12 release & v20240901
Visual Studio Community 2022 17.11.2
I'm happy about any input on this behaviour! Am I doing it wrong?
Best regards!
Edit: In the meantime I had a nice conversation with burton on the oF Forum and he tested the code on Mac where he found it to work as expected. There seems to be a discrepancy in the behaviour of the video player being paused on different platforms. On Mac the App starts with drawing the first frame on startup whereas on windows the app starts with a black screen until the first playback trigger appears.
Link to the thread: https://forum.openframeworks.cc/t/videoplayer-not-resetting-to-first-frame/24628/4
The text was updated successfully, but these errors were encountered:
timka418
changed the title
ofVideoPlayer.firstFrame() resets currentFrame but the first frame is not drawn
ofVideoPlayer ‘pausing’ behaviour discrepancy between platforms (Windows seems problematic)
Sep 19, 2024
Hi guys,
I just started building with oF a few months ago, but already made some great progress in my project thanks to the amazing framework and communtiy - so thank you all very much!
My goal is to build an app for Windows that loads multiple videos and plays them back on external triggers. I found to get the best performance when loading each video in a separate ofVideoPlayer instance. Everytime a trigger is detected the corresponding videoplayer starts playback. On a stop trigger the playback is paused and the videoPlayer is reset using firstFrame(). This basically works but I noticed that when I trigger a video for the second time it displays the frame it was at when it was stopped for a splitsecond. This happens despite the fact that firstFrame was called.
In order to troubleshoot the issue I boiled the project down to the most basic setup and also tried using the lastest version of_v20240901 and different video formats.
Expectation:
Problem:
After calling firstFrame() the currentFrame is 0 when printing vp.getCurrentFrame() but the first frame is not drawn. Triggering playback for the second time shows the last drawn frame of the previous playback sequence before jumping to the first frame of the video.
Environment:
I'm happy about any input on this behaviour! Am I doing it wrong?
Best regards!
Edit: In the meantime I had a nice conversation with burton on the oF Forum and he tested the code on Mac where he found it to work as expected. There seems to be a discrepancy in the behaviour of the video player being paused on different platforms. On Mac the App starts with drawing the first frame on startup whereas on windows the app starts with a black screen until the first playback trigger appears.
Link to the thread: https://forum.openframeworks.cc/t/videoplayer-not-resetting-to-first-frame/24628/4
The text was updated successfully, but these errors were encountered: