Categories: 🠪 General
Email 🠪 Servers
🠪 Testing
🠪 Tips
Hardware 🠪 3D Printing
🠪 Apple
🠪 Batteries
🠪 Drives
🠪 Edgerouter
🠪 Electronics
🠪 Laptop
🠪 Modems
🠪 Phone
🠪 Printers
🠪 Raspberry Pi
🠪 Tablets
🠪 Testing
🠪 Virtualization
hidden 🠪 General
Links 🠪 Interesting
🠪 Media
Network 🠪 Data
🠪 Testing
🠪 VPN
Scripts 🠪 Batch
🠪 Linux
🠪 Powershell
Servers 🠪 Databases
🠪 Misc
🠪 Website
Software 🠪 Other
Utilities 🠪 Backup
🠪 Fix Issues
🠪 Recovery
Video 🠪 Editing
Websites 🠪 HTML
🠪 Testing
Windows 🠪 Adjustments
🠪 Issues
🠪 Remote Desktop
🠪 Security
🠪 Slow
🠪 Software
🠪 Startup
Submit Entry
| Airin's Notes
Category: Scripts 🠪 Batch
Convert media file using ffmpeg | November 30, 2023 |
Put the following in a batch file. You will need to download ffmpeg and place it in some path.
https://ffmpeg.org/download.html
--------------- Start --------------
@echo off
set ffmpeg="C:\Tools\Utils\ffmpeg-win-2.2.2\ffmpeg.exe"
set infolder=C:\Temp\In-WAV
set outfolder=C:\Temp\Out-MP3
set infiletype=wav
set outfiletype=mp3
echo Starting!
echo Input folder: %infolder%
echo Output folder: %outfolder%
echo Input filetype: %infiletype%
echo Output filetype: %outfiletype%
echo.
cd /d "%infolder%"
if not exist "%outfolder%\." md "%outfolder%"
dir
echo Starting!
for %%f in (%infolder%\*.%infiletype%) do (
if exist "%outfolder%\%%~nf.%outfiletype%" echo Skipping '%%~nf.%infiletype%' since '%outfolder%\%%~nf.%outfiletype%' exists.
if not exist "%outfolder%\%%~nf.%outfiletype%" (
echo.
echo.
echo -------------------- Starting '%%f'
echo Converting '%%f' to '%outfolder%\%%~nf.%outfiletype%'
%ffmpeg% -i "%%f" "%outfolder%\%%~nf.%outfiletype%"
)
)
echo.
echo.
echo All Finished!
echo.
timeout 10
----------------- End ----------------- |
|