Video plays audio on repeat until routine ends

OS : Windows 10
PsychoPy version : 2022.2.5

I have a video that is set to play as a response to a stimuli. As in, participant hears a narrative and sees an image, I press the mouse to start the next routine where a video plays asking the participant a question.

The video is mp4.

The issue is that the video will play once through, then it will repeat the last second or so of audio from the video over and over and over until I click through to the next stimuli.

There are no error messages. I’m not entirely sure what I’ve done wrong. I just need the video to stop when it is finished and remain on the screen until I click the mouse button to progress to the next stimuli (this is important as it will allow the participant to give audio feedback that I’m recording external to psychopy).

I’m not entirely sure how to stop the video from playing the audio while having the last frame remain on the screen.
It only does this for video, unfortunately I cannot have the video/audio split due to potential for de-synchronization.

If there is any additional information you need please let me know. Below is the builder settings for the movie clip, as well as the routine set up and all that.
Thank you in advance.

Loop info:

How about using a screenshot of the final frame of the video as a static image, possibly in a new routine which starts when the video finishes?

That is not logistically reasonable, especially since this is only the audio playing back, and not even in completion, which makes it seem like an issue with something in PsychoPy.

Or is it just default to loop the last second of the audio on a video on repeat, and if that is the case, how do I turn that off.

I’ve added the image from the narrative at the end.

The problem is that the audio starts to loop before the routine ends and the image comes back on screen.

Okay an update:
I rebuilt just the video section on a loop to see if it was an issue with the experiment and the changes I made. However, it is still behaving the same way in the new experiment with just the video component on a loop.

I played around with the audio settings to see if using PTB like it recommends would help, however that messes up the pitch of audio files (but not video audio for some reason, just .wav’s), but it also didn’t fix the issues with the audio on the videos repeating ad nauseum (it even continues after I force quit the experiment with esc).

I switched to different backend playback with the following results:

-ffpyplayer: Video doesn’t drop frames and audio goes completely insane. Freezes on last frame, and audio still clips in when I force end the routine at the end of the video.
This comes up as well only for this option I believe.
Parameter volume has unrecognised inputType “float”

-moviepy: Video drops frames so badly that the clips are cut short, audio plays as expected. Makes the videos completely unusable, as the dropped frames are enough that the audio isn’t done playing before the video is “done”.

-opencv: Video doesn’t drop frames, audio goes completely insane. Freezes on last frame, audio still clips in when force end to the routine. Is less dramatic than ffpyplayer, but still plays after esc as well.

-vlc: Experiment results in error code: NameError: name ‘vlc’ is not defined
vlc is preloaded as an option in the drop down for “Backend” so not sure why the name isn’t defined and it doesn’t work at all.

Regardless, I either end up with audio nightmares, or video frame drops.
I’ve added a static image as a separate routine after the video routine. But I still get audio repeats before the routine is able to end and move onto the next one with the static image. This severely degrades the experimental task to a point that it’s unusable. I would prefer not having to abandon PsychoPy on this.

This is a long shot but it would have been my approach in this situation.

I know you said your video is .mp4 but if you plan to run the exp locally (i.e. offline) then try to recoded it to .avi or .mov

Just do one video, one trial containing this recoded video and see how it goes.
I do not have experience with video files on PsychoPy but for sounds, for instance, .wav play locally but not online, and .mp3 play online but not locally.

Sadly .avi does the same thing as .mp4
So it just looks like I will have to abandon PsychoPy for any experiments that need to use videos as it seems that no one really knows how videos work in PsychoPy.

Which is too bad, as I really didn’t want to have to build 4 different experimental orders in powerpoint.

Oh well.
Thanks for everyone’s efforts.