You are on page 1of 9

Google Drive ‐ Video Streaming Ask Question

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

Create a free Team

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.

5 Answers Active Oldest Votes


Accept all cookies

Customize settings
19

OK, I've just managed to get this working as follows ‐

In google drive I placed the video file in a publicly shared folder then
rightclick the file and select share > share..

Google then gives me a link to share that looks like

https://docs.google.com/file/d/0B4BsAbG4atWHQzVfLUU3UnhhZTA/edit?usp=sharing

I've cut what I guessed to be the file ID from the URL ‐

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

Now I've got a video working with the following html.

<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> 

A lot of people seem to be suggesting creating an API app in order to get


the file ID, but it looks like you can guess it pretty easy. That said, I'd be
interested to see some proper documentation from google on it ‐ I want to
use this in production, but feel like I need to do more reading to be
confident.

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.

Share Follow edited Jan 3 '14 at 17:52

answered Sep 26 '13 at 14:44


Aidan Ewen
12k 8 60 81

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

Use the URL like this:

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...

Share Follow edited May 9 '16 at 8:34


answered May 8 '16 at 20:36
seq
187 2 5

@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>

Share Follow answered Sep 12 '19 at 15:49


user2233706
3,739 3 27 52

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

Share Follow edited Aug 28 '13 at 10:33

answered Aug 28 '13 at 4:26


Samuel Neff
68.7k 16 126 171

2 We can access the video like this in HTML5‐ <source


src="drive.google.com/uc?export=download&id=<file‐id>"
type='video/webm' /> . The file‐id is available from Google Drive when we click
on share video. The file should be shared in order to access the stream.
–  metal7 Aug 28 '13 at 4:55

@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

Also I was able to rerieve a link like r5‐‐‐sn‐a5meknel.c.docs.google.com/… but


when I try to open it in another browser I get a 403 error, any ideas?
– bluejayke Mar 27 '19 at 10:42

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> 

This method is explained further over on: http://sourcey.com/html5‐video‐


streaming‐from‐google‐drive/

Share Follow answered May 4 '14 at 14:51


Kamo
222 2 4

1 I don't think this method is working anymore unfortunately. On their webpage


you linked to, the video doesn't play. And when I test with my own video, its
not working for me in chrome. – bmiskie Feb 12 '18 at 21:37

Any solution to this? – SeaBass Oct 23 '18 at 19:15

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.

The Overflow Blog

Podcast 377: You don’t need a math PhD


to play Dwarf Fortress, just to code it

GitLab launches Collective on Stack


Overflow

Featured on Meta

Unpinning the accepted answer from the


top of the list of answers

Outdated Answers: We’re adding an


answer view tracking pixel

Looking for a job?


Remote Senior Software Developer
O'Reilly Auto Parts No office location
$55K ‐ $100K REMOTE

javascript java
javascript java

Remote Full Stack Developer


Nelnet No office location
$95K ‐ $125K REMOTE

node.js postgresql

Software Engineer ﴾Frontend﴿ ‐


Connectly.ai
Unusual Ventures No office location
$140K ‐ $200K REMOTE

reactjs javascript

Software Engineer
C2FO Leawood, KS
$85K ‐ $120K REMOTE

reactjs node.js

Senior Full Stack Engineer ‐


JavaScript Pro ‐ Remote
Koji No office location
$110K ‐ $200K REMOTE

javascript reactjs

Senior Software Engineer


JPMorgan Chase Bank, N.A.
Columbus, OH
java design

Be one of the first applicants

Senior Software Engineer ﴾Go﴿


BlueLabs No office location
€70K ‐ €100K REMOTE

go distributed‐system

100% Remote | Senior React, React


Native, or Node Developer | Forever
Remote
G2i Inc No office location
$70K ‐ $150K REMOTE

reactjs javascript

View more jobs on Stack Overflow

Linked
6 Get Google Drive video stream in json

1 Google Drive Video Embedding in <video>


not iframe

1 Stream Encrypted Media Google Drive


1 Google Drive video iframe embed autostart
and time

1 403 Forbidden when playing Google Drive


mp4 url

0 how Google drive playback video stream


can play anywhere

Related
293 Streaming video from Android camera to
server

27 Video Streaming and Android

107 TCP vs UDP on video stream

6 PHP Streaming video handler

4 kivy video streaming

5 Google Drive as a video hosting/streaming


platform?

49 Streaming live camera video from iOS


﴾iPhone/iPad﴿ to remote PC / server

106 Streaming a video file to an html5 video


player with Node.js so that the video
controls continue to work?

0 Video Streaming Protocols Comparison

1 Google Drive Video Embedding in <video>


not iframe

Hot Network Questions


Tubeless Ready Tyres + Rim Strips?

how does android emulator emulate the RAM?

Do I have to apply more force than gravity to lift


my leg above the ground?

Math behind applying elastic net penalties to


logistic regression

Usage of minipage in a single column of a two


column document

What is the opposite of deus ex machina?

Agriculture on an exoplanet

How batteries create voltage?

Chipped material in all electrical boxes a cause for


concern?

Is the new Texas law on social media invalid on


first amendment grounds?

The difference between "echo" and "export" an


The difference between "echo" and "export" an
environment variable?

How can one know where two diagonal lines


meet?

Enduring Angel ‐ when does the "you lose the


game" part apply?

Why is the 777 fuel burn rate graph U shaped and


skewed to the left?

What is a Risk, and how does it differ/relate to an


Opportunity?

Can an ethernet cable look OK to a cheap cable


tester but still have a problem?

How to politely indicate that you only speak


English and would like to continue in it?

Is there an equivalent of ~ from Unix systems in


Windows cmd.exe?

Types of metrics used in QA management

What is a secure and user‐friendly way to provide


only a few users access to web app on Amazon
EC2?

How is AFC Richmond playing against Man City


again if they were relegated?

When under pressure from the industry, how can I


protect myself/coauthors?

Why does my ISO 1600 picture have a grainy


background?

Co‐author keeps rewriting the article in bad


English

Question feed

STACK OVERFLOW PRODUCTS COMPANY STACK EXCHANGE


NETWORK
Questions Teams About
Technology
Jobs Talent Press
Life / Arts
Developer Jobs Directory Advertising Work Here
Culture / Recreation
Salary Calculator Enterprise Legal
Science
Help Privacy Policy
Other
Mobile Terms of Service
Disable Responsiveness Contact Us
Cookie Settings
Cookie Policy

Blog Facebook Twitter LinkedIn Instagram


site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by‐sa. rev 2021.9.23.40291

You might also like