Edited by ZomBBoognish, 18 November 2011 - 05:26 AM.
XWM audio format?
Posted 18 November 2011 - 05:22 AM
Posted 19 November 2011 - 12:59 AM
Edit: Now, to make this clear -- I did not directly check the bitrate, but divided file size by time length.
Edited by TheSilvan, 19 November 2011 - 01:47 AM.
Posted 19 November 2011 - 01:44 AM
The music files I checked appeared to be encoded in (approximately) 47 kbit/s. Am I doing it wrong or... ? :O
Considering that the FFmpeg plugin for xWMA was thrown together rather quickly, and was just intended to play game sounds and music for ScummVM, it is possible that it is not reading the bitrate correctly. It is also possible that there is a VLC bug related to that particular FFmpeg plugin.
I honestly don't know much about the xWMA container. From what I've read the audio is usually Windows Media Audio version 2, but there is no requirement to actually encode the audio in a Microsoft format such as WMA.
VLC reports that the XWM files from Skyrim are encoded in WMA (which VLC can play), and the game audio doesn't sound low quality, so chances are it is just an issue with reading the data from the xWMA container. I did check with recent builds of MPlayer for Windows, and they don't appear to be able to play the audio at all, but it is possible that the various MPlayer builds I tried did not include the xWMA plugin for FFmpeg when they compiled the FFmpeg libraries.
I have seen mention of xWMA converters (I never found any of these converters though) using xWMAencode to convert XWM files into something more usable, so someone with more skill in these matters may be able to figure out how to do that. If I get really bored, I may even install a Windows XP VM in VMware Player and see if I can figure out how to do it myself. The only programming language I know is Java, so if I did manage to figure it out then I would probably just write a batch file to automate some of the functions, and then compile that into an EXE.
Posted 19 November 2011 - 11:41 PM
ps. I'm using vista/ 7.
Edited by iceburg, 19 November 2011 - 11:42 PM.
Posted 20 November 2011 - 04:25 AM
Because the author forces the application to look for .wav files instead of xwm files, you have to rename the xwm files to .wav first, then choose that file in the application, then select the output destination and hit convert. Works pretty flawlessly, it's just tedious to do for more than a few files.
Posted 21 November 2011 - 08:30 AM
You then run that command and pass the file names as the parameters.
Syntax: xwmaencode <source> <target>
Example #1 (Convert to XWM)
xwmaencode conan.wav conan.xwm
Example #2 (Convert to WAV)
xwmaencode conan.xwm conan.wav
I might be tempted to write a batch processing script for this...but depends on how much time I have available.
xWMA Command-Line Encoder (documentation)
DirectX SDK (June 2010)
Posted 21 November 2011 - 04:15 PM
1. First, you'll need a BSA unpacker. As long as it lets you extract the xwm files, it would work fine. I used this BSA unpacker and it did fine.
2. Once we have the unpacker, launch it and navigate it to C:\Program Files\Steam\steamapps\common\skyrim\Data (Note: If your Steam folder differs from the default install location, you'll need to change the path accordingly)
3. Select the Skyrim - Sounds.bsa file and hit open. My program warned me about an unknown version number, and that's OK. Hit Yes to open it anyway. Once inside we should have a list of all the xwm files like so:
From here you can select the files you want to export, then hit extract, or hit extract all to do the whole archive. From here you need to select a destination for the files. I put a folder on my desktop called Skyrim Sound Files, but you can do whatever. Just make sure that you extract the BSA into an empty folder, as the BSA unpacker will create the folders and sub-folders as found in the BSA itself.
4. Now that we have all of the .xwm files from the BSA, we need to get that xWMAEncode.exe from the DirectX SDK I was talking about. I've gone ahead and uploaded that exe for your convenience at this link. Download that file and put it in to the directory that we created earlier, the one that holds all of the sound files and folders.
5. Now we're going to make the magical batch file that loops through all of the xwm files and converts them using xWMAEncode.exe. For convenience, I've also uploaded it at this link. If you download it, make sure you save it to the same folder as xWMAEncode.exe and the sound files.
5a. So first we need to create a new text file in the same directory as xWMAEncode.exe and the sound files and rename it to convert_xwm_to_wav.bat.
5b. Next, right click on the .bat file and click edit.
5c. A blank notepad window should come up. Inside, copy and paste the following:
for /r . %%T IN (*.xwm) do @xWMAEncode.exe "%%T" "%%~pT%%~nT.wav"
5d. Save the file and close the window.
6. Run the newly created convert_xwm_to_wav.bat file and let it finish, otherwise it may not convert everything. It may take a while.
7. Once completed, you should now see the converted .wav files next to the .xwm files like so:
The wav files will be a lot bigger than the xwm files, so make sure you have room for them all. If you want to further compress the files, you can convert them to mp3 with something like dbPoweramp or lame.exe.
If you need further assistance feel free to ask and I'll do my best to help!
Posted 21 November 2011 - 04:21 PM
Edited by nandchan, 21 November 2011 - 04:22 PM.
Posted 22 November 2011 - 05:27 PM
I decided to go ahead and download the 572 MB SDK to pull out the xWMAEncode.exe for anyone else who's interested in converting the sounds and music found in the game.
You, sir, made me really, really happy, y'know?
BIIIIIIG Thanks and kudos - everything works more than fine, without stuttering and any other crap. Whoa...