Created
May 17, 2017 20:33
-
-
Save EntranceJew/de6804ad3020366437ee2226c44ca02d to your computer and use it in GitHub Desktop.
take a twitter m3u8 link and download it properly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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