Powershell: Convert MP4's to Wav Files
The following powershell script converts via VLC the MP4's in the current directory to WAV files. It doesn't like apostrophes in the filename. You'll need windows VLC to run via Powershell and you'll need to set the execution policy to "Unrestricted".
You can verify the execution policy setting by using the Get-ExecutionPolicy PowerShell command: get-executionpolicy
Then:
set-executionpolicy unrestricted
The following is the script, copy paste and save in notepad as "convertMP4toWav.ps1" or whatever you prefer.
------------------------------------------------------
$outputExtension = ".wav"
$bitrate = 1411
$channels = 2
foreach($inputFile in get-childitem -recurse -Filter *.mp4)
{
$outputFileName = [System.IO.Path]::GetFileNameWithoutExtension($inputFile.FullName) + $outputExtension;
$outputFileName = [System.IO.Path]::Combine($inputFile.DirectoryName, $outputFileName);
$outputFileName = $outputFileName.Replace("'", "`'");
$programFiles = ${env:ProgramFiles(x86)};
if($programFiles -eq $null) { $programFiles = $env:ProgramFiles; }
$processName = $programFiles + "\VideoLAN\VLC\vlc.exe"
$fn = $($inputFile.FullName).Replace("'", "`'");
$processArgs = "-I dummy -vvv "$fn" --sout=#transcode{acodec="mp3",ab="$bitrate","channels=$channels"}:standard{access="file",mux="wav",dst="$outputFileName"} vlc://quit"
#echo $processArgs
start-process $processName $processArgs -wait
}
------------------------------------------------------
Anyway with VideoDownloadHelper you can save youtube video's then convert to WAV file.
Links:
Pastebin: https://pastebin.com/AawVm8aK
VLC: https://www.videolan.org/vlc/download-windows.html
VideoDownloadHelper: https://addons.mozilla.org/en-US/firefox/addon/video-downloadhelper/
Leave Powershell: Convert MP4's to Wav Files to:
Read more #powershell posts
Best Posts From Citylogic
We have not curated any of citylogic's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From Citylogic
- Enabling God Mode in Windows 10
- Free upgrade to Windows 10 Pro 2019
- Pete Rock & C.L. Smooth_The Main Ingredient + Instrumentals (Album) 1994
- B(if)tek - 'We Think You’re Dishy' (1999)
- MB14 vs SARO | Grand Beatbox LOOPSTATION Battle 2017 | SEMI FINAL
- How to recreate Underworld's 'Born Slippy' in 60 seconds
- Roland TB 03 Synced Live via USB Ableton Freddy Fresh
- Powershell: Convert WAV's to MP3 Files
- Powershell: Convert MP4's to Wav Files
- Get Rid of Browser Advertisements Totally Free & Safe