Skip to content

Commit 9e95a81

Browse files
committed
Add PowerShell version of bulk conversion
1 parent e80411f commit 9e95a81

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/ffmpeg-notes.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,17 @@ ffmpeg -i input.mp4 -map 0 -vf "scale=1920:1080:force_original_aspect_ratio=decr
134134

135135
### Batch encode
136136

137-
Bulk conversion using Windows batch scripting. Should probably use something better like PowerShell
137+
Bulk file conversion.
138+
139+
#### PowerShell
140+
141+
```powershell
142+
Get-ChildItem -Recurse -Filter *.mp3 | ForEach-Object { ffmpeg -i $_.FullName -b:a 48k (Join-Path $_.DirectoryName "$($_.BaseName).opus") }
143+
```
144+
145+
#### Batch script
146+
147+
Bulk conversion using Windows batch scripting. Should probably use something better like PowerShell.
138148

139149
```batch
140150
FOR /F "tokens=*" %G IN ('dir /b *.mp3') DO ffmpeg -i "%G" -b:a 48k "%~nG.opus"

0 commit comments

Comments
 (0)