Sound of video starts ms before video

OS (e.g. Win10): Windows
PsychoPy version (e.g. 2024.2.4 Py 3.8): 2024.2.5 Py 3.10
What are you trying to achieve?:
I want to play a video in my trial (exact video defined in the condition file read in the loop) with varying duration (14-21s, depending on the video). I’m preloading the video in the routine beforehand with a static component (which lasts 1.5s, no warning message that this is too short). What is happening is that the sound of some of the videos (most but not all, always the same videos across runs) always starts a little earlier than the video during the refresh time between routines. The sound then stops and begins again with the video (so audio and picture of video are synchronous). It only lasts for a few milliseconds but when people start talking early in the video, you do notice it.

What did you try to make it work?:
I started the movie component 0.5s later after the start of the routine. I reduced the duration of the static component. I started the static component later than the start of the routine it is in or finished it before the end of the respective routine. I changed the Audio latency priority to 4: Latency critical. I felt like it improved a little bit after the last action but this could also be subjective and the problem in general still remained.
I haven’t found similar issues in this forum. And was wondering if it might be due to the videos because I did run this experiment beforehand with no such issues but with a different set of videos (maybe lower quality?) - what should I be aware of when checking for this in the videos?

Any help or thoughts greatly appreciated!

I noticed it is actually a problem with the static component. The movie seems to be starting at the end of the loading period: I added different routines between the routine in which the movie was loaded through the static component and the actual presentation of the movie. The sound started playing already at the end of the routine in which the movie was loaded and then continued when the movie was playing with a break when different routines were shown. This seems to be a bug of some sort?

The reason why this was no problem with a different set of videos could be due to the non-existent background noise in the old videos (i.e., they started silent).

My workaround to this was adding blank frames to the video in the beginning. But this makes the videos longer and is definitely not the ideal solution.