Take a look at yt-dlp. Despite it's name, it can do a lot of web video and audio, not just YouTube.
Programming
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
So far, I've tried passing in my cookies and the website url but it states 403 error, i might be missing something (video requires sign in to watch)
you most likely need to pass a cookies file to authenticate How do i pass cookies to yt-dlp
If the video is actually encrypted (like a streaming service) there are a lot more steps to do to strip Widevine
Yea, seems like its playready by microsoft
What more steps do i need to do?
Seems to be drm like widevine. That's tricky, but not impossible to extract.
https://forum.videohelp.com/threads/407216-Decryption-The-Dungeon-of-Despair
https://cdm-project.com/explore/repos
These links may help.
Seems like its playready 4.0.0.0? According to the hex of one of the encrypted mp4
Thanks, I'll read through
The exact format depends on the source file format, the platform of the player, the duration of the clip, encryption, and whether it's copyrighted material or not. Also, if it's older software or fairly recent (the current schemes stand on the carcasses of a lot of old formats).
If the source is a single file, it's likely MP4 or WebM (or MOV on Apple and AVI on Windows). The video player can start downloading the whole thing in a background thread. When it has enough material buffered, it can start decoding and playback. However, if there is a network glitch, the video may start pausing and stuttering. This is typically how unprocessed video is served from a cloud file storage site.
Many sites use HLS or MPEG-DASH (or their superset CMAF) to send the video in adaptive chunks. The user-experience is much better and has better server utilization. The manifest files describe which chunks to get depending on current bandwidth. Players can then up or downscale their next request based on network conditions to avoid stuttering. Overloaded servers can also downthrottle the chunk formats on-the-fly.
Apple device native video players only support HLS/CMAF, and inside native appstore apps, files over 10 minutes must be HLS formatted. Non-Apple devices may use either format.
Then there's encryption. If a decryption key (often AES-128) is provided, the player can download it over https, then decrypt the stream on the fly. This is so anyone sniffing the stream only sees encrypted content.
If the material is copyrighted, it may have DRM. On Apple devices this is likely FairPlay. On Windows it could be PlayReady, and on Android and for some browsers, it could be Widevine. Then there's CENC, which use a common encryption format so the same stream can have PlayReady or Widevine.
Most browsers support HLS, since it's delivered over HTTP, it's adaptive, and tools like ffmpeg or handbrake can generate all the files and chunks one time, once a video file is uploaded. The chunks can be hosted anywhere HTTP is served.
This is all for one-way, one file, one viewer mode. If the video stream is meant to be two-way or multicast to lots of viewers, you'll want to head into the world of WebRTC, RTMP, and RTSP.
Hmm, the hex of one of the mp4s says microsoft playready version 4.0.0.0, how can i proceed?
Likely DRM content. Can't help you there.
If whqt you really want is to learn: https://forum.videohelp.com/threads/407216-Decryption-The-Dungeon-of-Despair
And dont need to say thank you, you will be saying fuck you in no time after trying to understund all of this shit
I use Video DownloadHelper and its companion app on Firefox.
Unfortunately, downloadhelper says that the download has failed, and it can't download the video. It can find it tho