Skip to content

Instantly share code, notes, and snippets.

@EntranceJew
Created May 17, 2017 20:33
Show Gist options
  • Save EntranceJew/de6804ad3020366437ee2226c44ca02d to your computer and use it in GitHub Desktop.
Save EntranceJew/de6804ad3020366437ee2226c44ca02d 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