Add support for video (media) from Google Drive

This is a great program, thank guys!

I treid use IV with Youtube, it work great.  But when I use the video stored from Google Drive, it shown "unknow".  

The example file is: https://drive.google.com/a/im.wfu.edu.tw/file/d/0Bxxbqlhir9eNMGY1YnU1X2Z...

When I put the about link on Iframe Embedder, it works.  But I won't have the interactive editing function.

So, hopeful someone can help to include the source from Google's Gdrive or direct me the spec. to modified.

Thanks.

timothylim23's picture

Hi, it should be possible. Could you make the video 'downloadable' on Google Drive and post the URL here again?

Thanks

 

the link has been set to downloadable already.  Just take out the /preview in the end.  The browsing page will have a download link.

https://drive.google.com/file/d/0Bxxbqlhir9eNMGY1YnU1X2ZPcms

Thanks

 

timothylim23's picture

Hi, I've managed to add interactive functionality using a Google Drive video. You can see it here: https://h5p.org/node/30299

I did it by following the tutorial shown in the description. I wouldn't recommend using Google Drive as a platform for streaming (Google doesn't really support it either as they start to limit access to a video after a certain number of views has been reached). For a longer term solution, I would say you're better off using Youtube. 

DELETE

Sorry, maybe I didn't make it clear, I was using in Moodle.  But when I try your link: It still said "unknow".  I also tried only use the https:.... URL but still no success.  Please provide more instruction.  Thanks.

<video controls="controls"> <source src="https://drive.google.com/uc?export=download&id=0B0JMGMGgxp9WMEdWb1hyQUhlOWs" type='video/mp4'/> </video>
timothylim23's picture

Unfortunately serving videos from Google Drive goes beyond the scope of interactive video. I don't think I will be able to help beyond sending the tutorial as interactive video was only intended for streaming videos from youtube and those saved locally. If you have a developer on hand you can modify the source code for the interactive video editor:

https://github.com/h5p/h5p-editor-interactive-video/blob/master/Scripts/interactive-video-editor.js

Thank you for the direction of source code.  I will look into the code and see if I can make it work.
What is the particular API from Google I should look for.  I did use the video from Google drive as embedded straming playing in Moodle's web page as content soruce.  The link is just as my first post URL with <inframe> tag.

Thank you again.

Since Google Drive streams, shouldn't it be possible to add this feature?  (This is the feature request forum, right?) 

I was able to get a Google Drive hosted video to be used in the IV editor (on Moodle, too).  However, when it was saved and viewed in a different browser, the "Video Format Not Supported" message appeared.

https://h5p.org/node/64697

I got a link to the video by opening the inspection/developer console in Chrome, navigating to Network and Media.  I then started the video for the first time and copied the link that appeared.  As per another post on the H5P forums, I added #.mp4 to the end of the link.

https://r4---sn-vgqsrn7l.c.drive.google.com/videoplayback?id=c750fe3f4d8...

 

Everything worked find in the editor, but after saving and testing on a separate browser (to avoid any cookies/caches), I receive the error message.

 

tomaj's picture

Have you set the video to be shared openly on the internet?

- Tom

Yes it is.  

https://drive.google.com/file/d/0BwEOaJzZEjWHYnA1el9YbzRyX0k/view?usp=sharing   (Sharing link)

https://drive.google.com/file/d/0BwEOaJzZEjWHYnA1el9YbzRyX0k/view   (Viewing Link)

<iframe src="https://drive.google.com/file/d/0BwEOaJzZEjWHYnA1el9YbzRyX0k/preview" width="640" height="480"></iframe>   (Embed code)

Currently, we have our videos on Google Drive and embedded into our Moodle lessons.  We much prefer to have them on Drive (school provided, unlimited space) than YouTube, so we hcan have total control over the videos.  Also, some videos we have permission from the creator to show to our students, but not to put publicly.  YouTube could "flag" them as violations, which we don't want to have to deal with.

 

tomaj's picture

All of the url's you provided are linking to players. You need to link directly to the video file for this to work.

I found this site that gives the following url for your file: https://drive.google.com/uc?export=download&id=0BwEOaJzZEjWHYnA1el9YbzRyX0k

It didn't worksince Interactive Video is using the filename (in the url) to decide the file type. So I hacked it a little bit, and added a &type=.mp4 at the end. And not it works for me. So try this url in IV:

https://drive.google.com/uc?export=download&id=0BwEOaJzZEjWHYnA1el9YbzRyX0k&type=.mp4

- Tom 

In this thread, someone found a similar way, with using #.mp4 at the end.

https://h5p.org/comment/reply/49840/11358

 

Here's the funny thing.  It appears that our Moodle plugin has been updated.  Now, none of the workarounds work in the editor.  The already existing interactive videos, however, DO work.  When I take the exact same ID of a working interactive video (with video stored on Google Drive) and try to make a new one with it, it errors out saying "Video Format Not Supported", not allowing me to add interactive content to it.  

Since the exact video still works with a previously made interactive H5P video, that tells me that it isn't a Google Drive issue, rather the new Moodle plugin.  I can even go in to the previously made interactive video and edit the items in it.  I just can't create a new one using the exact same process.