Skip to content

Instantly share code, notes, and snippets.

@tosunkaya
Forked from EntranceJew/Get-TweetVid.ps1
Created September 2, 2023 19:06
Show Gist options
  • Save tosunkaya/ef93e16e43c2e27e416b447cf118ba3a to your computer and use it in GitHub Desktop.
Save tosunkaya/ef93e16e43c2e27e416b447cf118ba3a to your computer and use it in GitHub Desktop.
take a twitter m3u8 link and download it properly
# take a twitter m3u8 link and download it properly
function Get-TweetVid {
param( [string]$Uri, [string]$OutDir )
$out_file = (Split-Path $Uri -Leaf).Replace(".m3u8", ".mp4")
$out_path = Join-Path $OutDir $out_file
if( -Not (Test-Path $out_path) ){
mkdir -Path $out_path
}
ffmpeg -i $Uri -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $out_path
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment