Description of the problem:
I have a perception task. I play a movie stim and the participant has to decide between two answers. On my local device, the movie plays just fine, however when running the study on Pavlovia, I get the following error message:
I have other movie stims that run just fine, but they are outside of a loop and don’t require a conditions file to pull them in. Any ideas on what might be causing the trials within a loop to give this error? I tried changing the movie stim units to “height” rather than “from exp settings” already.
Hi - I have a total of 176 movie files that are part of my two loops. The variable name is TP_Stim and I’m trying to pull .mov files. The movie files are listed in a .xls conditions file that is referenced in the loop and I pull the videos in a random order from that list.
This works on my local device, but does it work differently for Pavlovia; is there a reason why I should need to organize it differently for online presentation??
My experimental trials are set up in the same format, so once I get the practice trials working, I’ll apply the same set up to the experimental trials. All files from the study are in the git file the same way that they are in the same file on my local device.
Thank you for that recommendation. I have other .mov files that are working in the same script, so I don’t think that’s the case. I tried making them all .mp4 files and got the same result as with the .mov files. It seems to be something with the “TrialPracticeLoop” and calling the conditions (.xls) file that I have set up.
I can’t actually access the repository, it looks like it might not be set to public. I’m pretty puzzled. The nature of the error suggests it’s trying to do something like read in a movie file as text, or failing to render the movie file correctly, but if the error is identical with a different file format, then it might be an issue with reading the excel file. If you can make the repository public I can have another look.
It’s the movie files themselves. I can’t open any of the videos that are referenced in the excel files in QuickTime locally on my own computer, it gives me errors. When I open them in VLC, they work, but the codec information is very weird. It says their framerate is 30.4fps, pixels Planar 4:2:0 YUV, with an mp3 audio stream. That’s basically non-standard and downright strange on all counts and I’m not surprised that Pavlovia can’t handle it.
If you can, I suggest re-exporting the videos with an h.264 video codec, and dropping the audio stream altogether when you do.
Okay, thank you! I thought I had dropped the audio when I first created them, but I guess not.
I will test it with just the 16 practice videos at first before applying to the 160 experiment videos. What would you suggest as the most efficient way to update the 176 video files? Should I put each into a video editor and just re-create them all together? (I’m not as up with video format editing as I could be. The initial creation took me about 4 hours to do and I’m just wondering if there’s an easier way to save that time)
Depends what kind of software you’re using. If you have access to Adobe Media Encoder (part of the Adobe CC suite), you can just mass import all of them and then mass export them in a new format. Something like VLC can do it one at a time, which isn’t ideal. What were you using initially?
Unfortunately, I don’t have access to Adobe since my university closed (edited spelling) due to Covid-19. Initially, I used Open Shot Video Editor, which I believe would make me do it one at a time.
That…didn’t work at all unfortunately! Sorry to get your hopes up. I tried doing the mass import/export in Adobe Media Encoder, and while it output videos, they are scrambled somehow. I don’t really understand how it could change the order of the frames by re-encoding them, but it seems to have a lot of trouble reading in the original files. I suspect it’s the framerate being 30.4 rather than 30fps, which I still don’t understand!
Were these stimuli originally generated in Blender?
The stimuli originally generated via MatLab. Those files were then imported to Open Shot Video Editor, trimmed, and exported as .mov files. Only a few of the files (coincidentally, the ones that are working fine and the ones that are not part of a loop) were generated by Blender. I figured they worked because they were outside of a loop, but maybe it’s because of the change in software. I will test adjusting the practice videos in Blender and see if that changes anything.
Quick update: I re-rendered the videos for the practice trials and edited the conditions file to match the new video file format.
Good news: I didn’t receive the same error message and the experiment started the practice trial loop.
Bad news: None of my videos are populating on the screen. I didn’t change anything about the initial “instructional videos”, but for some reason those are no longer appearing on the screen (though they used when the other videos caused an error message). I will check to see if this is a units/sizing issue, but I doubt it since the instructional videos are gone and I didn’t even touch those routines or video files. Additionally, some of my code components are now not skipping routines as they should have been, so my practice loop goes through every routine rather than conditionally skipping through the study.
Interesting. Let’s do some minimal testing. Make a new experiment that just presents a few videos, nothing else, and see if they render correctly. That will at least tell us that the videos work in principle. Then we can go piece-by-piece and figure out what happened to the rest of the experiment.
Hi Jonathan - I am running some tests now. So far, I have determined that Pavlovia can’t run .mov files, so that could have been my primary issue. When outside of a loop, it runs .mp4 files just fine (so I don’t know what was causing the issue last night, but I don’t have the same problem in this new file).
My next steps are to create a loop to see if the video files will still play. Then, if that works, I will try to add a code component and see how that goes.
(Edit: I will be working on this all day until I manage to get the study to work, so I should be able to respond right away if you have any ideas or input. I’m also keeping a word document with a more detailed description of each update to the study and will gladly share that when all is said and done)