1

I have a problem. I put some avi files on Google Drive, and then get the encoded url by API https://docs.google.com/get_video_info. For example:

https://docs.google.com/get_video_info?authuser=&docid=0B38HRoqwzjhaaGhxY05EVGtseEk&access_token=ya29.CjBIA-lF_6wfVDrsQogxgBvgIzE7eeojipyCfLAY8vPFpevXqE1pSAOF3gK1tFAUaFc

Then I get an url for encoded mp4 video file from the previous response, like:

https://r5---sn-un57en7e.c.docs.google.com/videoplayback?requiressl=yes&id=a63c37855c89aa75&itag=18&source=webdrive&ttl=transient&app=explorer&ip=211.72.69.111&ipbits=0&expire=1471969935&cp=QVJMU0pfWFlRRlhNOkJ0YmtFem5ONGd0&sparams=requiressl,id,itag,source,ttl,ip,ipbits,expire,cp&signature=1015317AD77B0A23C3D8C216D83C0D0BE6B96725.9D5ED9740E885B0FCACBDBF19257DB4030DC1432&key=ck2&mm=30&mn=sn-un57en7e&ms=nxu&mt=1471954897&mv=u&nh=IgpwcjAxLnRzYTAxKgkxMjcuMC4wLjE&pl=24&sc=yes

Paste this url into vlc or firefox, none of them can play it. Firefox will tell me "403 Forbidden". Actually, I use this way to play mp4 url always works until TODAY. I don't have any idea why this doesn't work now.Does anyone can give me some hints?

Mr.Rebot
  • 6,703
  • 2
  • 16
  • 91
Aslan.L
  • 31
  • 5
  • Have you tried using chrome where your gmail account is currently logged in? It may be that your gmail account is required to access your mp4 video url. See this SO [post](http://stackoverflow.com/questions/18479155/google-drive-video-streaming) for more information. Hope it helps! – Mr.Rebot Aug 24 '16 at 15:57
  • Thanks. I tried to play that url under Firefox and Chrome's private mode, and not work. For the post which you provided, it mainly discusses streaming video form "a public video". But in my case, I have the access token of the file owner, but that file isn't opened for everyone. But thanks for your information. – Aslan.L Aug 25 '16 at 01:35
  • still actual at the end of 2018 with one difference: it works when using chrome, but getting 403 when using Firefox. – Desktop Dec 28 '18 at 15:51

1 Answers1

1

you need to set the DRIVE_STREAM cookie

  • Does it expire or does it is valid until the session is open? Is there any way to get a DRIVE_STREAM through an api key? – Mssjim Dec 01 '21 at 03:16
  • afaik its undocumented, last time I looked into it. Cytu.be (https://github.com/calzoneman/sync) has a plugin for streaming google drive with a tampermonkey extension, which grabs the stream(s). At the time I was attempting to write a web page to login in and view media without users being able to download the media unlike on google drive previews, but it seems the only way to do so is with a client app to do the streaming. CORS ended up being the issue. – Chris Gordon Dec 02 '21 at 13:53
  • It does expire, and I think its valid throughout the session however I do not remember if its unique to the media or just the session. – Chris Gordon Dec 02 '21 at 13:56