File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -134,17 +134,23 @@ ffmpeg -i input.mp4 -map 0 -vf "scale=1920:1080:force_original_aspect_ratio=decr
134134
135135### Batch encode
136136
137- Bulk file conversion .
137+ Single line bulk file encoding commands .
138138
139139#### PowerShell
140140
141141``` powershell
142142Get-ChildItem -Recurse -Filter *.mp3 | ForEach-Object { ffmpeg -i $_.FullName -b:a 48k (Join-Path $_.DirectoryName "$($_.BaseName).opus") }
143143```
144144
145+ Or to preserve the original last modified date:
146+
147+ ``` powershell
148+ Get-ChildItem -Recurse -Filter *.mp3 | ForEach-Object { $out = "$($_.Directory)\$($_.BaseName).opus"; ffmpeg -i $_.FullName -b:a 48k $out; (Get-Item $out).LastWriteTime = $_.LastWriteTime }
149+ ```
150+
145151#### Batch script
146152
147- Bulk conversion using Windows batch scripting. Should probably use something better like PowerShell.
153+ Bulk Opus encoding using Windows batch scripting. Should probably use something better like PowerShell.
148154
149155``` batch
150156FOR /F "tokens=*" %G IN ('dir /b *.mp3') DO ffmpeg -i "%G" -b:a 48k "%~nG.opus"
You can’t perform that action at this time.
0 commit comments