Tech/LxEngine/Samples/LxMorrowind/Converting MP3 to OGG
From Athile
< Tech | LxEngine | Samples | LxMorrowind
To avoid the legal restrictions with MP3, ffmpeg can be used to convert MP3 to OGG:
- ffmpeg -i "mysong.mp3" -acodec libvorbis -aq 6 mysong.ogg
The transcoding will obviously be:
- Lossy
- Slow
- Inefficient
- etc.
(...but for the demoing purposes of LxMorrowind, externally invoking ffmpeg may be a sufficient solution.)
Script File
Presuming all the Morrowind data is stored in the "mwdata", the following script will create OGG copies of each file side-by-side to the original MP3:
@echo off IF EXIST ffmpeg.exe ( for /f "usebackq delims=|" %%f in (`dir /b /s "mwdata\*.mp3"`) do ( title Processing %%f ffmpeg -i "%%f" -acodec libvorbis -aq 6 "%%f.ogg" ) title Done )