MovieStim FFmpeg Audio thread error

Dear Psychopy community,

I’m trying to play a video stimulus that previously worked well with MovieStim2 but fails to play the audio in the new ffpy backend. Video itself plays smoothly. The same video will play with sound if using ffplay directly (see screenshot below).

I wonder if anyone has come across this;

[ffpyplayer_abuffersink @ 0x7f9efd2c5c40] Channel layout change is not supported
Audio thread error: Not yet implemented in FFmpeg, patches welcome

Psychopy 2024.2.4 Python 3.10
MacOS Sequoia 15.3.1 or Windows 10 (same error)

I can’t share the stimulus publicly but I could send it to someone directly.

Thank you!
Jasper

This is apparently a known issue with ffpyplayer itself Audio thread error for version >= 4.4: Channel layout change is not supported · Issue #147 · matham/ffpyplayer · GitHub

The solution is probably going to involve changing the audio encoding your movie file is using by re-exporting it with a different audio encoding. I think there might be some mono-to-stereo conversion going on here, in that it looks like the audio track is a one dimensional shape with two channels, but I don’t know how that happens.

The other alternative is to switch to MovieStim3 or vlcMovieStim, which use different (and generally less reliable) movie backends, but that might avoid this specific issue.