Professional Documents
Culture Documents
Products
Asked 8 years ago Active 2 years ago Viewed 61k times Log in Sign up
Home
PUBLIC
Questions
14
Tags
Users
COLLECTIVES 8
Explore Collectives
How does Google Drive video streaming work ? Internally how does it
FIND A JOB
stream the video, does it use HTTP based streaming or other protocols? I am
Jobs very new to this, and I was wondering if Google Drive could be used as a
demo server to just get a stream of video and display on the webpage. If
Companies
anyone could give me information about this, it would be very helpful.
TEAMS
video video‐streaming google‐drive‐api
Stack Overflow for
Teams – Collaborate
and share knowledge Share Follow asked Aug 28 '13 at 3:55
with a private group. metal7
255 1 3 9
Add a comment
What is Teams?
Your privacy
By clicking “Accept all cookies”, you agree Stack Exchange can Report this ad
store cookies on your device and disclose information in
accordance with our Cookie Policy.
Customize settings
19
In google drive I placed the video file in a publicly shared folder then
rightclick the file and select share > share..
https://docs.google.com/file/d/0B4BsAbG4atWHQzVfLUU3UnhhZTA/edit?usp=sharing
0B4BsAbG4atWHQzVfLUU3UnhhZTA
And added it to metal7's url to create a src attribute for a source tag
<source src="https://drive.google.com/uc?export=download&id=0B4BsAbG4atWHQzVfL
<html>
<head>
<title>Video Test</title>
</head>
<body>
<video controls="controls">
<source src="https://drive.google.com/uc?export=download&id=0B4BsAbG4a
</video>
</body>
</html>
UPDATE
I've done a bit more reading and I'm afraid the video will only play on
browsers that are logged into a google account. I spent a lot of time trying
to get around this ﴾inc building a google drive app with the api﴿, I'm afraid it
looks like there's no way round it.
Don't use google drive to serve up video in html unless you know all your
users will be authenticated with google.
As of Aug. 2014, I can stream video ﴾mp4 or webm﴿ from GDrive to many
devices ﴾Nexus7, MacBook Air, iPad Air, Windows PC﴿ using any modern
browser ﴾Chrome, Firefox, Safari﴿ without being logged into a Google account. I
play the videos in an HTML5 video element. – devdanke Aug 11 '14 at 8:38
@devdanke How can you do that? Can you give some snip code? – Han Tran
Oct 23 '14 at 2:14
1 @devdanke You can do it by just replace your video file id in last of this url
given below; drive.google.com/uc?export=download&id=<file‐id>
– Saeed Afzal Mar 6 '15 at 1:55
1 Well, if the video file is bigger than the virus scan limit ﴾~25MB﴿ a warning
about the file not being scanned therefore may contain virus will be returned
instead of the correct video file. This prevents the browser from playing
correctly. – Johnson Steward Aug 3 '17 at 6:59
Add a comment
https://googledrive.com/host/{YOUR_VIDEO_ID}
e.g. https://googledrive.com/host/01bLAblaBla01BlaBLaBlaBLaBLA
It's works with HTML5 ﴾video tag﴿ and other like videojs, and more...
@seq ‐ this with audio tag doesn't work for me can you please take a look at
my question here : stackoverflow.com/questions/41904057/… thanks
– Kukula Mula Jan 27 '17 at 22:32
@KukulaMula Did you find a solution to this? – SeaBass Oct 23 '18 at 19:16
Probably Google disabled this opportunity. I had to buy web hosting service. It
was almost two years ago. – seq Oct 24 '18 at 20:25
Add a comment
None of the these solutions work anymore. This works. The viewer does not
need to be logged into their Google account to view the video.
1. Get the shareable link to your video by clicking on the video in your
Google drive, and click on that paper clip‐like icon in the top link
2. Turn link sharing on
3. Open the link
4. In the video, click on the three dots icon on the upper right, and then
click on 'Embed item'. You'll then have the code you can put into your
HTML. It'll look something like this:
<iframe src="https://drive.google.com/file/d/<video id>/preview"
width="640" height="480"></iframe>
Add a comment
1
Internally when viewed in Google Drive's web page viewer, Google Drive
streams videos over HTTPS/443. There is only one connection made for the
video itself and that connection is kept open as long as the video is being
streamed from Google Drive to the client.
Google Drive uses an HTTP CONNECT call. Headers look like this:
CONNECT r3‐‐‐sn‐p5qlsu68.c.docs.google.com:443 HTTP/1.1
Host: r3‐‐‐sn‐p5qlsu68.c.docs.google.com
Proxy‐Connection: keep‐alive
User‐Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, lik
@metal7 hi do you know a way to get this to work if the file is "too big for a
virus scan"? – bluejayke Jan 14 '19 at 5:34
Add a comment
I did some tests myself, and the video is streamable ﴾over HTTP﴿ to public
clients so long as the file is shared publicly on Google Drive.
The get the file to play using regular HTTP streaming, you can use the
HTML5 video tag like so:
<video controls="controls">
<!‐‐ Safari ‐‐>
<source src="https://drive.google.com/uc?export=download&id=0B0JMGMGgxp9WM
<!‐‐ Chrome and FF ‐‐>
<source src="https://drive.google.com/uc?export=download&id=0B0JMGMGgxp9WM
</video>
Add a comment
Highly active question. Earn 10 reputation ﴾not counting the association bonus﴿
in order to answer this question. The reputation requirement helps protect this
question from spam and non‐answer activity.
Not the answer you're looking for? Browse other questions tagged
video video‐streaming google‐drive‐api or ask your own question.
Featured on Meta
javascript java
javascript java
node.js postgresql
reactjs javascript
Software Engineer
C2FO Leawood, KS
$85K ‐ $120K REMOTE
reactjs node.js
javascript reactjs
go distributed‐system
reactjs javascript
Linked
6 Get Google Drive video stream in json
Related
293 Streaming video from Android camera to
server
Agriculture on an exoplanet
Question feed