Trouble with Media Player mpy
I'm working on an experiment with video stimuli and having two strange issues with the Media Player mpy.
1) Dropping frames. My clips are a couple seconds long, but frames are being dropped.
-I've tried a variety of different file formats but the same thing is happening regardless. I've tried .mov (which I read isn't handled well), .avi and .flv.
-The clips are SD.
-I've tried playing around with the duration setting but that doesn't accomplish anything either.
2) These short clips were taken from a longer video. They play totally fine in QuickTime, but when showing in OpenSesame, they start a second or two before the clip was actually cut. In other words, they are showing video from the longer file that was cut out for the smaller clip. Along with the frame dropping, some of the clips are displaying completely differently in OpenSesame than what shows when just playing the clip through QuickTime. I have no earthly idea what could possibly be happening here.
Thanks for any help.
Comments
Hi Grace (cc @Daniel),
What operating system, version of OpenSesame, and backend are you using?
This sounds like a performance issue. The
media_player_mpyis not terribly efficient, but it should be able to handle standard-definition video on a reasonably modern system. Have you tried different backends?Obviously, OpenSesame cannot possibly play video that is not actually present in the video file. Therefore, it sounds like the videos are not actually cut, but that perhaps some marker is set to indicate the start and end of the video. I would try a different way to cut a segment from the video.
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Thanks for the reply Sebastiaan.
The good news is I think I have figured out what's happening. The bad news is I have no idea how to fix it.
I don't think the issue is actually with the media_player_mpy at all. I don't think it's even frame dropping. The videos were cut with QuickTime and you're right, there does seem to be some sort of marker on the cut video itself about a second after the real beginning of the clip. I tried converting the videos with Any Video Converter and when played within the program, it starts the video about a second before the portion of the QuickTime clip. OpenSesame seems to be starting playback from the beginning of the video, running into the QuickTime marker and then stopping there, so not actually dropping frames per se. The videos play fine in QuickTime because QuickTime recognizes its own marker.
So... I'm not sure what to do about it, but at least if someone runs into the same problem and finds this thread, they'll know it's not actually the fault of OpenSesame or the media_player_mpy.
Ok, that's good to know. Why don't you simply try a different video editor then? I personally use OpenShot for my video editing. It has some quirks, but it's free and crossplatform:
Check out SigmundAI.eu for our OpenSesame AI assistant!
Thanks for the suggestion. I wanted to avoid using a video editor because 1) I didn't want to reclip all the files since the original videos are really long and 2) I have been clipping them via ELAN, an annotation software, (it had a script that went through QuickTime). I did test with OpenShot and that worked, so maybe in the future.
Final update for reference: I'm editing the short clips in iMovie and exporting them to .mp4 files. Everything is going smoothly now.