CreateMovie error: Failed to start movie encoding pipeline!

PsychtoolboxVersion: ‘3.0.17 - Flavor: beta - Corresponds to SVN Revision 11371’
Platform: macOS Mojave 10.14.6
Matlab Version: R2019a
GStreamer Version: gstreamer-1.0-1.18.1-x86_64

I am trying to create a video using ‘CreateMovie’ in the following way:

movie = Screen('CreateMovie', window, VideoFileName, winRect(3), winRect(4), 60, ':CodecType=x264enc Videoquality=1 Profile=2');

However, I get the following message:

PTB-ERROR: Statechange failed with GST_STATE_CHANGE_FAILURE!
PTB-ERROR: In CreateMovie: Creating movie file with handle 0 [RDK_VIDEOs/DETECTION_FINAL/DET_RDK_DEG_Coherence_0_90_UP.mp4] failed: Failed to start movie encoding pipeline!
Error in function CreateMovie: 	Usage error
CreateMovie failed for reason mentioned above.

Can you please help me understand what the problem might be?

Thank you very much in advance,

Aurelio

I’ve found the issue. For some reason, it didn’t like the filename I had chosen. After removing the root folder from the filename, it worked fine. I’m not sure why.

Thank you again.

Assuming the path you specified was correct, ie. all folders existed under that name, maybe it helps to add a ./ at the beginning to clearly mark a relative path? Capitalization may also matter on some operating systems, e.g., typical Unixes, don’t remember from the top of my head if macOS cares about that. On Linux and Windows, such relative pathes work if spelled correctly.

-mario

Hi Mario,

thanks a lot for your reply. It was just my mistake. As a matter of fact, one of the folders did not exist. I was misled by the error message to think the problem had something to do with the codec settings, where, in fact, it was a much sillier issue.

Thanks again and sorry for wasting your time.