Skip to content

Sharepoint.com #380

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
safresh0999 opened this issue May 10, 2021 · 37 comments · May be fixed by #412
Open

Sharepoint.com #380

safresh0999 opened this issue May 10, 2021 · 37 comments · May be fixed by #412

Comments

@safresh0999
Copy link

safresh0999 commented May 10, 2021

First of all, thank you for the work you have done.

Is there any hope that the project will be updated, allowing downloads from sharepoint.com? (some professors do not allow download of videos...)

@carlosmendes-7
Copy link

This subject has been addressed in issue #275

@palmerj
Copy link

palmerj commented May 25, 2021

Note that in the last few weeks I've noticed a change where you can't even download the videos from sharepoint. Looks like only the organiser can.

Q1 of 2021, only the meeting recorder and organizer will be able to download the meeting recording. All other attendees will only be able to view it.

https://support.microsoft.com/en-us/office/play-and-share-a-meeting-recording-in-teams-7d7e5dc5-9ae4-4b94-8589-27496037e8fa#bkmk_downloadmeetingrecording

@q7z
Copy link

q7z commented May 28, 2021

Bumping the last comment by @palmerj

@GeeWee
Copy link

GeeWee commented Jul 7, 2021

Can confirm that destreamer no longer works for meeting recordings as they are shared in Sharepoint now.

@Valeri0p
Copy link

Valeri0p commented Jul 11, 2021

As mentioned in #275 someone has developed a new tool, but in the meantime we've been using a workaround to open the video files directly:

  • Go to the "Files" section of your teams channel;
  • Open the "Recordings" folder;
  • Right click on the video file and select copy link;
  • You should get a direct link to the .mp4 file, you can view it in your browser or download it, no restrictions.

The link structure should be something like this: https://[ORGANIZATION].sharepoint.com/sites/[FOLDER NAME, USUALLY THE NAME OF THE TEAM GROUP OR SUBJECT]/Shared%20Documents/General/Recordings/[FILENAME OF THE RECORDING WITH %20 INSTEAD OF SPACES (or other ascii to utf-8 codes)].mp4

If you only have a link to the sharepoint player you can try to recover the direct link to the mp4 file by using some website like https://www.url-encode-decode.com/ to remove the utf-8 to ascii encoding and then editing the url to look like the example above. (no need to convert it back when opening the new url btw).

Scusate per la grammatica ma l'ho scritto un po di fretta 😅

@snobu
Copy link
Owner

snobu commented Jul 11, 2021

Looks like this shouldn't take too much effort to implement into destreamer. Will take a look. Thanks for your writeup, appreciate the effort.

@Valeri0p
Copy link

Valeri0p commented Jul 13, 2021

You are welcome 😊 ("writeup", è giusto la descrizione di un url 😅)
Just so you know, "General" was the name of the channel, and the folder "Recordings" might not have the same name for everyone.

Honestly I don't know how universal this method is, maybe it only works in my organization because of some oversight when setting up the privileges.
I haven't looked at their code, but I assume @kylon 's software might be more robust and harder to patch for Microsoft seeing the presence of FFmpeg to obtain the video stream (I guess).

@wad11656
Copy link

wad11656 commented Jul 13, 2021

As mentioned in #275 someone has developed a new tool, but in the meantime we've been using a workaround to open the video files directly:

  • Go to the "Files" section of your teams channel;
  • Open the "Recordings" folder;
  • Right click on the video file and select copy link;
  • You should get a direct link to the .mp4 file, you can view it in your browser or download it, no restrictions.

The link structure should be something like this: https://[ORGANIZATION].sharepoint.com/sites/[FOLDER NAME, USUALLY THE NAME OF THE TEAM GROUP OR SUBJECT]/Shared%20Documents/General/Recordings/[FILENAME OF THE RECORDING WITH %20 INSTEAD OF SPACES (or other ascii to utf-8 codes)].mp4

If you only have a link to the sharepoint player you can try to recover the direct link to the mp4 file by using some website like https://www.url-encode-decode.com/ to remove the utf-8 to ascii encoding and then editing the url to look like the example above. (no need to convert it back when opening the new url btw).

Scusate per la grammatica ma l'ho scritto un po di fretta 😅

After a bunch of fenagling I finally got a url that ends in .mp4 (https://companyName-my.sharepoint.com/:v:/r/personal/employeeName_companyName_com/Documents/Recordings/Company%20Meeting-20210712-Meeting%20Recording.mp4) but I get a "Sorry, you don't have access." I'm just trying to download our Team meeting recording :

image

@Valeri0p
Copy link

Valeri0p commented Jul 14, 2021

Yeah I saw links with the :v:sometimes in the link generated inside the chat, they don't contain the full path.
Again it probably depends on how the organization has set up its privileges.

When I get my url from Sharepoint or the Files section on Teams I get this: (after going trough https://www.url-encode-decode.com/)
https://[ORG].sharepoint.com/sites/[TEAM NAME]/Shared Documents/Forms/AllItems.aspx?id=/sites/[TEAM NAME]/Shared Documents/General/Recordings/[FILENAME].mp4&parent=/sites/[TEAM NAME]/Shared Documents/General/Recordings

That can be edited into this:
https://[ORG].sharepoint.com/sites/[TEAM NAME]/Shared Documents/General/Recordings/[FILENAME].mp4

[ORG] is already present int the url, [TEAM NAME] should be easy to recover, "General/Recordings/" might change as I said up there and [FILENAME] if not apparent int the url is obtainable by opening the details section of the Sharepoint player;
It's mostly custom but it look something like:
[Custom part by the organizer] [dd.mm.aa date]-[aaaammdd, basically ISO 8601-like date]_[hhmmss time]-Meeting Recording.mp4

...also by looking at that "other details" section there's a button that says "copy direct link" (it's in italian so idk the exact name 😅)

@MaschineBrennt
Copy link

It doesn't work with sharepoint

@lukaarma lukaarma linked a pull request Oct 14, 2021 that will close this issue
@tuchang
Copy link

tuchang commented Oct 15, 2021

Anyone checked pull request above? does it work? Should I take any extra steps?

@lukaarma
Copy link
Collaborator

@tuchang It's an alpha so it's a bit unstable and not well tested, but it should work. If you want to try it and give some feedback that would be really appreciated

@snobu Can we do a quick readme edit to let people know of the new branch? I need feedback if it's working or not

@DaniDiaz71
Copy link

Under OSX:

[FATAL ERROR] Aria2 is missing!
Destreamer requires a fairly recent release of Aria2 to download videos 

But aria2c is present:

% which aria2c
/opt/local/bin/aria2c

@marcosrgu2081
Copy link

Under OSX:

[FATAL ERROR] Aria2 is missing!
Destreamer requires a fairly recent release of Aria2 to download videos 

But aria2c is present:

% which aria2c
/opt/local/bin/aria2c

I've tried today installing it via homebrew (brew install aria2) and I skipped this error, but I still having some issues: It doesn't recognize the url or saying that I haven't access

@lukaarma
Copy link
Collaborator

@DaniDiaz71 Could you try to copy aria2 into Destreamer's folder and run it again please

@marcosrgu2081 What could you copy and paste the url and the error here? You made sure that you are using the correct branch?

@marcosrgu2081
Copy link

marcosrgu2081 commented Oct 20, 2021

@marcosrgu2081 What could you copy and paste the url and the error here? You made sure that you are using the correct branch?

Sorry, It was my fault (I was using the incorrect url)

@DaniDiaz71
Copy link

@DaniDiaz71 Could you try to copy aria2 into Destreamer's folder and run it again please

@marcosrgu2081 What could you copy and paste the url and the error here? You made sure that you are using the correct branch?

Did it, but same error.

@darderik
Copy link

darderik commented Oct 21, 2021

The issue related to invalid urls seems to be located in this regex check
Screenshot (22)_LI

I don't know if I got the regex right, but this is what I wrote in order to match correctly the url

(?<domain>https:\/\/.+\.sharepoint\.com).+?(?<basesite>\/sites\/.+?)(?:(?<filename>\/.*\.mp4)|\/.*id=(?<paramFilename>.*mp4)) (slightly different from the one used in next picture)

Screenshot (19)_LI

Unfortunately, this resulted in another error .
Screenshot (20)

@lukaarma
Copy link
Collaborator

lukaarma commented Oct 21, 2021

Unfortunately, this resulted in another error . Screenshot (20)

@darderik could you please run it again with the --verbose flag and post the output?

I see that your link includes the drive letter and i need to see what kind of request to the backend are being made

@lukaarma
Copy link
Collaborator

lukaarma commented Oct 21, 2021

@DaniDiaz71 Could you try to copy aria2 into Destreamer's folder and run it again please
@marcosrgu2081 What could you copy and paste the url and the error here? You made sure that you are using the correct branch?

Did it, but same error.

@DaniDiaz71
This may be an exit code collision that was fixed on another branch. I pushed an update to the Sharepoint branch, pull and build again please, that test again.
It's also true that we had issue with path in macos (see #146) that I now notice was never fixed..

Try to update the branch and let me know, if the error persist I'll dig deeper in this issue

@darderik
Copy link

darderik commented Oct 21, 2021

Unfortunately, this resulted in another error . Screenshot (20)

@darderik could you please run it again with the --verbose flag and post the output?

I see that your link includes the drive letter and i need to see what kind of request to the backend are being made

Of course, here it is.
I'd like to point out that i'm currently using the regular expression of my previous answer,due to the fact that these urls with the drive are getting marked as invalid from the previous regex.
Screenshot (23)_LI

Regex test
Screenshot (25)_LI

@lukaarma
Copy link
Collaborator

lukaarma commented Oct 21, 2021

I'd like to point out that i'm currently using the regular expression of my previous answer,due to the fact that these urls with the drive are getting marked as invalid from the previous regex.

You did the right thing! I suspect that since since your regex result includes the drive letter that is screwing with the rest of the logic, enche the undefined in the requested url.
Please try this regex (?<domain>https:\/\/.+\.sharepoint\.com).*?(?<baseSite>\/(?:teams|sites)\/.*?)(?:(?<filename>\/.*\.mp4)|\/.*id=(?<paramFilename>.*mp4)) and let me know if it works

@darderik
Copy link

I'd like to point out that i'm currently using the regular expression of my previous answer,due to the fact that these urls with the drive are getting marked as invalid from the previous regex.

You did the right thing! I suspect that since since your regex result includes the drive letter that is screwing with the rest of the logic, enche the undefined in the requested url. Please try this regex (?<domain>https:\/\/.+\.sharepoint\.com).*?(?<baseSite>\/(?:teams|sites)\/.*?)(?:(?<filename>\/.*\.mp4)|\/.*id=(?<paramFilename>.*mp4)) and let me know if it works

EDIT: ignore this I just saw the last regex you posted

Your regex works like a charm! I definitely screwed it up (ignore the error it's because i killed the process)
Screenshot (26)

P.s: Mamma mia sono proprio una sega con le regex

@lukaarma
Copy link
Collaborator

Nice, happy that it worked @darderik !
Don't beat yourself about regex, they can be complex! It took me years to properly learn them.

I pushed an updated version to the Sharepoint branch

@snobu
Copy link
Owner

snobu commented Oct 21, 2021

@lukaarma can you check one thing please.
With your new branch, when you get the API URL formed, dump the JSON output for the streams, you know the one that gives you the HLS and MPEG-DASH URLs. Check if you now have progressive download URL as well. Since SharePoint isn't Azure Media Services i'm hoping progressive download is exposed by default but not surfaced to the end users.

If that exists, we can dramatically simplify everything, as in drop both ffmpeg and aria.

@DaniDiaz71
Copy link

DaniDiaz71 commented Oct 25, 2021

@DaniDiaz71 Could you try to copy aria2 into Destreamer's folder and run it again please
@marcosrgu2081 What could you copy and paste the url and the error here? You made sure that you are using the correct branch?

Did it, but same error.

@DaniDiaz71 This may be an exit code collision that was fixed on another branch. I pushed an update to the Sharepoint branch, pull and build again please, that test again. It's also true that we had issue with path in macos (see #146) that I now notice was never fixed..

Try to update the branch and let me know, if the error persist I'll dig deeper in this issue

Doesn't work :(
I've downloaded last update, install&build, copy ffmpeg and aria2c to Destreamer's folder and update $PATH var. But destreamer does not find aria2c file. I had same problem with ffmpeg but solved it copy ffmpeg file to Destreamer's folder, I don't understand why this workaround doesn't work with aria2c.
The only difference between both files are 'which' command, because which ffmpeg show me the file at Destreamer's folder
while which aria2c show it at /opt/local/bin/
SOLVED!: Remove aria2c from /opt/local/bin/ now find it at /usr/local/bin/ and works.

Now i have other issue at validation phase:

Downloading SharePoint videos...
Launching headless Chrome to perform the OpenID Connect dance...
Navigating to login page...
Waiting for target!
We are logged in.
[FATAL ERROR] Could not evaluate sessionInfo on the page 

I guess i shoud open new issue..., it seems to be a timeout problem because Chrome close it when i'm writing password or second authentication factor.

@snqqyj
Copy link

snqqyj commented Oct 28, 2021

@lukaarma Thank you so much for your efforts for the SharePoint branch.

But in our company, now the url of the online video for meeting recording changed to something like below:
https://xxxxxx-my.sharepoint.com/%3Av%3A/g/personal/xxxxxx_xxxxxx_xxxxxx_com/EQ5y7SkmWbRDtzS0uE3Rd2sBjxHSkc_GkbzTx9PreCrXig

It seems that the latest SharePoint branch of DeStreamer couldn't support this kind of url. Hope someone could help update/enhance the SharePoint branch.

@darderik

This comment has been minimized.

@gionac
Copy link

gionac commented Oct 29, 2021

Hello everybody,
I'm using destreamer to download some videos from sharedpoint.
The wird thing is i can downlaod without problmes videos that were recorded until last week, but with the recordings of this week I'm receiving this error:

 [ERROR] Error: Request failed with status code 404
    at createError (C:\devepolpents\destreamer\node_modules\axios\lib\core\createError.js:16:15)
    at settle (C:\devepolpents\destreamer\node_modules\axios\lib\core\settle.js:17:12)
    at IncomingMessage.handleStreamEnd (C:\devepolpents\destreamer\node_modules\axios\lib\adapters\http.js:269:11)
    at IncomingMessage.emit (events.js:412:35)
    at endReadableNT (internal/streams/readable.js:1334:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)



[FATAL ERROR] Unhandled error!
Timeout or fatal error, please check your downloads directory and try again`
...

It seems that with the videos of this week destreamer is unable to find the .mp4 file in the page code...
Does anyone have any diea of why?

Thank you for your work!

@lukaarma
Copy link
Collaborator

lukaarma commented Oct 29, 2021

@lukaarma can you check one thing please. With your new branch, when you get the API URL formed, dump the JSON output for the streams,

@snobu I could not find something like that but I'll e-mail you a couple of json I got so that you could take a look. When I have more time I'll dig more into the api to see if I missed something.


it seems to be a timeout problem because Chrome close it when i'm writing password or second authentication factor.

@DaniDiaz71 Could you please make sure that you are on the latest version of the Sharepoint branch? There was an error during the login process that should have been fixed, if you are on the latest branch and you are still having trouble loggin in please open a separate issue.


But in our company, now the url of the online video for meeting recording changed to something like below: https://xxxxxx-my.sharepoint.com/%3Av%3A/g/personal/xxxxxx_xxxxxx_xxxxxx_com/EQ5y7SkmWbRDtzS0uE3Rd2sBjxHSkc_GkbzTx9PreCrXig

@snqqyj if you are comfortable enough to share the complete url with me via the e-mail you find on my profile it would be great and really help me. If you don't want could you at least tell me if it ends with '.mp4'


The wird thing is i can downlaod without problmes videos that were recorded until last week, but with the recordings of this week I'm receiving this error:

@gionac Was there any change in the url of the video between last week and this one? Could you please check.


@darderik I hid your comment because I created a dedicate issue, see #415

@tipicoenlauniFB
Copy link

tipicoenlauniFB commented Oct 29, 2021

I have the same problem. I can't download videos since this week.

@gionac
Copy link

gionac commented Oct 29, 2021

@gionac Was there any change in the url of the video between last week and this one? Could you please check.

@lukaarma I copy there the two links. The first (newer) doesn't work, instead the second works like charm..

[...]/L1%20-%20relativit%C3%A0%20e%20Locard%20-%20L2%20-%2020211026_152611-Meeting%20Recording.mp4?csf=1&web=1&e=XxMFGP

[...]/L0-lab-20211005_160042-Meeting%20Recording.mp4?csf=1&web=1&e=7E0Pk7

I omitted the first because it's identical

@lukaarma
Copy link
Collaborator

I omitted the first because it's identical

@gionac could you please open a new issue and provide me the full verbose output of your command (add -- verbose to your command)
I don't see anything special in your link so it may be something else

@gionac
Copy link

gionac commented Oct 30, 2021

I omitted the first because it's identical

@gionac could you please open a new issue and provide me the full verbose output of your command (add -- verbose to your command) I don't see anything special in your link so it may be something else

I did a new issue here, with the verbose output, here: #416

Thank you @lukaarma !

@martingercke
Copy link

I also had an issue with personal videos.
I needed to add "personal" to the list:
const shareUrlRegex = new RegExp(/(?https://.+.sharepoint.com).?(?/(?:teams|sites|personal)/.?)(?:(?/.*.mp4)|/.*id=(?.*mp4))/);

@muzso
Copy link

muzso commented Dec 18, 2021

I also had an issue with personal videos.
I needed to add "personal" to the list:
const shareUrlRegex = new RegExp(/(?https://.+.sharepoint.com).?(?/(?:teams|sites|personal)/.?)(?:(?/.*.mp4)|/.*id=(?.*mp4))/);

Same here. After adding "|personal" to the regex, download started to work (even for videos where I have no download permission). Thanks!

@WilliamWsyHK
Copy link

Thanks for @muzso advise, and I have created a PR base on this, as well to include a small fix on the file name with characters that requires encodeURIComponent-ed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.