michelderooij / Get-EventSession

Script to assist in downloading Microsoft event contents or return session information.
MIT License
69 stars 29 forks source link

error in 3.19 while downloading #2

Closed gnerd closed 4 years ago

gnerd commented 4 years ago

using simple command: get-eventsession.ps1 -Downloadfolder c:\temp\ignite\videos -Format 22

I get the following errors:

Get-BackgroundDownloadJobs : Problem downloading c:\temp\ignite\videos\BRK012 - The web- Where the rubber hits the road on security, manageability, and productivity.mp4: At C:\temp\ignite\Get-EventSession.ps1:455 char:23

Remove-Job : The command cannot remove the job because it does not exist or because it is a child job. Child jobs can be removed only by removing the parent job. At C:\temp\ignite\Get-EventSession.ps1:427 char:59

gnerd commented 4 years ago

3.22 - running as admin shell - not sure what the write-error would be.

Get-BackgroundDownloadJobs : Problem downloading C:\temp\ignite\videos\ADP20 - Unlocking success in digital transformations- Getting employees to (really) adopt new technology.mp4: At C:\temp\ignite\Get-EventSession.ps1:480 char:23

Atreidae commented 4 years ago

I was seeing the same issue in 3.22 Seems to be fixed in 3.25 with the new version of Youtube DL and the perferdirect switch set

Atreidae commented 4 years ago

Okay, I think I've found a way to replicate the issue reliably.

It looks like its something to do with certain video streams. To replicate, try downloading the following .\Get-EventSession.ps1 -PreferDirect -Speaker "Josh Blalock" -Format "bestvideo+bestaudio"

This will fail with a write error. However, when removing the format flag and letting it download worstvideo the download will complete.

gnerd commented 4 years ago

Yeah, I found the same - i just left off the format and it works fine. Also, I had added a trailing slash to my path, that caused an error as well. Knowing these two things, I've been able to grab everything - thanks a ton for this script :)

michelderooij commented 4 years ago

Specifying format can be challenge and source-related. Format '22' works for YouTube, not for Azure Media Services. Also, you can use filters which do need to match an entry, and you use more to indicate preference. For example, I use: 'bestvideo[height=540][filesize<384MB]+bestaudio,bestvideo[height=720][filesize<512MB],bestvideo[height=360]+bestaudio,bestvideo+bestaudio' So, first it looks for 540p videos with filesize < 384MB. When not found, 720p is selected & less than 512MB. A final match is tried on 360p, and when all this fails (usually there's a 1080p in there or the size was surpassed earlier) it gets bestvideo+bestaudio. Why? To try to manage the size occupied by these videos while keeping the presented slides readable.