jason
New Member
Posts: 4
|
Post by jason on Aug 8, 2023 9:18:50 GMT
I've seen a few posts about using videos in experiments, but haven't been able to find a solution through searching the board to this particular problem. A couple of my students' projects are using videos embedded in psytoolkit experiments. They've both created public Google Drive links in the format specified here: www.psytoolkit.org/lessons/video.html For both students, I can run their experiments successfully on my side sometimes. However, there's two issues that come up on other times. The errors do not seem to be due to the code, since the experiments have run through to completion in tests. They just don't run properly consistently. (1) Sometimes the loading screen freezes part way through (e.g., getting stuck at 86% and not progressing further). When I check the browser console, there's 403-related error, so I suspect that access to the link is for some reason being blocked by Google. Hopefully there's some solution to this? (2) Sometimes, when the videos all load and the experiment begins, they will stop being shown after some number of trials. That is, after a few successful trials (video -> response), later trials will not show the video and instead finish with just the response prompt. My hunch is that the browser may be clearing the cache of loaded videos, but that's just my best guess. If anyone has any solutions or ideas, that would be very helpful.
|
|
|
Post by nigeinwales on Aug 21, 2023 17:03:48 GMT
Hi Jason I also have issues with video playback. I am quite certain that when I originally tested this a few months ago that it worked fine. But now it is not working at all. I just get a video player screen with no option to play. I have tested the link independent of PTK and it works just fine. I have tested & failed using Chrome and Edge. I have tested & failed using Google Drive and Dropbox. I have tested & failed with a 136mb file I have tested & failed with a 1.6mb file I have tested & failed using my own script l: blue_5 t: info o: video_width 800 o: no_video_replay o: mintime 30s hide v: drive.google.com/drive/folders/1g_3AhM8ULNlcmRyqwJ4H5zPhxfVEsFJoq: The CONTINUE button will be enabled at the end of the video. I have also tested & failed using a PTK test script and my vid l: newquestion1 t: radio v: www.dropbox.com/scl/fi/u0gs8l3k7al75jakgnyac/WIN_20230613_09_18_49_Pro.mp4?rlkey=g2ydfo8w1n4kdk0vj8c6txvd9&dl=0q: Do you like this video clip? - Yes - No The only test which completes so far is the PTK script with its own vid link: www.w3schools.com/html/mov_bbb.mp4The only difference I can see is that the PTK url hits a file with an mp4 suffix. I have ask PTK Support for help, but nothing back as yet. Any help would be amazing folks.
|
|
|
Post by nigeinwales on Aug 21, 2023 17:15:15 GMT
BTW im reluctant to use youtube because participants are still able to control the playback.
|
|
jason
New Member
Posts: 4
|
Post by jason on Aug 23, 2023 10:44:03 GMT
Thanks very much for your reply. I may be speaking too soon, but embedding videos into surveys using Google Drive has been working recently for one of my students, so there may be hope for you. Looking at the Google Drive link you're giving Psytoolkit, I noticed that the link you're using is to the folder of videos rather than to a specific video. I've tried testing out your code using a link to a single video, using the format that Psytoolkit seems to need for the URL (https://drive.google.com/file/d/1zckNOJb-LTbrbFluotg0QIt99IA49uVx/view?usp=sharing). Unfortunately, the video didn't load in my test, but I can watch the video if I paste the URL into my browser address bar. That suggests to me that the sharing link permissions are set correctly on the video (fully public), so I am not sure why it would not be loading. Besides double-checking the link permissions, there is not much else I can think to suggest I'm afraid.
|
|
|
Post by nigeinwales on Aug 26, 2023 11:32:56 GMT
Hi Jason
Thanks for looking, I wasn't expecting that, but glad to know it's not just me. Most frustrating isn't it? I would be interested to know if your student's Google Drive file is still working. The reason is that mine also worked a couple of months back, but no longer. So I'm wondering if there has been a security update on the streaming drives that is now blocking things when accessed through PTK and the PTK app code needs refining.
If your students file is still working are you able to share their url for comparison?
|
|
|
Post by nigeinwales on Aug 26, 2023 11:40:50 GMT
jasonwith regards to your issues: I think I read somewhere that the streamed video is buffered locally and therefore local resources may interfere with the replay. Worth investigating. I think the post i read was quite old and may be no longer valid.
|
|
jason
New Member
Posts: 4
|
Post by jason on Sept 1, 2023 11:27:45 GMT
The last time I had tried out my students study was on the 23rd of August and it was working smoothly then. I've just run a test with one link now and it's worked again today, so for some reason the embedding works for some links but not others. There's a few differences between the videos I notice (file formats - .webm vs .mp4, sharing link settings - can edit vs. can view) but it looks like the more important one may be the length/size of the videos. My student's video is only 10-20s (3MB), whereas yours is about 5m (139MB). When I trimmed down your video to only 15s (22MB) it loaded into my test survey using a Google Drive link, whereas it wouldn't using the same process for the original video.
So, I wonder if there may be file-size limitations somewhere along the way? If you test with a shorter video and it works, your study could work with the same videos broken up into multiple segments.
|
|