Last active
October 21, 2023 06:59
-
-
Save HunterAP23/0b5f5b0930ee74654f35a96e1c998960 to your computer and use it in GitHub Desktop.
Convert Media Sources to rawvideo AVI with transparency
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
| @(Get-ChildItem -File -Recurse -Filter *.webm).foreach({ | |
| $pat = Split-Path ($_).FullName | |
| $codec = ffprobe -v error -select_streams v:0 -show_entries stream=codec_name -of default=noprint_wrappers=1:nokey=1 ($_).FullName | |
| $new = "$pat\$(($_).BaseName)_RAWVIDEO.avi" | |
| If ($codec -eq "vp8") { | |
| ffmpeg -hide_banner -c:v libvpx -i "$(($_).FullName)" -pix_fmt rgba -c:v rawvideo -c:a aac -q:a 5 "$new" | |
| }ElseIf{ | |
| ffmpeg -hide_banner -c:v libvpx-vp9 -i "$(($_).FullName)" -pix_fmt rgba -c:v rawvideo -c:a aac -q:a 5 "$new" | |
| } | |
| }) | |
| @(Get-ChildItem -File -Recurse -Filter *.mov).foreach({ | |
| $pat = Split-Path ($_).FullName | |
| $new = "$pat\$(($_).BaseName)_RAWVIDEO.avi" | |
| ffmpeg -hide_banner -i "$(($_).FullName)" -pix_fmt rgba -c:v rawvideo -c:a aac -q:a 5 "$new" | |
| }) | |
| @(Get-ChildItem -File -Recurse -Filter *.mp4).foreach({ | |
| $pat = Split-Path ($_).FullName | |
| $new = "$pat\$(($_).BaseName)_RAWVIDEO.avi" | |
| ffmpeg -hide_banner -i "$(($_).FullName)" -pix_fmt rgba -c:v rawvideo -c:a aac -q:a 5 "$new" | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment