Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # https://pastebin.com/4ne6PgP6
- # Converts .mkv files to .mp4 files
- # Requires VLC Media Player
- Param (
- [Parameter(ValueFromPipeline=$true)]
- $InputFile
- )
- $Host.UI.RawUI.WindowTitle = 'mkv2mp4 Converter'
- $OutputFile = $InputFile.Replace('.mkv', '.mp4')
- $VLCProcess = Start-Process 'C:\Program Files\VideoLAN\VLC\vlc.exe' -ArgumentList ('-I dummy -vvv "' + $InputFile + '" --sout=#transcode{}:standard{access="file",mux="mp4",dst="' + $OutputFile + '"} vlc://quit') -PassThru
- Write-Host ("Converting '" + $InputFile + "' ") -NoNewline
- while ((Get-Process -Id $VLCProcess.Id 2>$null) -ne $null) {
- Write-Host "`b`b`b " -NoNewline
- Start-Sleep -Milliseconds 250
- Write-Host "`b`b`b. " -NoNewline
- Start-Sleep -Milliseconds 250
- Write-Host "`b`b`b.. " -NoNewline
- Start-Sleep -Milliseconds 250
- Write-Host "`b`b`b..." -NoNewline
- Start-Sleep -Milliseconds 250
- }
- Write-Host -ForegroundColor Green " Done!"
- Start-Sleep 1
Add Comment
Please, Sign In to add comment