Videos are getting cut off or audio is wrong at the very end of the presentation

OS: macOS 10.14 (Mojave)
PsychoPy version: 3.0.5
**Standard Standalone? yes
What are you trying to achieve?: I am trying to present videos (of varying lengths) and some of my videos get cut off, and others have the audio glitch at the end (so instead of the last 2s of the video having the right audio with it, it repeats the audio from right before that from the video clip).

What did you try to make it work?: I tried having the presentation be in frames and not seconds, separating the file into a video file and an audio file and presenting both at same time, tried using other options besides moviepy, tried putting a static period in the routine before a video routine.

What specifically went wrong when you tried that?: Original problem not solved and for using other options besides moviepy I got additional errors and the experiment would not run. When using a static period it said the name of the component that was supposed to load was not defined.

Experiment is here:

Thank you!

Hello sfurlong

I realize this answer might not be of much help anymore due to the late response. I am sorry if that is the case, but will respond regardles for future reference.

We recently encountered almost exactly the same problem in our team with the aforementioned sound glitch at the end, repeating the last seconds od the audio. Another possible issue with our audio was sound popping.

In our case, we used .m4v video files which I assume were the problem. This is based on the fact that after changing the format to .mp4 resulted in the files working perfectly fine.

The factually unsupported conclusion is that psychopy seems to have issues with loading video files in certain formats (besides being able to handle many different formats).
Therefore, changing the formats of the videos might solve the problem.

I hope this could help

Unsure whether anyone else is watching this thread, but I am having the exact same issue using .mp4 files. I’m pretty baffled by it — this seems to happen only with some files, and not even necessarily the larger files. Converting to .wmv or .w4v did not fix the issue.

I had the same issue using both .mp4 and .mov files. Playing around with the “Size” option in the layout did the trick for the video component (I have a 1440x990 screen so set it to (1.44, 0.9)). This did not fix the audio, but playing around with the Audio Library settings worked (in my case the ‘sounddevice’ setting worked, but I read another thread in which someone used ‘PTB’). Hopefully this helps!

Does this thread help?