I want to use ffmpeg to convert .m4a files in to .mp3 files.
I can do it for each single file, but that takes a lot of effort to type in.
ffmpeg -i '.\song.m4a' -ac 2 -b:a 192k '.\song.mp3'
Is there a way to do this with powershell using variables? ex:
ffmpeg -i $v -ac 2 -b:a 192k $v.mp3
The problem with this is that then the -ac
flag is taken as part of the path and not of ffmpeg anymore.
Is there a way around this in powershell?
Or could this be done with an array? If I use $v=Get-ChildItem -Name
and iterate over the array with a foreach loop in to the ffmpeg command.
I am very new to PowerShell and don't have a lot of experience but it seems to me that should be possible to do.
I would appreciate any help I can get.