-
-
Save tosunkaya/ef93e16e43c2e27e416b447cf118ba3a to your computer and use it in GitHub Desktop.
take a twitter m3u8 link and download it properly
This file contains hidden or 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