slhck / ffmpeg-normalize

Audio Normalization for Python/ffmpeg
MIT License
1.25k stars 117 forks source link

Having issues normalizing multiple files at once with Powershell #225

Closed BigPhattyVW closed 1 year ago

BigPhattyVW commented 1 year ago

:warning: Please read this carefully and edit the example responses! If you do not fill out this information, your question may be closed without comment.

Describe what you are attempting to do Hello! I am trying to normalize a folder of audio files. I have been trying to use the Powershell example in the wiki, but I'm getting an error. "for %%f in ("*.flac") do ffmpeg-normalize "%%f" -v -t -14 -c:a flac -ext" flac returns the error "Missing opening '(' after keyword 'for'". If I try the bash version it works fine.

Additional context I apologize for the incorrect formatting, and the copious amounts of edits to the title. I'm Running Windows 10 Pro Version 22H2, FFMPEG 6.0-full_build-www.gyan.dev and Powershell 7.3.3

slhck commented 1 year ago

I believe this is Windows batch formatting (cmd.exe), not suitable for PowerShell! So you can either do it in cmd, or look up how to a loop in PowerShell. (E.g. Stack Overflow or Super User)

BigPhattyVW commented 1 year ago

Ah ha, that makes sense!

So I just gave the same(ish) command a try in cmd.exe and it gave me an error "%%f was unexpected at this time". However I got lucky with searching this time. Dropping just one '%' sign got it to work just fine!

Thanks for your help!

slhck commented 1 year ago

Thanks for the feedback. I fixed the examples here: https://github.com/slhck/ffmpeg-normalize/wiki/examples#use-windows-loops-for-multiple-files

BigPhattyVW commented 1 year ago

You're welcome!! And thanks for getting back to me so quickly!