Se vuoi guardare i video presenti su Rai Play offline, puoi scaricarli tramite uno script PowerShell e un azione manuale.

Da Firefox o qualsiasi altro browser, vai su Rai Play (devi loggarti), apri la developer tools tramite il tasto F12:
Developer toolbar filtrataDeveloper toolbar filtrata
seleziona il tab Network, filtra i risultati per index, cerca un file identificato come xhr e copia la url. Si tratta di un file di testo contenente le url di tutte le parti del video (se parte la pubblicità potresti avere un altro file index).
L'indirizzo sarà del tipo:
Text
https://2uscreativem3-vh.akamaihd.net/i/Italy/podcastcdn/Rai/rai4/Rai4_serie_GEOPROTETTO/10418036_,800,1800,.mp4.csmil/index_1_av.m3u8?null=0
il contenuto simile a questo:
Text
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-ALLOW-CACHE:YES
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:1
#EXTINF:10.000,
https://b2ushds2-vh.akamaihd.net/i/Italy/podcastcdn/Rai/rai4/Rai4_serie_GEOPROTETTO/10418122_,800,1800,.mp4.csmil/segment1_1_av.ts?null=0
#EXTINF:10.000,
https://b2ushds2-vh.akamaihd.net/i/Italy/podcastcdn/Rai/rai4/Rai4_serie_GEOPROTETTO/10418122_,800,1800,.mp4.csmil/segment2_1_av.ts?null=0
#EXTINF:10.000,
...
#EXTINF:7.000,
https://b2ushds2-vh.akamaihd.net/i/Italy/podcastcdn/Rai/rai4/Rai4_serie_GEOPROTETTO/10418122_,800,1800,.mp4.csmil/segment252_1_av.ts?null=0
#EXT-X-ENDLIST

A questo punto entra in gioco lo script PowerShell sgart-download-video.ps1:
PowerShell
# sgart-download-video.ps1
# Sgart.it
# download stream video in un file
# FileIndex: url con l'elenco stream video
# VideoName: nome del file video da salvare

param(
    [Parameter(Mandatory=$true)][string]$FileIndex,
    [Parameter(Mandatory=$true)][string]$VideoName
)

# process index
$contentIndex = Invoke-WebRequest -Uri $FileIndex
$lines = $contentIndex.ToString() -split "`n"

$files= @()
$lines | foreach{
    if($_ -like "https://*"){
        $files += $_
    }
}
$i=0
$m=$files.count

$dtStart = Get-Date

Write-Host "File da scaricare: $m" -ForegroundColor Green

# creo il file vuoto
New-Item $VideoName -Force

$files | foreach {
    $i++
    Write-Host "$i/$m" -ForegroundColor Green
    Write-Host "  $_" -ForegroundColor Gray
    $content = Invoke-WebRequest $_

    $OutFile = [System.IO.File]::Open($VideoName, [System.IO.FileMode]::Append)
    
    $InFile =$content.RawContentStream
    $InFile.CopyTo($OutFile)
    $InFile.Dispose()
    
    $OutFile.dispose()
}
$delta = (Get-Date) - $dtStart
Write-Host "Tempo totale di download: $delta" -ForegroundColor Yellow
richiede due parametri abbligatori, la url con l'indice e il nome con cui salvare il video:
PowerShell: .ps1
.\sgart-download-video.ps1 "https://2uscreativem3-vh.akamaihd.net/i/Italy/podcastcdn/Rai/rai4/Rai4_serie_GEOPROTETTO/10418036_,800,1800,.mp4.csmil/index_1_av.m3u8?null=0" "video-s02-e03.mp4"
I parametri, sopratutto la url, vanno racchiusi in doppie virgolette
una volta eseguito otterrai un output simile a questo:
Text
File da scaricare: 243

1/252
  https://b2ushds2-vh.akamaihd.net/i/Italy/podcastcdn/Rai/rai4/Rai4_serie_GEOPROTETTO/10418122_,800,1800,.mp4.
csmil/segment1_1_av.ts?null=0
...
243/243
  https://2uscreativem3-vh.akamaihd.net/i/Italy/podcastcdn/Rai/rai4/Rai4_serie_GEOPROTETTO/10418036_,800,1800,
.mp4.csmil/segment243_1_av.ts?null=0
Tempo totale di download: 00:03:28.9788171
Il file verrà salvato nella cartella locale in fomato nativo.

Volendo, tramite VLC, è possibile salvare il video e convertirlo in formato compresso.
Da VLC seleziona il menu Media \ Open Network Stream..., incolla la url e seleziona Play \ Convert:
VLC Open StreamVLC Open Stream
nella schermata successiva, verifica che il profilo sia Video - H.264 + MP2 (MP4), imposta il nome del file da salvare (Destination file) e premi Start:
VLC ConvertVLC Convert
attendi il completamento del download e relativa compressione:
VLC progressVLC progress
Potrebbe interessarti anche: